diff --git a/CHANGELOG.md b/CHANGELOG.md index cdad9b6..f786100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.3] - 2024-12-18 + +- chore: remove event duplication for service migrations + ## [1.9.2] - 2024-10-28 - feat: stop storing the message in the datastore diff --git a/bun.lockb b/bun.lockb index e617c62..c86d7b2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/config/event-duplication.json b/config/event-duplication.json deleted file mode 100644 index 0495167..0000000 --- a/config/event-duplication.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "old-id-here": "new-id-here", - "crid://wdr.de/Sendung-165805": "crid://wdr.de/Beitrag-8b3f11ae-cf15-47e4-9f68-e4e9b83013f5", - "crid://wdr.de/Sendung-165804": "crid://wdr.de/Beitrag-9b18478d-ce15-4c4d-a2d3-02cd951a4cec", - "crid://wdr.de/Sendung-befbdb6d-3d1c-403d-8936-061abbd919fe": "crid://wdr.de/Beitrag-0bdc0be4-d331-4248-9e40-4374d16d9541", - "crid://wdr.de/Sendung-5893ad38-ab6a-48bc-ba8c-d4a14763e857": "crid://wdr.de/Beitrag-d775524e-54ba-4ecd-9814-3f324fd0a891", - "crid://wdr.de/Sendung-3c5b688d-5f31-4bb1-91f0-41d72a2e7cd3": "crid://wdr.de/Beitrag-7a56249f-4f7e-4ff4-aaf0-27d7cf50ba13", - "crid://wdr.de/Sendung-165961": "crid://wdr.de/Beitrag-99ed97df-550b-48a4-a544-dcaf03e59c44", - "crid://wdr.de/Sendung-165960": "crid://wdr.de/Beitrag-5552666a-b5e0-48b2-a500-47a58ad2d457", - "crid://wdr.de/Sendung-165959": "crid://wdr.de/Beitrag-78a782d9-d557-4c01-a2f9-99866279190e", - - "crid://mdr.de/stream/28428-0": "crid://mdr.de/livestream/cms/5ad33a1f-f08e-4c6f-98cf-186df47a12cf/Beitrag", - "crid://mdr.de/stream/28429-0": "crid://mdr.de/livestream/cms/a8e7fd2a-b198-422f-9629-336cf27f13fa/Beitrag", - "crid://mdr.de/stream/28430-0": "crid://mdr.de/livestream/cms/112f1e08-13ce-4e85-8b60-a17929402ae9/Beitrag", - "crid://mdr.de/stream/28434-0": "crid://mdr.de/livestream/cms/MDR Aktuell Radio/Beitrag", - "crid://mdr.de/stream/28431-0": "crid://mdr.de/livestream/cms/MDR Kultur Radio/Beitrag", - "crid://mdr.de/stream/28431-1-0": "crid://mdr.de/livestream/cms/84876c76-d6f4-4b25-bdec-d22e98fb94c4/Beitrag", - "crid://mdr.de/stream/28435-0": "crid://mdr.de/livestream/cms/MDR Klassik/Beitrag", - "crid://mdr.de/stream/28432-0": "crid://mdr.de/livestream/cms/Jump/Beitrag", - "crid://mdr.de/stream/28432-1-0": "crid://mdr.de/livestream/cms/b643d081-4f41-4f90-ada3-7864bcacaf24/Beitrag", - "crid://mdr.de/stream/28432-3-0": "crid://mdr.de/livestream/cms/d760608f-9eb4-4cf3-a405-e8cccb355776/Beitrag", - "crid://mdr.de/stream/28432-2-0": "crid://mdr.de/livestream/cms/5dd1d0cd-2ac6-46f8-b90d-3f5a8f2ca5e5/Beitrag", - "crid://mdr.de/stream/28433-0": "crid://mdr.de/livestream/cms/Sputnik/Beitrag", - "crid://mdr.de/stream/28433-2-0": "crid://mdr.de/livestream/cms/b8121905-6f73-4b83-a06a-b0e5fda562ad/Beitrag", - "crid://mdr.de/stream/28433-7-0": "crid://mdr.de/livestream/cms/f04c8fa2-3e15-4760-988b-5381ceb5f2ab/Beitrag", - "crid://mdr.de/stream/28433-1-0": "crid://mdr.de/livestream/cms/1cd38023-bc46-488c-b6e1-3a947796617b/Beitrag", - "crid://mdr.de/stream/28433-4-0": "crid://mdr.de/livestream/cms/964d26d4-c392-4295-94a8-acec49c0a4d7/Beitrag", - "crid://mdr.de/stream/28433-5-0": "crid://mdr.de/livestream/cms/a2c4d57d-2f48-42f0-ad2e-8a309283e3d9/Beitrag", - "crid://mdr.de/stream/28433-3-0": "crid://mdr.de/livestream/cms/0217ea7c-b6c6-402e-bbe2-cc83358c0c21/Beitrag", - "crid://mdr.de/stream/28433-6-0": "crid://mdr.de/livestream/cms/87710c90-ac51-4231-93c6-7206c9c5c50b/Beitrag", - "crid://mdr.de/stream/10402-0": "crid://mdr.de/livestream/cms/MDR Tweens/Beitrag", - "crid://mdr.de/stream/10401-0": "crid://mdr.de/livestream/cms/9507b3b3-5b04-4540-97c9-758c40ed98c0/Beitrag" -} diff --git a/package.json b/package.json index effb96b..24efd2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ard-eventhub", - "version": "1.9.2", + "version": "1.9.3", "description": "ARD system to distribute real-time (live) metadata for primarily radio broadcasts.", "main": "./src/ingest/index.js", "engines": { @@ -35,7 +35,7 @@ "dd-trace": "^5.24.0", "express": "^4.21.1", "express-openapi-validator": "^5.3.4", - "firebase-admin": "^12.7.0", + "firebase-admin": "^13.0.1", "google-auth-library": "^9.14.1", "jsonwebtoken": "^9.0.2", "luxon": "^3.5.0", @@ -51,7 +51,7 @@ "chai-http": "^4.4.0", "docsify-cli": "^4.4.4", "license-compliance": "^3.0.1", - "mocha": "^10.7.3", + "mocha": "^11.0.1", "nodemon": "^3.1.4", "prettier": "^3.3.3" }, diff --git a/src/ingest/events/post.js b/src/ingest/events/post.js index b052385..56202fb 100644 --- a/src/ingest/events/post.js +++ b/src/ingest/events/post.js @@ -17,7 +17,6 @@ const response = require('../../utils/response') // load config const config = require('../../../config') -const eventDuplicationConfig = require('../../../config/event-duplication.json') const source = 'ingest/events/post' const DEFAULT_ZONE = 'Europe/Berlin' @@ -59,26 +58,6 @@ module.exports = async (req, res) => { // create custom attributes for pubsub metadata const attributes = { event: eventName } - // add workaround for stations in migration phase - for (const service of message.services) { - // check if externalID is in duplication config - if (eventDuplicationConfig[service.externalId]) { - // clone service and add new externalId - const newService = structuredClone(service) - newService.externalId = eventDuplicationConfig[service.externalId] - - // add to services - message.services.push(newService) - - logger.log({ - level: 'info', - message: `duplicated event > ${eventName} > ${service.externalId}`, - source, - data: { body: req.body, service, newService }, - }) - } - } - // compile core hashes and pubsub names for every service message.services = await Promise.all( message.services.map((service) => processServices(service, req))