diff --git a/CHANGELOG.md b/CHANGELOG.md index 44abae72679..27673ef3049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## Unreleased +## [v16.1.4] 2024-4-23 ### Migration Notes @@ -28,6 +28,12 @@ instructions](https://nasa.github.io/cumulus/docs/upgrade-notes/upgrade-rds-clus - **CUMULUS-3444** - Update `cumulus-rds-tf` module to take additional parameters in support of migration from Aurora PostgreSQl v11 to v13. See Migration Notes for more details. +- **CUMULUS-3547** + - Updated ECS Cluster `/dev/xvdcz` EBS volumes so they're encrypted. + +## Fixed +- **CUMULUS-3673** + - Fixes Granules API so that paths containing a granule and/or collection ID properly URI encode the ID. ## [v16.1.3] 2024-1-15 @@ -37,7 +43,7 @@ included in the future will have a corresponding CHANGELOG entry in future relea ### Changed -- **CUMULUS_3499 +- **CUMULUS_3499** - Update AWS-SDK dependency pin to "2.1490" to prevent SQS issue. Dependency pin expected to be changed with the resolution to CUMULUS-2900 @@ -7337,7 +7343,8 @@ Note: There was an issue publishing 1.12.0. Upgrade to 1.12.1. ## [v1.0.0] - 2018-02-23 -[unreleased]: https://github.com/nasa/cumulus/compare/v16.1.3...HEAD +[unreleased]: https://github.com/nasa/cumulus/compare/v16.1.4...HEAD +[v16.1.4]: https://github.com/nasa/cumulus/compare/v16.1.3...v16.1.4 [v16.1.3]: https://github.com/nasa/cumulus/compare/v16.1.2...v16.1.3 [v16.1.2]: https://github.com/nasa/cumulus/compare/v16.1.1...v16.1.2 [v16.1.1]: https://github.com/nasa/cumulus/compare/v16.0.0...v16.1.1 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b4544b65d48..9e9ec79cb26 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -35,12 +35,14 @@ * Nate Pauzenga * Pat Cappelaere * Patrick Quinn +* Paul Pilone * Phil Osip * Sara Chaparro Diaz * Sean Quinlan * Seth Vincent * Slav Korolev * Snyk bot +* Tim Clark * Tobias Nießen * Vanh Khuyen Nguyen * Vanh Nguyen diff --git a/example/lambdas/asyncOperations/package.json b/example/lambdas/asyncOperations/package.json index 54a7b5f83b4..96ce2eb14ee 100644 --- a/example/lambdas/asyncOperations/package.json +++ b/example/lambdas/asyncOperations/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-async-operations", - "version": "16.1.3", + "version": "16.1.4", "description": "AsyncOperations Test Lambda", "main": "index.js", "private": true, diff --git a/example/lambdas/ftpPopulateTestLambda/package.json b/example/lambdas/ftpPopulateTestLambda/package.json index 5bdf741f5dc..2e0cfe878a3 100644 --- a/example/lambdas/ftpPopulateTestLambda/package.json +++ b/example/lambdas/ftpPopulateTestLambda/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/ftp-populate-test-lambda", - "version": "16.1.3", + "version": "16.1.4", "description": "FTP Population Utility Lambda", "main": "index.js", "private": true, @@ -19,12 +19,12 @@ "access": "private" }, "dependencies": { - "@cumulus/api": "16.1.3", - "@cumulus/api-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/integration-tests": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/test-data": "16.1.3", + "@cumulus/api": "16.1.4", + "@cumulus/api-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/integration-tests": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/test-data": "16.1.4", "aws-sdk": "2.1490.0", "fs-extra": "^9.0.0", "jsftp": "https://github.com/jkovarik/jsftp.git#add_288", diff --git a/example/lambdas/lzardsClientTest/package.json b/example/lambdas/lzardsClientTest/package.json index c044d1e6ce8..e32e7dc88c1 100644 --- a/example/lambdas/lzardsClientTest/package.json +++ b/example/lambdas/lzardsClientTest/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-lzards-api-lambda", - "version": "16.1.3", + "version": "16.1.4", "description": "LZARDS API Client Test Lambda", "private": true, "engines": { @@ -20,7 +20,7 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/logger": "16.1.3", - "@cumulus/lzards-api-client": "16.1.3" + "@cumulus/logger": "16.1.4", + "@cumulus/lzards-api-client": "16.1.4" } } diff --git a/example/lambdas/python-processing/package.json b/example/lambdas/python-processing/package.json index fb32f5a5c33..54fbe8d2ee1 100644 --- a/example/lambdas/python-processing/package.json +++ b/example/lambdas/python-processing/package.json @@ -1,7 +1,7 @@ { "name": "@cumulus/python-process-activity", "private": true, - "version": "16.1.3", + "version": "16.1.4", "description": "Python reference activity", "homepage": "https://github.com/nasa/cumulus/tree/master/example/lambdas/python-reference-activity", "repository": { diff --git a/example/lambdas/python-reference-activity/package.json b/example/lambdas/python-reference-activity/package.json index 7fb85dbdcca..bb75ec8013a 100644 --- a/example/lambdas/python-reference-activity/package.json +++ b/example/lambdas/python-reference-activity/package.json @@ -1,7 +1,7 @@ { "name": "@cumulus/python-reference-activity", "private": true, - "version": "16.1.3", + "version": "16.1.4", "description": "Python reference activity", "homepage": "https://github.com/nasa/cumulus/tree/master/example/lambdas/python-reference-activity", "repository": { diff --git a/example/lambdas/python-reference-task/package.json b/example/lambdas/python-reference-task/package.json index e8970c5cac9..03be314bbcd 100644 --- a/example/lambdas/python-reference-task/package.json +++ b/example/lambdas/python-reference-task/package.json @@ -1,7 +1,7 @@ { "name": "@cumulus/python-reference-task", "private": true, - "version": "16.1.3", + "version": "16.1.4", "description": "Python reference task", "main": "index.js", "homepage": "https://github.com/nasa/cumulus/tree/master/example/lambdas/python-reference-task", diff --git a/example/lambdas/s3AccessTest/package.json b/example/lambdas/s3AccessTest/package.json index 6067410b82b..e1291d74cfe 100644 --- a/example/lambdas/s3AccessTest/package.json +++ b/example/lambdas/s3AccessTest/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-s3-access", - "version": "16.1.3", + "version": "16.1.4", "description": "S3 Access Test Lambda", "main": "index.js", "private": true, diff --git a/example/lambdas/snsS3Test/package.json b/example/lambdas/snsS3Test/package.json index e8ffd1713c1..13055dd05fd 100644 --- a/example/lambdas/snsS3Test/package.json +++ b/example/lambdas/snsS3Test/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-sns-s3", - "version": "16.1.3", + "version": "16.1.4", "description": "SNS to S3 Test Lambda", "main": "index.js", "private": true, diff --git a/example/lambdas/versionUpTest/package.json b/example/lambdas/versionUpTest/package.json index 37bfb0d8ee7..08aebec04f9 100644 --- a/example/lambdas/versionUpTest/package.json +++ b/example/lambdas/versionUpTest/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-version-up", - "version": "16.1.3", + "version": "16.1.4", "description": "Version Up Test Lambda", "main": "index.js", "private": true, diff --git a/example/package.json b/example/package.json index 1b2f2f06071..1754043d0b9 100644 --- a/example/package.json +++ b/example/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/cumulus-integration-tests", - "version": "16.1.3", + "version": "16.1.4", "description": "Cumulus Integration Test Deployment", "private": true, "main": "index.js", @@ -44,32 +44,32 @@ ] }, "dependencies": { - "@cumulus/api": "16.1.3", - "@cumulus/api-client": "16.1.3", - "@cumulus/async-operations": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/checksum": "16.1.3", - "@cumulus/cmr-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/discover-granules": "16.1.3", - "@cumulus/discover-pdrs": "16.1.3", - "@cumulus/files-to-granules": "16.1.3", - "@cumulus/hello-world": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/integration-tests": "16.1.3", - "@cumulus/message": "16.1.3", - "@cumulus/move-granules": "16.1.3", - "@cumulus/parse-pdr": "16.1.3", - "@cumulus/pdr-status-check": "16.1.3", - "@cumulus/post-to-cmr": "16.1.3", - "@cumulus/queue-granules": "16.1.3", - "@cumulus/queue-pdrs": "16.1.3", - "@cumulus/sf-sqs-report": "16.1.3", - "@cumulus/sync-granule": "16.1.3", - "@cumulus/test-processing": "16.1.3" + "@cumulus/api": "16.1.4", + "@cumulus/api-client": "16.1.4", + "@cumulus/async-operations": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/checksum": "16.1.4", + "@cumulus/cmr-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/discover-granules": "16.1.4", + "@cumulus/discover-pdrs": "16.1.4", + "@cumulus/files-to-granules": "16.1.4", + "@cumulus/hello-world": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/integration-tests": "16.1.4", + "@cumulus/message": "16.1.4", + "@cumulus/move-granules": "16.1.4", + "@cumulus/parse-pdr": "16.1.4", + "@cumulus/pdr-status-check": "16.1.4", + "@cumulus/post-to-cmr": "16.1.4", + "@cumulus/queue-granules": "16.1.4", + "@cumulus/queue-pdrs": "16.1.4", + "@cumulus/sf-sqs-report": "16.1.4", + "@cumulus/sync-granule": "16.1.4", + "@cumulus/test-processing": "16.1.4" }, "devDependencies": { - "@cumulus/test-data": "16.1.3" + "@cumulus/test-data": "16.1.4" } } diff --git a/example/scripts/generate_ingest/package.json b/example/scripts/generate_ingest/package.json index 23d912641c2..2b9de0443c3 100644 --- a/example/scripts/generate_ingest/package.json +++ b/example/scripts/generate_ingest/package.json @@ -1,7 +1,7 @@ { "name": "@cumulus/generate_ingest", "private": true, - "version": "16.1.3", + "version": "16.1.4", "description": "Script to generate test data for scaled ingest", "keywords": [ "GIBS", @@ -22,8 +22,8 @@ "directory": "packages/types" }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3" + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4" }, "author": "Cumulus Authors", "license": "Apache-2.0" diff --git a/example/scripts/lib/package.json b/example/scripts/lib/package.json index ff250c83ab2..b97d31191ed 100644 --- a/example/scripts/lib/package.json +++ b/example/scripts/lib/package.json @@ -1,7 +1,7 @@ { "name": "@cumulus/example-lib", "private": true, - "version": "16.1.3", + "version": "16.1.4", "description": "example project libs", "homepage": "https://github.com/nasa/cumulus/tree/master/example/scripts/lib", "engines": { diff --git a/example/spec/helpers/Collections.js b/example/spec/helpers/Collections.js index b3d91fceace..4ad1c9128fe 100644 --- a/example/spec/helpers/Collections.js +++ b/example/spec/helpers/Collections.js @@ -126,17 +126,4 @@ const removeCollectionAndAllDependencies = async (params) => { } }; -/** - * Returns collectionId with version encoded. - * - * @param {string} name - collection name - * @param {string} version - collection version - * @returns {string} - */ -const encodedConstructCollectionId = (name, version) => { - const encodedVersion = encodeURIComponent(version); - - return constructCollectionId(name, encodedVersion); -}; - -module.exports = { removeCollectionAndAllDependencies, encodedConstructCollectionId }; +module.exports = { removeCollectionAndAllDependencies }; diff --git a/example/spec/parallel/cnmWorkflow/CnmWorkflowFromSqsSpec.js b/example/spec/parallel/cnmWorkflow/CnmWorkflowFromSqsSpec.js index 501602d497b..0747cca61eb 100644 --- a/example/spec/parallel/cnmWorkflow/CnmWorkflowFromSqsSpec.js +++ b/example/spec/parallel/cnmWorkflow/CnmWorkflowFromSqsSpec.js @@ -30,9 +30,10 @@ const { waitForCompletedExecution, } = require('@cumulus/integration-tests'); +const { constructCollectionId } = require('@cumulus/message/Collections'); + const { waitForApiStatus } = require('../../helpers/apiUtils'); const { waitForTestSfForRecord } = require('../../helpers/kinesisHelpers'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); const { loadConfig, @@ -75,7 +76,7 @@ async function cleanUp() { await deleteExecution({ prefix: config.stackName, executionArn: workflowExecution.executionArn }); await removePublishedGranule({ prefix: config.stackName, granuleId, - collectionId: encodedConstructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version) }); + collectionId: constructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version) }); await Promise.all([ deleteFolder(config.bucket, testDataFolder), @@ -236,7 +237,7 @@ describe('The Cloud Notification Mechanism SQS workflow', () => { { prefix: config.stackName, granuleId, - collectionId: encodedConstructCollectionId(record.collection, record.product.dataVersion), + collectionId: constructCollectionId(record.collection, record.product.dataVersion), }, 'completed' ); diff --git a/example/spec/parallel/cnmWorkflow/KinesisTestTriggerSpec.js b/example/spec/parallel/cnmWorkflow/KinesisTestTriggerSpec.js index 569749b1965..66397d929bd 100644 --- a/example/spec/parallel/cnmWorkflow/KinesisTestTriggerSpec.js +++ b/example/spec/parallel/cnmWorkflow/KinesisTestTriggerSpec.js @@ -31,7 +31,7 @@ const { getExecution, deleteExecution } = require('@cumulus/api-client/execution const { getGranule, deleteGranule } = require('@cumulus/api-client/granules'); const { randomString } = require('@cumulus/common/test-utils'); const { getExecutionUrlFromArn } = require('@cumulus/message/Executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiRecord, @@ -109,7 +109,7 @@ describe('The Cloud Notification Mechanism Kinesis workflow', () => { await deleteExecution({ prefix: testConfig.stackName, executionArn: workflowExecution.executionArn }); await deleteGranule({ prefix: testConfig.stackName, granuleId, - collectionId: encodedConstructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version) }); + collectionId: constructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version) }); await Promise.all([ deleteFolder(testConfig.bucket, testDataFolder), @@ -370,7 +370,7 @@ describe('The Cloud Notification Mechanism Kinesis workflow', () => { { prefix: testConfig.stackName, granuleId, - collectionId: encodedConstructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version), + collectionId: constructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version), }, { status: 'completed', @@ -464,7 +464,7 @@ describe('The Cloud Notification Mechanism Kinesis workflow', () => { { prefix: testConfig.stackName, granuleId, - collectionId: encodedConstructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version), + collectionId: constructCollectionId(ruleOverride.collection.name, ruleOverride.collection.version), }, { status: 'failed', diff --git a/example/spec/parallel/createReconciliationReport/CreateReconciliationReportSpec.js b/example/spec/parallel/createReconciliationReport/CreateReconciliationReportSpec.js index d80289bd2a8..b722863eb9a 100644 --- a/example/spec/parallel/createReconciliationReport/CreateReconciliationReportSpec.js +++ b/example/spec/parallel/createReconciliationReport/CreateReconciliationReportSpec.js @@ -38,7 +38,7 @@ const { updateGranule, } = require('@cumulus/api-client/granules'); const { getCmrSettings } = require('@cumulus/cmrjs/cmr-utils'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus, @@ -158,7 +158,7 @@ const createActiveCollection = async (prefix, sourceBucket) => { { prefix, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(newCollection.name, newCollection.version), + collectionId: constructCollectionId(newCollection.name, newCollection.version), }, 'completed' ); @@ -172,7 +172,7 @@ const createActiveCollection = async (prefix, sourceBucket) => { await getGranuleWithStatus({ prefix, granuleId, - collectionId: encodedConstructCollectionId(newCollection.name, newCollection.version), + collectionId: constructCollectionId(newCollection.name, newCollection.version), status: 'completed' }); return newCollection; }; @@ -207,7 +207,7 @@ async function ingestAndPublishGranule(config, testSuffix, testDataFolder, publi { prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' ); @@ -274,7 +274,7 @@ const waitForCollectionRecordsInList = async (stackName, collectionIds, addition const collsResp = await getCollections({ prefix: stackName, query: { _id__in: collectionIds.join(','), ...additionalQueryParams, limit: 30 } }); const results = get(JSON.parse(collsResp.body), 'results', []); - const ids = results.map((c) => encodedConstructCollectionId(c.name, c.version)); + const ids = results.map((c) => constructCollectionId(c.name, c.version)); return isEqual(ids.sort(), collectionIds.sort()); }, { @@ -327,7 +327,7 @@ describe('When there are granule differences and granule reconciliation is run', beforeAll(async () => { try { - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); config = await loadConfig(); @@ -385,7 +385,7 @@ describe('When there are granule differences and granule reconciliation is run', console.log('XXXXX Waiting for collections in list'); const collectionIds = [ collectionId, - encodedConstructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version), + constructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version), ]; await waitForCollectionRecordsInList(config.stackName, collectionIds, { timestamp__from: ingestTime }); @@ -445,9 +445,9 @@ describe('When there are granule differences and granule reconciliation is run', prefix: config.stackName, request: { collectionId: [ - encodedConstructCollectionId(collection.name, collection.version), - encodedConstructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version), - encodedConstructCollectionId(onlyCMRCollection.name, onlyCMRCollection.version), + constructCollectionId(collection.name, collection.version), + constructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version), + constructCollectionId(onlyCMRCollection.name, onlyCMRCollection.version), ], reportType: 'Granule Not Found', }, @@ -512,7 +512,7 @@ describe('When there are granule differences and granule reconciliation is run', it('generates a filtered report showing requested collections that are in Cumulus but not in CMR', () => { if (beforeAllFailed) fail(beforeAllFailed); - const extraCollection = encodedConstructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); + const extraCollection = constructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); expect(report.collectionsInCumulusCmr.onlyInCumulus).toContain(extraCollection); expect(report.collectionsInCumulusCmr.onlyInCumulus).not.toContain(collectionId); expect(report.collectionsInCumulusCmr.onlyInCumulus.length).toBe(1); @@ -803,7 +803,7 @@ describe('When there are granule differences and granule reconciliation is run', expect(reportArray.some((record) => record.includes(testStr))).toBe(true); }); - const omittedCollectionId = encodedConstructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); + const omittedCollectionId = constructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); expect(reportArray.some((record) => record.includes(omittedCollectionId))).toBe(false); }); @@ -961,7 +961,7 @@ describe('When there are granule differences and granule reconciliation is run', }); afterAll(async () => { - const activeCollectionId = encodedConstructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); + const activeCollectionId = constructCollectionId(extraCumulusCollection.name, extraCumulusCollection.version); console.log(`update database state back for ${publishedGranuleId}, ${activeCollectionId}`); await updateGranule({ diff --git a/example/spec/parallel/dbRecords/DeadLetterArchiveProcessingSpec.js b/example/spec/parallel/dbRecords/DeadLetterArchiveProcessingSpec.js index bd2c43dcc36..b1d2fba77f5 100644 --- a/example/spec/parallel/dbRecords/DeadLetterArchiveProcessingSpec.js +++ b/example/spec/parallel/dbRecords/DeadLetterArchiveProcessingSpec.js @@ -29,7 +29,7 @@ const { getStateMachineArnFromExecutionArn } = require('@cumulus/message/Executi const { randomString } = require('@cumulus/common/test-utils'); const { putJsonS3Object, s3ObjectExists, deleteS3Object, getJsonS3Object } = require('@cumulus/aws-client/S3'); const { generateNewArchiveKeyForFailedMessage } = require('@cumulus/api/lambdas/process-s3-dead-letter-archive'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus, @@ -93,7 +93,7 @@ describe('A dead letter record archive processing operation', () => { fakeFileFactory({ bucket: systemBucket }), fakeFileFactory({ bucket: systemBucket }), ]; - collectionId = encodedConstructCollectionId(testCollection.name, testCollection.version); + collectionId = constructCollectionId(testCollection.name, testCollection.version); testGranule = fakeGranuleFactoryV2({ granuleId: `MOD09GQ.${randomString()}.hdf`, collectionId, diff --git a/example/spec/parallel/discoverGranules/DiscoverGranulesDuplicateHandlingSkipSpec.js b/example/spec/parallel/discoverGranules/DiscoverGranulesDuplicateHandlingSkipSpec.js index 289c8513d4a..12d13d04eb6 100644 --- a/example/spec/parallel/discoverGranules/DiscoverGranulesDuplicateHandlingSkipSpec.js +++ b/example/spec/parallel/discoverGranules/DiscoverGranulesDuplicateHandlingSkipSpec.js @@ -22,9 +22,9 @@ const { deleteExecution } = require('@cumulus/api-client/executions'); const { removeNilProperties } = require('@cumulus/common/util'); const { deleteS3Object, s3PutObject } = require('@cumulus/aws-client/S3'); const { fakeGranuleFactoryV2 } = require('@cumulus/api/lib/testUtils'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); describe('The DiscoverGranules workflow with one existing granule, one queued granule, one new granule, and duplicateHandling="skip"', () => { let beforeAllError; @@ -75,7 +75,7 @@ describe('The DiscoverGranules workflow with one existing granule, one queued gr Body: 'asdf-queued', }); - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); const randomQueuedGranuleRecord = removeNilProperties(fakeGranuleFactoryV2({ collectionId, granuleId: queuedGranuleId, diff --git a/example/spec/parallel/discoverGranules/DiscoverGranulesHttpsSpec.js b/example/spec/parallel/discoverGranules/DiscoverGranulesHttpsSpec.js index afd88592b06..7372b9a72a6 100644 --- a/example/spec/parallel/discoverGranules/DiscoverGranulesHttpsSpec.js +++ b/example/spec/parallel/discoverGranules/DiscoverGranulesHttpsSpec.js @@ -6,7 +6,7 @@ const { cleanupCollections, waitForCompletedExecution, } = require('@cumulus/integration-tests'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { loadConfig, createTimestampedTestId, createTestSuffix } = require('../../helpers/testUtils'); const { buildHttpOrHttpsProvider, createProvider } = require('../../helpers/Providers'); @@ -72,7 +72,7 @@ describe('The Discover Granules workflow with https Protocol', () => { await waitForGranuleAndDelete( config.stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); } diff --git a/example/spec/parallel/discoverGranules/DiscoverGranulesS3SuccessSpec.js b/example/spec/parallel/discoverGranules/DiscoverGranulesS3SuccessSpec.js index 4d6b95746cc..2d6c975e6ef 100644 --- a/example/spec/parallel/discoverGranules/DiscoverGranulesS3SuccessSpec.js +++ b/example/spec/parallel/discoverGranules/DiscoverGranulesS3SuccessSpec.js @@ -15,7 +15,7 @@ const { getExecution, deleteExecution } = require('@cumulus/api-client/execution const { createProvider, deleteProvider, } = require('@cumulus/api-client/providers'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus, @@ -115,7 +115,7 @@ describe('The DiscoverGranules workflow', () => { await waitForGranuleAndDelete( stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); } diff --git a/example/spec/parallel/discoverGranules/DiscoverGranulesWithExecutionNamePrefixSpec.js b/example/spec/parallel/discoverGranules/DiscoverGranulesWithExecutionNamePrefixSpec.js index 8e0d80d3b4c..95f45e885a6 100644 --- a/example/spec/parallel/discoverGranules/DiscoverGranulesWithExecutionNamePrefixSpec.js +++ b/example/spec/parallel/discoverGranules/DiscoverGranulesWithExecutionNamePrefixSpec.js @@ -19,7 +19,7 @@ const { createProvider, deleteProvider, } = require('@cumulus/api-client/providers'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { uploadS3GranuleDataForDiscovery, } = require('../../helpers/discoverUtils'); @@ -115,7 +115,7 @@ describe('The DiscoverGranules workflow', () => { await waitForGranuleAndDelete( stackName, expectedGranuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); diff --git a/example/spec/parallel/ingest/ingestFromPdrSpec.js b/example/spec/parallel/ingest/ingestFromPdrSpec.js index 544beb20383..16d7329b02a 100644 --- a/example/spec/parallel/ingest/ingestFromPdrSpec.js +++ b/example/spec/parallel/ingest/ingestFromPdrSpec.js @@ -42,7 +42,7 @@ const { } = require('@cumulus/integration-tests'); const { getExecution } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus } = require('../../helpers/apiUtils'); const { @@ -147,7 +147,7 @@ describe('Ingesting from PDR', () => { await waitForGranuleAndDelete( config.stackName, testDataGranuleId, - encodedConstructCollectionId(addedCollections[0].name, addedCollections[0].version), + constructCollectionId(addedCollections[0].name, addedCollections[0].version), 'completed' ); await apiTestUtils.deletePdr({ diff --git a/example/spec/parallel/ingest/ingestFromPdrWithChildWorkflowMetaSpec.js b/example/spec/parallel/ingest/ingestFromPdrWithChildWorkflowMetaSpec.js index 29ee912afdb..d76f55b9604 100644 --- a/example/spec/parallel/ingest/ingestFromPdrWithChildWorkflowMetaSpec.js +++ b/example/spec/parallel/ingest/ingestFromPdrWithChildWorkflowMetaSpec.js @@ -37,7 +37,7 @@ const { waitForStartedExecution, waitForCompletedExecution, } = require('@cumulus/integration-tests'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { createTestDataPath, @@ -179,7 +179,7 @@ describe('The DiscoverAndQueuePdrsChildWorkflowMeta workflow', () => { await deleteGranule({ prefix: config.stackName, granuleId: testDataGranuleId, - collectionId: encodedConstructCollectionId(addedCollections[0].name, addedCollections[0].version), + collectionId: constructCollectionId(addedCollections[0].name, addedCollections[0].version), }); await waitAndDeletePdr( config.stackName, diff --git a/example/spec/parallel/ingest/ingestFromPdrWithExecutionNamePrefixSpec.js b/example/spec/parallel/ingest/ingestFromPdrWithExecutionNamePrefixSpec.js index 6c444acffda..6baafb98c56 100644 --- a/example/spec/parallel/ingest/ingestFromPdrWithExecutionNamePrefixSpec.js +++ b/example/spec/parallel/ingest/ingestFromPdrWithExecutionNamePrefixSpec.js @@ -34,7 +34,7 @@ const { waitForCompletedExecution, waitForStartedExecution, } = require('@cumulus/integration-tests'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForExecutionAndDelete } = require('../../helpers/executionUtils'); const { waitForGranuleAndDelete } = require('../../helpers/granuleUtils'); const { waitAndDeletePdr } = require('../../helpers/pdrUtils'); @@ -187,7 +187,7 @@ describe('The DiscoverAndQueuePdrsExecutionPrefix workflow', () => { await waitForGranuleAndDelete( config.stackName, testDataGranuleId, - encodedConstructCollectionId(addedCollections[0].name, addedCollections[0].version), + constructCollectionId(addedCollections[0].name, addedCollections[0].version), 'completed' ); // clean up stack state added by test diff --git a/example/spec/parallel/ingest/ingestPdrWithNodeNameSpec.js b/example/spec/parallel/ingest/ingestPdrWithNodeNameSpec.js index af0b48dfa6f..6ac13b96738 100644 --- a/example/spec/parallel/ingest/ingestPdrWithNodeNameSpec.js +++ b/example/spec/parallel/ingest/ingestPdrWithNodeNameSpec.js @@ -42,7 +42,7 @@ const { } = require('@cumulus/integration-tests'); const { getExecution } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { createTestDataPath, createTestSuffix, @@ -397,7 +397,7 @@ describe('Ingesting from PDR', () => { // delete ingested granule(s) await Promise.all( finalOutput.payload.granules.map(async (g) => { - const id = encodedConstructCollectionId(g.dataType, g.version); + const id = constructCollectionId(g.dataType, g.version); await waitForApiStatus( getGranule, { diff --git a/example/spec/parallel/ingestGranule/IngestElevenGiBFileSpec.js b/example/spec/parallel/ingestGranule/IngestElevenGiBFileSpec.js index 90ce30c33a9..9eaf824b638 100644 --- a/example/spec/parallel/ingestGranule/IngestElevenGiBFileSpec.js +++ b/example/spec/parallel/ingestGranule/IngestElevenGiBFileSpec.js @@ -18,7 +18,7 @@ const { deleteExecution } = require('@cumulus/api-client/executions'); const { deleteGranule } = require('@cumulus/api-client/granules'); const { deleteProvider } = require('@cumulus/api-client/providers'); const { deleteRule } = require('@cumulus/api-client/rules'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); const { fetchFakeS3ProviderBuckets } = require('../../helpers/Providers'); @@ -108,7 +108,7 @@ describe('The IngestGranule workflow ingesting an 11G file', () => { // Wait for the granule to be fully ingested await getGranuleWithStatus({ prefix, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), status: 'completed' }); } catch (error) { beforeAllFailed = true; @@ -135,7 +135,7 @@ describe('The IngestGranule workflow ingesting an 11G file', () => { ).catch(console.error); await deleteExecution({ prefix: config.stackName, executionArn: ingestGranuleExecutionArn }); - await deleteGranule({ prefix, granuleId, collectionId: encodedConstructCollectionId(collection.name, collection.version) }); + await deleteGranule({ prefix, granuleId, collectionId: constructCollectionId(collection.name, collection.version) }); await pAll( [ () => deleteProvider({ prefix, providerId: get(provider, 'id') }), diff --git a/example/spec/parallel/ingestGranule/IngestGranuleFailureSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleFailureSpec.js index a52b4e47fae..453fb71649a 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleFailureSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleFailureSpec.js @@ -13,7 +13,7 @@ const { const { getExecution } = require('@cumulus/api-client/executions'); const { deleteExecution } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); const { @@ -85,7 +85,7 @@ describe('The Ingest Granule failure workflow', () => { }, ...inputPayload.granules[0].files, ]; - collectionId = encodedConstructCollectionId(inputPayload.granules[0].dataType, inputPayload.granules[0].version); + collectionId = constructCollectionId(inputPayload.granules[0].dataType, inputPayload.granules[0].version); console.log(`testSuffix: ${testSuffix}, granuleId: ${inputPayload.granules[0].granuleId}`); workflowExecution = await buildAndExecuteWorkflow( config.stackName, diff --git a/example/spec/parallel/ingestGranule/IngestGranuleFtpSuccessSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleFtpSuccessSpec.js index ef521d4fb56..6a9d6ef4d85 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleFtpSuccessSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleFtpSuccessSpec.js @@ -14,7 +14,7 @@ const { const { deleteExecution, getExecution } = require('@cumulus/api-client/executions'); const { getGranule, deleteGranule } = require('@cumulus/api-client/granules'); const { deleteProvider } = require('@cumulus/api-client/providers'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { loadConfig, createTimestampedTestId, createTestSuffix } = require('../../helpers/testUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); @@ -80,7 +80,7 @@ describe('The FTP Ingest Granules workflow', () => { { prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' ); diff --git a/example/spec/parallel/ingestGranule/IngestGranulePythonProcessingSuccessSpec.js b/example/spec/parallel/ingestGranule/IngestGranulePythonProcessingSuccessSpec.js index 5fb8f3c4d95..105fb05d6f0 100644 --- a/example/spec/parallel/ingestGranule/IngestGranulePythonProcessingSuccessSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranulePythonProcessingSuccessSpec.js @@ -17,7 +17,7 @@ const { } = require('@cumulus/api-client/providers'); const { ActivityStep } = require('@cumulus/integration-tests/sfnStep'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndStartWorkflow } = require('../../helpers/workflowUtils'); const { @@ -90,7 +90,7 @@ describe('The TestPythonProcessing workflow', () => { inputPayload = await setupTestGranuleForIngest(config.bucket, inputPayloadJson, granuleRegex, testSuffix, testDataFolder); pdrFilename = inputPayload.pdr.name; const granuleId = inputPayload.granules[0].granuleId; - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); expectedS3TagSet = [{ Key: 'granuleId', Value: granuleId }]; await Promise.all(inputPayload.granules[0].files.map((fileToTag) => diff --git a/example/spec/parallel/ingestGranule/IngestGranuleSuccessSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleSuccessSpec.js index 422e65b192e..697370fe490 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleSuccessSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleSuccessSpec.js @@ -55,7 +55,7 @@ const { const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); const { getExecution } = require('@cumulus/api-client/executions'); const { getPdr } = require('@cumulus/api-client/pdrs'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus } = require('../../helpers/apiUtils'); const { @@ -141,7 +141,7 @@ describe('The S3 Ingest Granules workflow', () => { testDataFolder = createTestDataPath(testId); collection = { name: `MOD09GQ${testSuffix}`, version: '006' }; - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); provider = { id: `s3_provider${testSuffix}` }; process.env.system_bucket = config.bucket; @@ -237,7 +237,7 @@ describe('The S3 Ingest Granules workflow', () => { // process.env.DISTRIBUTION_ENDPOINT needs to be set for below setDistributionApiEnvVars(); - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); console.log('Start SuccessExecution'); workflowExecutionArn = await buildAndStartWorkflow( @@ -443,7 +443,7 @@ describe('The S3 Ingest Granules workflow', () => { it('adds LZARDS backup output', () => { const dataType = lambdaOutput.meta.input_granules[0].dataType; const version = lambdaOutput.meta.input_granules[0].version; - const expectedCollectionId = encodedConstructCollectionId(dataType, version); + const expectedCollectionId = constructCollectionId(dataType, version); expect(true, lambdaOutput.meta.backupStatus.every((file) => file.status === 'COMPLETED')); expect(lambdaOutput.meta.backupStatus[0].provider).toBe(provider.id); expect(lambdaOutput.meta.backupStatus[0].createdAt).toBe(lambdaOutput.meta.input_granules[0].createdAt); diff --git a/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingErrorSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingErrorSpec.js index 1c28eb7cf2c..62e1808a2ec 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingErrorSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingErrorSpec.js @@ -21,7 +21,7 @@ const { deleteRule } = require('@cumulus/api-client/rules'); const { deleteS3Object, s3PutObject } = require('@cumulus/aws-client/S3'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); describe('The IngestGranuleCatchDuplicateErrorTest workflow with DuplicateHandling = "error" and a granule re-ingested', () => { @@ -127,7 +127,7 @@ describe('The IngestGranuleCatchDuplicateErrorTest workflow with DuplicateHandli // Wait for the granule to be fully ingested await getGranuleWithStatus({ prefix, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), status: 'completed' }); // Re-ingest the granule @@ -221,7 +221,7 @@ describe('The IngestGranuleCatchDuplicateErrorTest workflow with DuplicateHandli await deleteGranule({ prefix, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version) }); + collectionId: constructCollectionId(collection.name, collection.version) }); await Promise.all([ deleteExecution({ prefix: config.stackName, executionArn: ingestGranuleExecutionArn1 }), deleteExecution({ prefix: config.stackName, executionArn: ingestGranuleExecution2Arn }), diff --git a/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingVersionSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingVersionSpec.js index d4f2a3fa09f..ac8aa8cf485 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingVersionSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleWithDuplicateHandlingVersionSpec.js @@ -23,7 +23,7 @@ const { deleteRule } = require('@cumulus/api-client/rules'); const { deleteS3Object, s3PutObject } = require('@cumulus/aws-client/S3'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); describe('The IngestGranule workflow with DuplicateHandling="version" and a granule re-ingested with one new file, one unchanged existing file, and one modified file', () => { @@ -144,7 +144,7 @@ describe('The IngestGranule workflow with DuplicateHandling="version" and a gran // Wait for the granule to be fully ingested await getGranuleWithStatus({ prefix, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), status: 'completed' }); // Modify the contents of the updated granule file @@ -259,7 +259,7 @@ describe('The IngestGranule workflow with DuplicateHandling="version" and a gran { stopOnError: false } ).catch(console.error); - await deleteGranule({ prefix, granuleId, collectionId: encodedConstructCollectionId(collection.name, collection.version) }); + await deleteGranule({ prefix, granuleId, collectionId: constructCollectionId(collection.name, collection.version) }); await Promise.all([ deleteExecution({ prefix: config.stackName, executionArn: ingestGranuleExecution2Arn }), deleteExecution({ prefix: config.stackName, executionArn: ingestGranuleExecution1Arn }), diff --git a/example/spec/parallel/ingestGranule/IngestGranuleWithModificationSpec.js b/example/spec/parallel/ingestGranule/IngestGranuleWithModificationSpec.js index 431c237a216..fa8ca8ae44a 100644 --- a/example/spec/parallel/ingestGranule/IngestGranuleWithModificationSpec.js +++ b/example/spec/parallel/ingestGranule/IngestGranuleWithModificationSpec.js @@ -23,7 +23,7 @@ const { deleteExecution } = require('@cumulus/api-client/executions'); const { deleteProvider } = require('@cumulus/api-client/providers'); const { deleteRule } = require('@cumulus/api-client/rules'); const { deleteS3Object, s3PutObject } = require('@cumulus/aws-client/S3'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); @@ -79,7 +79,7 @@ describe('The IngestGranule workflow with a granule re-ingested with the collect const ingestTime = Date.now() - 1000 * 30; // Ingest granule the first time - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); ingestGranuleRule1 = await createOneTimeRule( prefix, { @@ -151,7 +151,7 @@ describe('The IngestGranule workflow with a granule re-ingested with the collect granules: [ { granuleId, - collectionId: encodedConstructCollectionId(newCollection.name, newCollection.version), + collectionId: constructCollectionId(newCollection.name, newCollection.version), version: collection.version, files: [ { diff --git a/example/spec/parallel/ingestGranule/IngestUMMGSuccessSpec.js b/example/spec/parallel/ingestGranule/IngestUMMGSuccessSpec.js index beff40aba1b..a4f6e8de1f7 100644 --- a/example/spec/parallel/ingestGranule/IngestUMMGSuccessSpec.js +++ b/example/spec/parallel/ingestGranule/IngestUMMGSuccessSpec.js @@ -35,7 +35,7 @@ const { getTEARequestHeaders, } = require('@cumulus/integration-tests/api/distribution'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig, @@ -131,7 +131,7 @@ describe('The S3 Ingest Granules workflow configured to ingest UMM-G', () => { collection = { name: `MOD09GQ${testSuffix}`, version: '006' }; provider = { id: `s3_provider${testSuffix}` }; - const newCollectionId = encodedConstructCollectionId(collection.name, collection.version); + const newCollectionId = constructCollectionId(collection.name, collection.version); process.env.system_bucket = config.bucket; @@ -215,7 +215,7 @@ describe('The S3 Ingest Granules workflow configured to ingest UMM-G', () => { await removePublishedGranule({ prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }); await apiTestUtils.deletePdr({ prefix: config.stackName, @@ -517,7 +517,7 @@ describe('The S3 Ingest Granules workflow configured to ingest UMM-G', () => { const moveGranuleResponse = await moveGranule({ prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), destinations, }); diff --git a/example/spec/parallel/ingestGranule/ingestGranuleQueueSpec.js b/example/spec/parallel/ingestGranule/ingestGranuleQueueSpec.js index f897c5a23df..57883c77d35 100644 --- a/example/spec/parallel/ingestGranule/ingestGranuleQueueSpec.js +++ b/example/spec/parallel/ingestGranule/ingestGranuleQueueSpec.js @@ -29,7 +29,7 @@ const { getTEARequestHeaders, } = require('@cumulus/integration-tests/api/distribution'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndStartWorkflow } = require('../../helpers/workflowUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); @@ -92,7 +92,7 @@ describe('The S3 Ingest Granules workflow', () => { testDataFolder = createTestDataPath(testId); collection = { name: `MOD09GQ${testSuffix}`, version: '006' }; - const newCollectionId = encodedConstructCollectionId(collection.name, collection.version); + const newCollectionId = constructCollectionId(collection.name, collection.version); provider = { id: `s3_provider${testSuffix}` }; process.env.system_bucket = config.bucket; @@ -191,7 +191,7 @@ describe('The S3 Ingest Granules workflow', () => { // process.env.DISTRIBUTION_ENDPOINT needs to be set for below setDistributionApiEnvVars(); - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); console.log('Start SuccessExecution'); workflowExecutionArn = await buildAndStartWorkflow( diff --git a/example/spec/parallel/lzardsBackup/LzardsBackupFromDistributionSpec.js b/example/spec/parallel/lzardsBackup/LzardsBackupFromDistributionSpec.js index 1362a1a9891..219b1db09f5 100644 --- a/example/spec/parallel/lzardsBackup/LzardsBackupFromDistributionSpec.js +++ b/example/spec/parallel/lzardsBackup/LzardsBackupFromDistributionSpec.js @@ -10,7 +10,7 @@ const { deleteCollection } = require('@cumulus/api-client/collections'); const { lambda } = require('@cumulus/aws-client/services'); const { putFile } = require('@cumulus/aws-client/S3'); const { randomString } = require('@cumulus/common/test-utils'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); @@ -151,7 +151,7 @@ describe('The Lzards Backup Task with distribution URL', () => { expect(backupStatus[0].granuleId).toBe(granuleId); expect(backupStatus[0].provider).toBe(provider); expect(backupStatus[0].createdAt).toBe(now); - expect(backupStatus[0].collectionId).toBe(encodedConstructCollectionId(collection.name, collection.version)); + expect(backupStatus[0].collectionId).toBe(constructCollectionId(collection.name, collection.version)); }); afterAll(async () => { diff --git a/example/spec/parallel/lzardsBackup/LzardsBackupSpec.js b/example/spec/parallel/lzardsBackup/LzardsBackupSpec.js index 29e30e50c78..1c9891c8245 100644 --- a/example/spec/parallel/lzardsBackup/LzardsBackupSpec.js +++ b/example/spec/parallel/lzardsBackup/LzardsBackupSpec.js @@ -10,7 +10,7 @@ const { deleteCollection } = require('@cumulus/api-client/collections'); const { lambda } = require('@cumulus/aws-client/services'); const { putFile } = require('@cumulus/aws-client/S3'); const { randomString } = require('@cumulus/common/test-utils'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); describe('The Lzards Backup Task ', () => { @@ -182,6 +182,7 @@ describe('The Lzards Backup Task ', () => { }); it('has the expected backup information', () => { + if (beforeAllFailed) fail('beforeAll() failed'); const backupStatus = JSON.parse(lzardsBackupOutput.Payload).meta.backupStatus; console.log(`backupStatus: ${JSON.stringify(backupStatus)}`); expect(backupStatus[0].status).toBe('COMPLETED'); @@ -189,7 +190,7 @@ describe('The Lzards Backup Task ', () => { expect(backupStatus[0].granuleId).toBe(granuleId); expect(backupStatus[0].provider).toBe(provider); expect(backupStatus[0].createdAt).toBe(tenMinutesAgo); - expect(backupStatus[0].collectionId).toBe(encodedConstructCollectionId(collection.name, collection.version)); + expect(backupStatus[0].collectionId).toBe(constructCollectionId(collection.name, collection.version)); }); describe('The Lzards API Client', () => { diff --git a/example/spec/parallel/multiQueue/DiscoverGranulesMultiQueueSpec.js b/example/spec/parallel/multiQueue/DiscoverGranulesMultiQueueSpec.js index 1d671dc17f8..77bec2519b2 100644 --- a/example/spec/parallel/multiQueue/DiscoverGranulesMultiQueueSpec.js +++ b/example/spec/parallel/multiQueue/DiscoverGranulesMultiQueueSpec.js @@ -16,7 +16,7 @@ const { getExecution, deleteExecution } = require('@cumulus/api-client/execution const { getGranule } = require('@cumulus/api-client/granules'); const { deleteProvider } = require('@cumulus/api-client/providers'); const { deleteRule } = require('@cumulus/api-client/rules'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus, } = require('../../helpers/apiUtils'); @@ -140,7 +140,7 @@ describe('The DiscoverGranules workflow', () => { await waitForGranuleAndDelete( stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); } @@ -213,7 +213,7 @@ describe('The DiscoverGranules workflow', () => { else { const granules = await Promise.all(testGranuleIds.map((granuleId) => waitForApiStatus( getGranule, - { prefix: stackName, granuleId, collectionId: encodedConstructCollectionId(collection.name, collection.version) }, + { prefix: stackName, granuleId, collectionId: constructCollectionId(collection.name, collection.version) }, 'completed' ))); granules.forEach((g) => { diff --git a/example/spec/parallel/orca/OrcaBackupAndRecoverySpec.js b/example/spec/parallel/orca/OrcaBackupAndRecoverySpec.js index e21a7fd9dce..20ba29a243b 100644 --- a/example/spec/parallel/orca/OrcaBackupAndRecoverySpec.js +++ b/example/spec/parallel/orca/OrcaBackupAndRecoverySpec.js @@ -20,7 +20,7 @@ const { waitForCompletedExecution, } = require('@cumulus/integration-tests'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { removeCollectionAndAllDependencies } = require('../../helpers/Collections'); const { buildAndStartWorkflow } = require('../../helpers/workflowUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); @@ -100,7 +100,7 @@ describe('The S3 Ingest Granules workflow', () => { { prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' ); @@ -168,7 +168,7 @@ describe('The S3 Ingest Granules workflow', () => { prefix: config.stackName, granules: [{ granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }], workflowName: recoveryWorkflowName, }); @@ -202,7 +202,7 @@ describe('The S3 Ingest Granules workflow', () => { { prefix: config.stackName, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' @@ -277,7 +277,7 @@ describe('The S3 Ingest Granules workflow', () => { const granule = await getGranule({ prefix: config.stackName, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), query: { getRecoveryStatus: true }, }); expect(granule.granuleId).toEqual(granuleId); diff --git a/example/spec/parallel/queueGranules/QueueGranulesSpec.js b/example/spec/parallel/queueGranules/QueueGranulesSpec.js index ab4e26f5dc1..3240296dd92 100644 --- a/example/spec/parallel/queueGranules/QueueGranulesSpec.js +++ b/example/spec/parallel/queueGranules/QueueGranulesSpec.js @@ -12,7 +12,7 @@ const { sqs } = require('@cumulus/aws-client/services'); const { randomString } = require('@cumulus/common/test-utils'); const { getGranule } = require('@cumulus/api-client/granules'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus, } = require('../../helpers/apiUtils'); @@ -131,7 +131,7 @@ describe('The Queue Granules workflow', () => { await waitForGranuleAndDelete( config.stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'queued' ); }) @@ -172,7 +172,7 @@ describe('The Queue Granules workflow', () => { { prefix: config.stackName, granuleId: granule.granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'queued' ); diff --git a/example/spec/parallel/queueGranules/queueGranulesPostProcessingSpec.js b/example/spec/parallel/queueGranules/queueGranulesPostProcessingSpec.js index 905ae6d4980..73747159fd3 100644 --- a/example/spec/parallel/queueGranules/queueGranulesPostProcessingSpec.js +++ b/example/spec/parallel/queueGranules/queueGranulesPostProcessingSpec.js @@ -15,7 +15,7 @@ const { getGranule } = require('@cumulus/api-client/granules'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { loadConfig, @@ -129,7 +129,7 @@ describe('The Queue Granules workflow triggered with a database-schema-compliant await waitForGranuleAndDelete( config.stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); }) @@ -202,7 +202,7 @@ describe('The Queue Granules workflow triggered with a database-schema-compliant inputPayload.granules.map(async (granule) => { const record = await waitForApiStatus( getGranule, - { prefix: config.stackName, granuleId: granule.granuleId, collectionId: encodedConstructCollectionId(collection.name, collection.version) }, + { prefix: config.stackName, granuleId: granule.granuleId, collectionId: constructCollectionId(collection.name, collection.version) }, 'completed' ); diff --git a/example/spec/parallel/syncGranule/SyncGranuleDuplicateHandlingSpec.js b/example/spec/parallel/syncGranule/SyncGranuleDuplicateHandlingSpec.js index d1b96520b58..9950f46de07 100644 --- a/example/spec/parallel/syncGranule/SyncGranuleDuplicateHandlingSpec.js +++ b/example/spec/parallel/syncGranule/SyncGranuleDuplicateHandlingSpec.js @@ -16,7 +16,7 @@ const { cleanupProviders, } = require('@cumulus/integration-tests'); const { getExecutionUrlFromArn } = require('@cumulus/message/Executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { @@ -79,7 +79,7 @@ describe('When the Sync Granule workflow is configured', () => { collection = { name: `MOD09GQ${testSuffix}`, version: '006' }; provider = { id: `s3_provider${testSuffix}` }; - const newCollectionId = encodedConstructCollectionId(collection.name, collection.version); + const newCollectionId = constructCollectionId(collection.name, collection.version); // populate collections, providers and test data await Promise.all([ @@ -139,7 +139,7 @@ describe('When the Sync Granule workflow is configured', () => { await waitForGranuleAndDelete( config.stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), ['completed', 'failed'] ); } diff --git a/example/spec/parallel/syncGranule/SyncGranuleSuccessSpec.js b/example/spec/parallel/syncGranule/SyncGranuleSuccessSpec.js index 357161bd018..c5b80a5deb2 100644 --- a/example/spec/parallel/syncGranule/SyncGranuleSuccessSpec.js +++ b/example/spec/parallel/syncGranule/SyncGranuleSuccessSpec.js @@ -21,7 +21,7 @@ const { } = require('@cumulus/aws-client/S3'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); const { getExecution } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { waitForApiStatus } = require('../../helpers/apiUtils'); @@ -81,7 +81,7 @@ describe('The Sync Granules workflow', () => { collection = { name: `MOD09GQ${testSuffix}`, version: '006' }; provider = { id: `s3_provider${testSuffix}` }; - const newCollectionId = encodedConstructCollectionId(collection.name, collection.version); + const newCollectionId = constructCollectionId(collection.name, collection.version); // populate collections, providers and test data await Promise.all([ @@ -158,7 +158,7 @@ describe('The Sync Granules workflow', () => { // clean up stack state added by test await Promise.all(inputPayload.granules.map( async (granule) => { - const collectionId = encodedConstructCollectionId(collection.name, collection.version); + const collectionId = constructCollectionId(collection.name, collection.version); await waitForGranuleAndDelete( config.stackName, granule.granuleId, @@ -291,7 +291,7 @@ describe('The Sync Granules workflow', () => { granule = await getGranule({ prefix: config.stackName, granuleId: newGranuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }); oldUpdatedAt = granule.updatedAt; @@ -299,7 +299,7 @@ describe('The Sync Granules workflow', () => { const reingestGranuleResponse = await reingestGranule({ prefix: config.stackName, granuleId: newGranuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }); reingestResponse = JSON.parse(reingestGranuleResponse.body); }); @@ -347,7 +347,7 @@ describe('The Sync Granules workflow', () => { { prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' ); @@ -355,7 +355,7 @@ describe('The Sync Granules workflow', () => { const updatedGranule = await getGranule({ prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }); expect(updatedGranule.status).toEqual('completed'); diff --git a/example/spec/parallel/testAPI/bulkDeleteFailureSpec.js b/example/spec/parallel/testAPI/bulkDeleteFailureSpec.js index 55894bfba6d..76cc6fdfd8f 100644 --- a/example/spec/parallel/testAPI/bulkDeleteFailureSpec.js +++ b/example/spec/parallel/testAPI/bulkDeleteFailureSpec.js @@ -15,7 +15,7 @@ const { } = require('@cumulus/api-client/granules'); const { createCollection, deleteCollection } = require('@cumulus/api-client/collections'); const { createExecution, deleteExecution } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { isValidAsyncOperationId, loadConfig, createTimestampedTestId } = require('../../helpers/testUtils'); @@ -63,7 +63,7 @@ describe('POST /granules/bulkDelete with a failed bulk delete operation', () => granule = fakeGranuleFactoryV2({ published: true, execution: execution.execution, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }); await createGranule({ prefix, diff --git a/example/spec/parallel/testAPI/bulkDeleteSuccessSpec.js b/example/spec/parallel/testAPI/bulkDeleteSuccessSpec.js index b27cdc29883..eb4be1e0108 100644 --- a/example/spec/parallel/testAPI/bulkDeleteSuccessSpec.js +++ b/example/spec/parallel/testAPI/bulkDeleteSuccessSpec.js @@ -26,7 +26,7 @@ const { const { getGranuleWithStatus } = require('@cumulus/integration-tests/Granules'); const { createProvider } = require('@cumulus/integration-tests/Providers'); const { createOneTimeRule } = require('@cumulus/integration-tests/Rules'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { createTimestampedTestId, createTestSuffix, @@ -158,14 +158,14 @@ describe('POST /granules/bulkDelete', () => { // Wait for the granule to be fully ingested ingestedGranule = await getGranuleWithStatus({ prefix, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), status: 'completed' }); timestampBeforeCall = Date.now(); postBulkDeleteResponse = await granules.bulkDeleteGranules( { prefix, body: { - granules: [{ granuleId, collectionId: encodedConstructCollectionId(collection.name, collection.version) }], + granules: [{ granuleId, collectionId: constructCollectionId(collection.name, collection.version) }], // required to force removal of granules from CMR before deletion forceRemoveFromCmr: true, }, diff --git a/example/spec/parallel/testAPI/bulkOperationsSuccessSpec.js b/example/spec/parallel/testAPI/bulkOperationsSuccessSpec.js index f200fb7414b..3b8ca699e57 100644 --- a/example/spec/parallel/testAPI/bulkOperationsSuccessSpec.js +++ b/example/spec/parallel/testAPI/bulkOperationsSuccessSpec.js @@ -26,7 +26,7 @@ const { const { getGranuleWithStatus } = require('@cumulus/integration-tests/Granules'); const { createProvider } = require('@cumulus/integration-tests/Providers'); const { createOneTimeRule } = require('@cumulus/integration-tests/Rules'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { createTimestampedTestId, @@ -102,7 +102,7 @@ describe('POST /granules/bulk', () => { Body: 'asdf', }); - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); granuleId = randomId('granule-id-'); console.log('granuleId', granuleId); diff --git a/example/spec/parallel/testAPI/executionSpec.js b/example/spec/parallel/testAPI/executionSpec.js index 242e5013ba1..1a95ce9d87a 100644 --- a/example/spec/parallel/testAPI/executionSpec.js +++ b/example/spec/parallel/testAPI/executionSpec.js @@ -16,7 +16,7 @@ const { fakeExecutionFactoryV2 } = require('@cumulus/api/lib/testUtils'); const { randomId } = require('@cumulus/common/test-utils'); const { createCollection } = require('@cumulus/integration-tests/Collections'); const { findExecutionArn } = require('@cumulus/integration-tests/Executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); describe('The Executions API', () => { @@ -37,7 +37,7 @@ describe('The Executions API', () => { prefix = config.stackName; collection = await createCollection(prefix); - collectionId = encodedConstructCollectionId(collection.name, collection.version); + collectionId = constructCollectionId(collection.name, collection.version); executionRecord = omit(fakeExecutionFactoryV2({ collectionId, @@ -136,7 +136,7 @@ describe('The Executions API', () => { const name = randomId('name'); const version = randomId('version'); const badRandomExecutionRecord = fakeExecutionFactoryV2({ - collectionId: encodedConstructCollectionId(name, version), + collectionId: constructCollectionId(name, version), }); try { await createExecution({ diff --git a/example/spec/parallel/testAPI/granuleSpec.js b/example/spec/parallel/testAPI/granuleSpec.js index a43cc1b792d..2a977c079b2 100644 --- a/example/spec/parallel/testAPI/granuleSpec.js +++ b/example/spec/parallel/testAPI/granuleSpec.js @@ -27,7 +27,7 @@ const { fakeExecutionFactoryV2, fakeGranuleFactoryV2, } = require('@cumulus/api/lib/testUtils'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { loadConfig } = require('../../helpers/testUtils'); @@ -58,7 +58,7 @@ describe('The Granules API', () => { prefix = config.stackName; collection1 = await createCollection(prefix); - collectionId = encodedConstructCollectionId(collection1.name, collection1.version); + collectionId = constructCollectionId(collection1.name, collection1.version); executionRecord = omit(fakeExecutionFactoryV2({ collectionId, @@ -245,7 +245,7 @@ describe('The Granules API', () => { const name = randomId('name'); const version = randomId('version'); const badRandomGranuleRecord = fakeGranuleFactoryV2({ - collectionId: encodedConstructCollectionId(name, version), + collectionId: constructCollectionId(name, version), execution: undefined, }); try { @@ -321,7 +321,7 @@ describe('The Granules API', () => { fail(beforeAllError); } collection2 = await createCollection(prefix); - const newCollectionId = encodedConstructCollectionId(collection2.name, collection2.version); + const newCollectionId = constructCollectionId(collection2.name, collection2.version); granule1 = removeNilProperties(fakeGranuleFactoryV2({ collectionId: newCollectionId, published: false, @@ -333,7 +333,7 @@ describe('The Granules API', () => { body: granule1, }); collection3 = await createCollection(prefix); - const diffCollectionId = encodedConstructCollectionId(collection3.name, collection3.version); + const diffCollectionId = constructCollectionId(collection3.name, collection3.version); const granuleWithDiffCollection = { ...granule1, collectionId: diffCollectionId, @@ -359,7 +359,7 @@ describe('The Granules API', () => { fail(beforeAllError); } collection4 = await createCollection(prefix); - const newCollectionId = encodedConstructCollectionId(collection4.name, collection4.version); + const newCollectionId = constructCollectionId(collection4.name, collection4.version); invalidModifiedGranule = removeNilProperties(fakeGranuleFactoryV2({ collectionId: newCollectionId, published: false, @@ -371,7 +371,7 @@ describe('The Granules API', () => { body: invalidModifiedGranule, }); collection5 = await createCollection(prefix); - const diffCollectionId = encodedConstructCollectionId(collection5.name, collection5.version); + const diffCollectionId = constructCollectionId(collection5.name, collection5.version); const granuleWithDiffCollection = { ...invalidModifiedGranule, collectionId: diffCollectionId, diff --git a/example/spec/parallel/testAPI/sqsRuleSpec.js b/example/spec/parallel/testAPI/sqsRuleSpec.js index 532684da8c6..34515331d48 100644 --- a/example/spec/parallel/testAPI/sqsRuleSpec.js +++ b/example/spec/parallel/testAPI/sqsRuleSpec.js @@ -35,7 +35,7 @@ const { sleep } = require('@cumulus/common'); const { randomId } = require('@cumulus/common/test-utils'); const { getExecutions } = require('@cumulus/api-client/executions'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus } = require('../../helpers/apiUtils'); const { setupTestGranuleForIngest } = require('../../helpers/granuleUtils'); @@ -98,7 +98,7 @@ async function cleanUp() { prefix: config.stackName, query: { fields: ['arn'], - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, })).body).results; await Promise.all(executions.map( @@ -109,7 +109,7 @@ async function cleanUp() { await Promise.all(inputPayload.granules.map( (granule) => deleteGranule({ prefix: config.stackName, granuleId: granule.granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version) }) + collectionId: constructCollectionId(collection.name, collection.version) }) )); await apiTestUtils.deletePdr({ @@ -256,7 +256,7 @@ describe('The SQS rule', () => { { prefix: config.stackName, granuleId, - collectionId: encodedConstructCollectionId(collection.name, collection.version), + collectionId: constructCollectionId(collection.name, collection.version), }, 'completed' ); diff --git a/example/spec/serial/DiscoverGranulesHttpSpec.js b/example/spec/serial/DiscoverGranulesHttpSpec.js index b19b09b68f5..869c4939784 100644 --- a/example/spec/serial/DiscoverGranulesHttpSpec.js +++ b/example/spec/serial/DiscoverGranulesHttpSpec.js @@ -10,6 +10,7 @@ const { waitForCompletedExecution, } = require('@cumulus/integration-tests'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildAndExecuteWorkflow } = require('../helpers/workflowUtils'); const { waitForApiStatus } = require('../helpers/apiUtils'); const { @@ -19,7 +20,6 @@ const { } = require('../helpers/testUtils'); const { buildHttpOrHttpsProvider, createProvider } = require('../helpers/Providers'); const { waitForGranuleAndDelete } = require('../helpers/granuleUtils'); -const { encodedConstructCollectionId } = require('../helpers/Collections'); const workflowName = 'DiscoverGranules'; @@ -115,7 +115,7 @@ describe('The Discover Granules workflow with http Protocol', () => { await waitForGranuleAndDelete( config.stackName, granule.granuleId, - encodedConstructCollectionId(collection.name, collection.version), + constructCollectionId(collection.name, collection.version), 'completed' ); } diff --git a/example/spec/serial/ingestPdrWithNodeNameFtpSpec.js b/example/spec/serial/ingestPdrWithNodeNameFtpSpec.js index 303d05acf9b..ee2a6633e12 100644 --- a/example/spec/serial/ingestPdrWithNodeNameFtpSpec.js +++ b/example/spec/serial/ingestPdrWithNodeNameFtpSpec.js @@ -23,8 +23,8 @@ const { waitForCompletedExecution, } = require('@cumulus/integration-tests'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { buildFtpProvider } = require('../helpers/Providers'); -const { encodedConstructCollectionId } = require('../helpers/Collections'); const { buildAndExecuteWorkflow } = require('../helpers/workflowUtils'); const { createTestDataPath, @@ -351,7 +351,7 @@ describe('Ingesting from PDR', () => { // delete ingested granule(s) await Promise.all( finalOutput.payload.granules.map(async (g) => { - const newCollectionId = encodedConstructCollectionId(addedCollection.name, addedCollection.version); + const newCollectionId = constructCollectionId(addedCollection.name, addedCollection.version); await waitForApiStatus( getGranule, { diff --git a/example/spec/serial/multiQueue/ParsePdrBatchQueueSpec.js b/example/spec/serial/multiQueue/ParsePdrBatchQueueSpec.js index be7943a144c..c1570fa3b7f 100644 --- a/example/spec/serial/multiQueue/ParsePdrBatchQueueSpec.js +++ b/example/spec/serial/multiQueue/ParsePdrBatchQueueSpec.js @@ -13,11 +13,11 @@ const { createProvider } = require('@cumulus/integration-tests/Providers'); const { LambdaStep } = require('@cumulus/integration-tests/sfnStep'); const { getExecution } = require('@cumulus/api-client/executions'); +const { constructCollectionId } = require('@cumulus/message/Collections'); const { waitForApiStatus } = require('../../helpers/apiUtils'); const { waitForGranuleAndDelete } = require('../../helpers/granuleUtils'); const { buildAndExecuteWorkflow } = require('../../helpers/workflowUtils'); const { deleteProvidersAndAllDependenciesByHost } = require('../../helpers/Providers'); -const { encodedConstructCollectionId } = require('../../helpers/Collections'); const { createTimestampedTestId, @@ -205,7 +205,7 @@ describe('Parsing a PDR with multiple data types and node names', () => { await Promise.all(testGranuleIds.map( (granuleId) => waitForGranuleAndDelete(stackName, granuleId, - ((found) => encodedConstructCollectionId(found.dataType, found.version))(parsePdrOutput.payload.granules.find((ele) => ele.granuleId === granuleId)), + ((found) => constructCollectionId(found.dataType, found.version))(parsePdrOutput.payload.granules.find((ele) => ele.granuleId === granuleId)), 'completed') )); await deletePdr({ prefix: stackName, pdrName }); @@ -272,7 +272,7 @@ describe('Parsing a PDR with multiple data types and node names', () => { getGranule, { prefix: stackName, granuleId, - collectionId: ((found) => encodedConstructCollectionId(found.dataType, found.version))(parsePdrOutput.payload.granules.find((ele) => ele.granuleId === granuleId)) }, + collectionId: ((found) => constructCollectionId(found.dataType, found.version))(parsePdrOutput.payload.granules.find((ele) => ele.granuleId === granuleId)) }, 'completed' ))); granules.forEach((g) => { diff --git a/lambdas/db-migration/package.json b/lambdas/db-migration/package.json index 17293259362..46891727638 100644 --- a/lambdas/db-migration/package.json +++ b/lambdas/db-migration/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/db-migration-lambda", - "version": "16.1.3", + "version": "16.1.4", "description": "A Lambda function used for deploying DB migrations", "license": "Apache-2.0", "engines": { @@ -20,7 +20,7 @@ "tsc:listEmittedFiles": "../../node_modules/.bin/tsc --listEmittedFiles" }, "dependencies": { - "@cumulus/db": "16.1.3", + "@cumulus/db": "16.1.4", "knex": "2.4.1", "pg": "~8.10" } diff --git a/lambdas/db-provision-user-database/package.json b/lambdas/db-provision-user-database/package.json index 996fcf6f070..4c8a6f319f9 100644 --- a/lambdas/db-provision-user-database/package.json +++ b/lambdas/db-provision-user-database/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/db-provision-user-database-lambda", - "version": "16.1.3", + "version": "16.1.4", "description": "A Lambda function used for provisioning user databases", "engines": { "node": ">=16.19.0" @@ -26,8 +26,8 @@ "timeout": "2m" }, "dependencies": { - "@cumulus/common": "16.1.3", - "@cumulus/db": "16.1.3", + "@cumulus/common": "16.1.4", + "@cumulus/db": "16.1.4", "knex": "2.4.1", "pg": "~8.10" }, diff --git a/lambdas/sqs-message-remover/package.json b/lambdas/sqs-message-remover/package.json index 5a69bc6172c..22ae3a7f6dc 100644 --- a/lambdas/sqs-message-remover/package.json +++ b/lambdas/sqs-message-remover/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/sqs-message-remover-lambda", - "version": "16.1.3", + "version": "16.1.4", "description": "Remove processed messages from SQS queues", "main": "src/index.js", "private": true, @@ -37,10 +37,10 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/logger": "16.1.4", "lodash": "^4.17.21" } } diff --git a/lerna.json b/lerna.json index 9a6320c08f4..83ecd05a1a1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "3.20.2", - "version": "16.1.3", + "version": "16.1.4", "packages": [ "example", "example/lambdas/*", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 7eb1991c7c7..dc2197081e3 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/api-client", - "version": "16.1.3", + "version": "16.1.4", "description": "API client for working with the Cumulus archive API", "keywords": [ "GIBS", @@ -39,11 +39,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/logger": "16.1.4", "p-retry": "^2.0.0" }, "devDependencies": { - "@cumulus/types": "16.1.3" + "@cumulus/types": "16.1.4" } } diff --git a/packages/api-client/src/granules.ts b/packages/api-client/src/granules.ts index 0a484e13235..305a157defb 100644 --- a/packages/api-client/src/granules.ts +++ b/packages/api-client/src/granules.ts @@ -15,21 +15,30 @@ type AssociateExecutionRequest = { executionArn: string }; +const encodeGranulesURIComponent = ( + granuleId: string, + collectionId: string | undefined +): string => + (collectionId + ? `/granules/${encodeURIComponent(collectionId)}/${encodeURIComponent(granuleId)}` + : `/granules/${encodeURIComponent(granuleId)}`); // Fetching a granule without a collectionId is supported but deprecated + /** * GET raw response from /granules/{granuleId} or /granules/{collectionId}/{granuleId} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Object} [params.query] - query to pass the API lambda - * @param {number[] | number} params.expectedStatusCodes - the statusCodes which the granule API is - * is expecting for the invokeApi Response, - * default is 200 - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload, - * cumulusApiClient.invokeApifunction - * is the default to invoke the api lambda - * @returns {Promise} - the granule fetched by the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param [params.query] - query to pass the API lambda + * @param params.expectedStatusCodes - the statusCodes which the granule API is + * is expecting for the invokeApi Response, + * default is 200 + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload, + * cumulusApiClient.invokeApifunction + * is the default to invoke the api lambda + * @returns - the granule fetched by the API */ export const getGranuleResponse = async (params: { prefix: string, @@ -48,12 +57,7 @@ export const getGranuleResponse = async (params: { callback = invokeApi, } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix, @@ -70,15 +74,17 @@ export const getGranuleResponse = async (params: { /** * GET granule record from /granules/{granuleId} or /granules/{collectionId}/{granuleId} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Object} [params.query] - query to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the granule fetched by the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param [params.query] - query to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to + * invoke the + * api lambda + * @returns - the granule fetched by the API */ export const getGranule = async (params: { prefix: string, @@ -94,13 +100,16 @@ export const getGranule = async (params: { /** * Wait for a granule to be present in the database (using pRetry) * - * @param {Object} params - params - * @param {string} params.granuleId - granuleId to wait for - * @param {number} params.retries - number of times to retry - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - granuleId to wait for + * @param [params.status] - expected granule status + * @param [params.retries] - number of times to retry + * @param [params.pRetryOptions] - options for pRetry + * @param [params.callback] - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda */ export const waitForGranule = async (params: { prefix: string, @@ -156,16 +165,17 @@ export const waitForGranule = async (params: { * Reingest a granule from the Cumulus API * PATCH /granules/{} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {string} params.workflowName - Optional WorkflowName - * @param {string} params.executionArn - Optional executionArn - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the granule fetched by the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.workflowName - Optional WorkflowName + * @param params.executionArn - Optional executionArn + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the granule fetched by the API */ export const reingestGranule = async (params: { prefix: string, @@ -184,12 +194,7 @@ export const reingestGranule = async (params: { callback = invokeApi, } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix: prefix, @@ -214,14 +219,15 @@ export const reingestGranule = async (params: { * Removes a granule from CMR via the Cumulus API * PATCH /granules/{granuleId} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the granule fetched by the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the granule fetched by the API */ export const removeFromCMR = async (params: { prefix: string, @@ -231,12 +237,7 @@ export const removeFromCMR = async (params: { }): Promise => { const { prefix, granuleId, collectionId, callback = invokeApi } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix: prefix, @@ -257,15 +258,17 @@ export const removeFromCMR = async (params: { * Run a workflow with the given granule as the payload * PATCH /granules/{granuleId} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {string} params.workflow - workflow to be run with given granule - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the granule fetched by the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.workflow - workflow to be run with given granule + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @param [params.meta] - metadata + * @returns - the granule fetched by the API */ export const applyWorkflow = async (params: { prefix: string, @@ -284,12 +287,7 @@ export const applyWorkflow = async (params: { callback = invokeApi, } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix: prefix, @@ -310,15 +308,16 @@ export const applyWorkflow = async (params: { * Delete a granule from Cumulus via the API lambda * DELETE /granules/${granuleId} * - * @param {Object} params - params - * @param {pRetry.Options} params.pRetryObject - pRetry options object - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the delete confirmation from the API + * @param params - params + * @param params.pRetryOptions - pRetry options object + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the delete confirmation from the API */ export const deleteGranule = async (params: { prefix: string, @@ -335,12 +334,7 @@ export const deleteGranule = async (params: { callback = invokeApi, } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix: prefix, @@ -357,15 +351,16 @@ export const deleteGranule = async (params: { * Move a granule via the API * PATCH /granules/{granuleId} * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Array} params.destinations - move granule destinations - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke - * the api lambda - * @returns {Promise} - the move response from the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.destinations - move granule destinations + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke + * the api lambda + * @returns - the move response from the API */ export const moveGranule = async (params: { prefix: string, @@ -382,12 +377,7 @@ export const moveGranule = async (params: { callback = invokeApi, } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix: prefix, @@ -407,14 +397,15 @@ export const moveGranule = async (params: { /** * Removed a granule from CMR and delete from Cumulus via the API * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {string} params.granuleId - a granule ID - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the delete confirmation from the API + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the delete confirmation from the API */ export const removePublishedGranule = async (params: { prefix: string, @@ -432,13 +423,16 @@ export const removePublishedGranule = async (params: { /** * Query granules stored in cumulus * GET /granules - * @param {Object} params - params - * @param {Object} [params.query] - query to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param [params.query] - query to pass the API lambda + * @param [params.query.fields] + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const listGranules = async (params: { prefix: string, @@ -464,13 +458,15 @@ export const listGranules = async (params: { /** * Create granule into cumulus. * POST /granules - * @param {Object} params - params - * @param {Object} [params.body] - granule to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param [params.body] - granule to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const createGranule = async (params: { prefix: string, @@ -496,13 +492,15 @@ export const createGranule = async (params: { * be removed if not specified and in some cases replaced with defaults. * Granule execution association history will be retained. * PUT /granules/{collectionId}/{granuleId} - * @param {Object} params - params - * @param {Object} [params.body] - granule to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param [params.body] - granule to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const replaceGranule = async (params: { prefix: string, @@ -511,12 +509,14 @@ export const replaceGranule = async (params: { }): Promise => { const { prefix, body, callback = invokeApi } = params; + const path = encodeGranulesURIComponent(body.granuleId, body.collectionId); + return await callback({ prefix, payload: { httpMethod: 'PUT', resource: '/{proxy+}', - path: `/granules/${body.collectionId}/${body.granuleId}`, + path, headers: { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2', @@ -532,13 +532,17 @@ export const replaceGranule = async (params: { * not be overwritten if not specified, null values will be removed and in * some cases replaced with defaults. * PATCH /granules/{granuleId} - * @param {Object} params - params - * @param {Object} [params.body] - granule to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param [params.body] - granule to pass the API lambda + * @param params.granuleId - a granule ID + * @param [params.collectionId] - a collection ID + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const updateGranule = async (params: { prefix: string, @@ -549,12 +553,7 @@ export const updateGranule = async (params: { }): Promise => { const { prefix, granuleId, collectionId, body, callback = invokeApi } = params; - let path = `/granules/${collectionId}/${granuleId}`; - - // Fetching a granule without a collectionId is supported but deprecated - if (!collectionId) { - path = `/granules/${granuleId}`; - } + const path = encodeGranulesURIComponent(granuleId, collectionId); return await callback({ prefix, @@ -572,13 +571,15 @@ export const updateGranule = async (params: { /** * Associate an execution with a granule in cumulus. * POST /granules/{granuleId}/execution - * @param {Object} params - params - * @param {Object} [params.body] - granule and execution info to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param [params.body] - granule and execution info to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const associateExecutionWithGranule = async (params: { prefix: string, @@ -587,12 +588,14 @@ export const associateExecutionWithGranule = async (params: { }): Promise => { const { prefix, body, callback = invokeApi } = params; + const path = encodeGranulesURIComponent(body.granuleId, undefined); + return await callback({ prefix, payload: { httpMethod: 'POST', resource: '/{proxy+}', - path: `/granules/${body.granuleId}/executions`, + path: `${path}/executions`, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }, @@ -602,13 +605,15 @@ export const associateExecutionWithGranule = async (params: { /** * Bulk operations on granules stored in cumulus * POST /granules/bulk - * @param {Object} params - params - * @param {Object} params.body - body to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.body - body to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const bulkGranules = async (params: { prefix: string, @@ -635,13 +640,15 @@ export const bulkGranules = async (params: { /** * Bulk delete granules stored in cumulus * POST /granules/bulkDelete - * @param {Object} params - params - * @param {Object} params.body - body to pass the API lambda - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.body - body to pass the API lambda + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const bulkDeleteGranules = async (params: { prefix: string, @@ -691,15 +698,15 @@ export const bulkReingestGranules = async (params: { * Bulk Granule Operations * POST /granules/bulk * - * @param {Object} params - params - * @param {string} params.prefix - the prefix configured for the stack - * @param {Array} params.granules - the granules to have bulk operation on - * @param {string} params.workflowName - workflowName for the bulk operation execution - * @param {Function} params.callback - async function to invoke the api lambda - * that takes a prefix / user payload. Defaults - * to cumulusApiClient.invokeApifunction to invoke the - * api lambda - * @returns {Promise} - the response from the callback + * @param params - params + * @param params.prefix - the prefix configured for the stack + * @param params.granules - the granules to have bulk operation on + * @param params.workflowName - workflowName for the bulk operation execution + * @param params.callback - async function to invoke the api lambda + * that takes a prefix / user payload. Defaults + * to cumulusApiClient.invokeApifunction to invoke the + * api lambda + * @returns - the response from the callback */ export const bulkOperation = async (params: { prefix: string, diff --git a/packages/api-client/tests/test-granules.js b/packages/api-client/tests/test-granules.js index 7fc567144a7..437719274ff 100644 --- a/packages/api-client/tests/test-granules.js +++ b/packages/api-client/tests/test-granules.js @@ -6,8 +6,8 @@ const granulesApi = require('../granules'); test.before((t) => { t.context.testPrefix = 'unitTestStack'; - t.context.granuleId = 'granule-1'; - t.context.collectionId = 'fakeName___fakeVersion'; + t.context.granuleId = randomId('gran/a-b-c-123'); + t.context.collectionId = `fakeName___${randomId('col/e-f-g-456')}`; t.context.status = 'queued'; }); @@ -17,7 +17,7 @@ test('getGranule calls the callback with the expected object', async (t) => { payload: { httpMethod: 'GET', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, }, expectedStatusCodes: undefined, }; @@ -44,7 +44,7 @@ test('getGranule calls the callback with the expected status codes', async (t) = payload: { httpMethod: 'GET', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, }, expectedStatusCodes: [404, 200], }; @@ -74,8 +74,8 @@ test('getGranule calls the callback with the expected object when there is query payload: { httpMethod: 'GET', resource: '/{proxy+}', - path: `/granules/${t.context.collectionId}/${t.context.granuleId}`, queryStringParameters: query, + path: `/granules/${encodeURIComponent(t.context.collectionId)}/${encodeURIComponent(t.context.granuleId)}`, }, expectedStatusCodes: undefined, }; @@ -106,7 +106,7 @@ test('getGranule accepts an optional collectionId', async (t) => { payload: { httpMethod: 'GET', resource: '/{proxy+}', - path: `/granules/${t.context.collectionId}/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.collectionId)}/${encodeURIComponent(t.context.granuleId)}`, }, }; @@ -131,7 +131,7 @@ test('getGranule accepts an optional collectionId', async (t) => { test('waitForGranules calls getGranules with the expected payload', async (t) => { const callback = ({ prefix, payload }) => { - t.true(payload.path.endsWith(t.context.granuleId)); + t.true(payload.path.endsWith(encodeURIComponent(t.context.granuleId))); t.is(prefix, t.context.testPrefix); return Promise.resolve({ statusCode: 200 }); @@ -209,7 +209,7 @@ test('reingestGranule calls the callback with the expected object', async (t) => payload: { httpMethod: 'PATCH', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, headers: { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2', @@ -239,7 +239,7 @@ test('removeFromCmr calls the callback with the expected object', async (t) => { payload: { httpMethod: 'PATCH', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, headers: { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2', @@ -273,7 +273,7 @@ test('applyWorkflow calls the callback with the expected object', async (t) => { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2', }, - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, body: JSON.stringify({ action: 'applyWorkflow', workflow, meta }), }, }; @@ -298,7 +298,7 @@ test('deleteGranule calls the callback with the expected object', async (t) => { payload: { httpMethod: 'DELETE', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, }, }; @@ -325,7 +325,7 @@ test('moveGranule calls the callback with the expected object', async (t) => { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2', }, - path: `/granules/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}`, body: JSON.stringify({ action: 'move', destinations }), }, }; @@ -395,7 +395,7 @@ test('removePublishedGranule calls removeFromCmr and deleteGranule', async (t) = const callback = ({ payload }) => { if ( payload.httpMethod === 'PATCH' - && payload.path === `/granules/${t.context.granuleId}` + && payload.path === `/granules/${encodeURIComponent(t.context.granuleId)}` && payload.body.includes('removeFromCmr') ) { removeFromCmrCalled = true; @@ -403,7 +403,7 @@ test('removePublishedGranule calls removeFromCmr and deleteGranule', async (t) = if ( payload.httpMethod === 'DELETE' - && payload.path === `/granules/${t.context.granuleId}` + && payload.path === `/granules/${encodeURIComponent(t.context.granuleId)}` ) { deleteGranuleCalled = true; } @@ -455,7 +455,7 @@ test('replaceGranule calls the callback with the expected object', async (t) => payload: { httpMethod: 'PUT', resource: '/{proxy+}', - path: `/granules/${t.context.collectionId}/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.collectionId)}/${encodeURIComponent(t.context.granuleId)}`, headers: { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2' }, body: JSON.stringify(body), }, @@ -484,7 +484,7 @@ test('updateGranule calls the callback with the expected object', async (t) => { payload: { httpMethod: 'PATCH', resource: '/{proxy+}', - path: `/granules/${t.context.collectionId}/${t.context.granuleId}`, + path: `/granules/${encodeURIComponent(t.context.collectionId)}/${encodeURIComponent(t.context.granuleId)}`, headers: { 'Content-Type': 'application/json', 'Cumulus-API-Version': '2' }, body: JSON.stringify(body), }, @@ -515,7 +515,7 @@ test('associateExecutionWithGranule calls the callback with the expected object' payload: { httpMethod: 'POST', resource: '/{proxy+}', - path: `/granules/${t.context.granuleId}/executions`, + path: `/granules/${encodeURIComponent(t.context.granuleId)}/executions`, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }, diff --git a/packages/api/ecs/async-operation/package.json b/packages/api/ecs/async-operation/package.json index 86b7655ac6f..8f8541d7206 100644 --- a/packages/api/ecs/async-operation/package.json +++ b/packages/api/ecs/async-operation/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/ecs-async-operation", - "version": "16.1.3", + "version": "16.1.4", "description": "The docker image for running async operations", "keywords": [ "NASA", @@ -21,10 +21,10 @@ "coverage": "python ../../../../scripts/coverage_handler/coverage.py" }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/db": "16.1.3", - "@cumulus/es-client": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/db": "16.1.4", + "@cumulus/es-client": "16.1.4", + "@cumulus/logger": "16.1.4", "aws-sdk": "2.1490.0", "crypto-random-string": "^3.2.0", "got": "^11.8.5", diff --git a/packages/api/package.json b/packages/api/package.json index cfe79997100..16641f65cf3 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/api", - "version": "16.1.3", + "version": "16.1.4", "description": "Lambda functions for handling all daac's API operations", "main": "index.js", "engines": { @@ -49,26 +49,26 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/api-client": "16.1.3", - "@cumulus/async-operations": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmr-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/collection-config-store": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/db": "16.1.3", - "@cumulus/distribution-utils": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/es-client": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", - "@cumulus/oauth-client": "16.1.3", - "@cumulus/object-store": "16.1.3", - "@cumulus/pvl": "16.1.3", - "@cumulus/sftp-client": "16.1.3", - "@cumulus/types": "16.1.3", + "@cumulus/api-client": "16.1.4", + "@cumulus/async-operations": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmr-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/collection-config-store": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/db": "16.1.4", + "@cumulus/distribution-utils": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/es-client": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", + "@cumulus/oauth-client": "16.1.4", + "@cumulus/object-store": "16.1.4", + "@cumulus/pvl": "16.1.4", + "@cumulus/sftp-client": "16.1.4", + "@cumulus/types": "16.1.4", "@mapbox/dyno": "^1.4.2", "aggregate-error": "^3.1.0", "ajv": "^6.12.3", @@ -120,6 +120,6 @@ } }, "devDependencies": { - "@cumulus/test-data": "16.1.3" + "@cumulus/test-data": "16.1.4" } } diff --git a/packages/async-operations/package.json b/packages/async-operations/package.json index ffcb3f8e504..7df71fd5b64 100644 --- a/packages/async-operations/package.json +++ b/packages/async-operations/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/async-operations", - "version": "16.1.3", + "version": "16.1.4", "description": "Cumulus Core internal async operations module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -29,17 +29,17 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/db": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/es-client": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/types": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/db": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/es-client": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/types": "16.1.4", "knex": "2.4.1", "uuid": "8.3.2" }, "devDependencies": { - "@cumulus/common": "16.1.3", + "@cumulus/common": "16.1.4", "@types/aws-sdk": "2.7.0", "@types/uuid": "^8.0.0" } diff --git a/packages/aws-client/README.md b/packages/aws-client/README.md index c05847bfeb6..9fc23d65f85 100644 --- a/packages/aws-client/README.md +++ b/packages/aws-client/README.md @@ -47,6 +47,8 @@ NODE_ENV=test
SQS
+
STS
+
SecretsManager
StepFunctions
@@ -988,6 +990,9 @@ Test if an SQS queue exists | --- | --- | --- | | queueUrl | Object | queue url | + + +## STS ## SecretsManager diff --git a/packages/aws-client/package.json b/packages/aws-client/package.json index dd5887db59e..45ec6b95b42 100644 --- a/packages/aws-client/package.json +++ b/packages/aws-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/aws-client", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for working with AWS", "keywords": [ "GIBS", @@ -53,9 +53,9 @@ "@aws-sdk/s3-request-presigner": "^3.58.0", "@aws-sdk/signature-v4-crt": "^3.58.0", "@aws-sdk/types": "^3.58.0", - "@cumulus/checksum": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/checksum": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", "aws-sdk": "2.1490.0", "jsonpath-plus": "^1.1.0", "lodash": "~4.17.21", diff --git a/packages/checksum/package.json b/packages/checksum/package.json index fe190eb2973..83eae16703d 100644 --- a/packages/checksum/package.json +++ b/packages/checksum/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/checksum", - "version": "16.1.3", + "version": "16.1.4", "description": "Cumulus checksum utilities", "engines": { "node": ">=16.19.0" diff --git a/packages/cmr-client/package.json b/packages/cmr-client/package.json index 994b4fceda9..58c7aa0655e 100644 --- a/packages/cmr-client/package.json +++ b/packages/cmr-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/cmr-client", - "version": "16.1.3", + "version": "16.1.4", "description": "A Node.js client to NASA's Common Metadata Repository (CMR) API.", "engines": { "node": ">=16.19.0" @@ -35,10 +35,10 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5", "jsonwebtoken": "^9.0.0", "lodash": "^4.17.21", diff --git a/packages/cmrjs/package.json b/packages/cmrjs/package.json index 52017a12ac2..68a360b2c83 100644 --- a/packages/cmrjs/package.json +++ b/packages/cmrjs/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/cmrjs", - "version": "16.1.3", + "version": "16.1.4", "description": "A node SDK for CMR", "engines": { "node": ">=16.19.0" @@ -34,13 +34,13 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmr-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/distribution-utils": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmr-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/distribution-utils": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.1", "js2xmlparser": "^4.0.0", "lodash": "^4.17.21", diff --git a/packages/collection-config-store/package.json b/packages/collection-config-store/package.json index 81f14c07099..b561e27b8ca 100644 --- a/packages/collection-config-store/package.json +++ b/packages/collection-config-store/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/collection-config-store", - "version": "16.1.3", + "version": "16.1.4", "description": "Utility for persisting collection configuration to S3 and retrieving it", "keywords": [ "CUMULUS", @@ -33,8 +33,8 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/message": "16.1.3" + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/message": "16.1.4" } } diff --git a/packages/common/package.json b/packages/common/package.json index 9700880587a..909f3419a33 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/common", - "version": "16.1.3", + "version": "16.1.4", "description": "Common utilities used across tasks", "keywords": [ "GIBS", @@ -44,9 +44,9 @@ "dependencies": { "@aws-sdk/client-s3": "^3.58.0", "@aws-sdk/signature-v4-crt": "^3.58.0", - "@cumulus/aws-client": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", "ajv": "^6.12.3", "aws-sdk": "2.1490.0", "follow-redirects": "^1.2.4", diff --git a/packages/db/package.json b/packages/db/package.json index 4cb946add54..19f217fc851 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/db", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for working with the Cumulus DB", "license": "Apache-2.0", "main": "./dist/index.js", @@ -30,12 +30,12 @@ "node": ">=16.19.0" }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", - "@cumulus/types": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", + "@cumulus/types": "16.1.4", "crypto-random-string": "^3.2.0", "is-valid-hostname": "1.0.2", "knex": "2.4.1", diff --git a/packages/distribution-utils/package.json b/packages/distribution-utils/package.json index b23b656ae7b..d91c915245f 100644 --- a/packages/distribution-utils/package.json +++ b/packages/distribution-utils/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/distribution-utils", - "version": "16.1.3", + "version": "16.1.4", "description": "Cumulus Distribution utilities", "keywords": [ "CUMULUS" @@ -34,9 +34,9 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", "url-join": "^1.1.0" }, "devDependencies": { diff --git a/packages/errors/package.json b/packages/errors/package.json index d978b073515..4a8ba6526e9 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/errors", - "version": "16.1.3", + "version": "16.1.4", "description": "Provides error classes for Cumulus", "keywords": [ "GIBS", diff --git a/packages/es-client/package.json b/packages/es-client/package.json index 233ef7cfca1..d56c6c5f079 100644 --- a/packages/es-client/package.json +++ b/packages/es-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/es-client", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for working with Elasticsearch", "keywords": [ "CUMULUS", @@ -31,10 +31,10 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", "@elastic/elasticsearch": "^5.6.20", "aws-elasticsearch-connector": "8.2.0", "aws-sdk": "2.1490.0", @@ -43,8 +43,8 @@ "p-limit": "^1.2.0" }, "devDependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/test-data": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/test-data": "16.1.4", "p-each-series": "^2.1.0" } } diff --git a/packages/ingest/package.json b/packages/ingest/package.json index 4709aa1378d..a8f361d5f68 100644 --- a/packages/ingest/package.json +++ b/packages/ingest/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/ingest", - "version": "16.1.3", + "version": "16.1.4", "description": "Ingest utilities", "engines": { "node": ">=16.19.0" @@ -39,13 +39,13 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/db": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", - "@cumulus/sftp-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/db": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", + "@cumulus/sftp-client": "16.1.4", "aws-sdk": "2.1490.0", "cksum": "^1.3.0", "encodeurl": "^1.0.2", @@ -61,9 +61,9 @@ "tough-cookie": "~4.0.0" }, "devDependencies": { - "@cumulus/checksum": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/test-data": "16.1.3", - "@cumulus/types": "16.1.3" + "@cumulus/checksum": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/test-data": "16.1.4", + "@cumulus/types": "16.1.4" } } diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 3255b0c60ab..4e9fb256800 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/integration-tests", - "version": "16.1.3", + "version": "16.1.4", "description": "Integration tests", "bin": { "cumulus-test": "./bin/cli.js" @@ -29,16 +29,16 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/api": "16.1.3", - "@cumulus/api-client": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmr-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", - "@cumulus/oauth-client": "16.1.3", + "@cumulus/api": "16.1.4", + "@cumulus/api-client": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmr-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", + "@cumulus/oauth-client": "16.1.4", "aws-sdk": "2.1490.0", "base-64": "^0.1.0", "commander": "^2.15.0", diff --git a/packages/launchpad-auth/package.json b/packages/launchpad-auth/package.json index d6ffb706d79..a3f2f6945f1 100644 --- a/packages/launchpad-auth/package.json +++ b/packages/launchpad-auth/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/launchpad-auth", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for authentication with Launchpad", "keywords": [ "CUMULUS", @@ -38,8 +38,8 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5", "lodash": "^4.17.21", "uuid": "^3.2.1" diff --git a/packages/logger/package.json b/packages/logger/package.json index db968503c43..3d0e8125170 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/logger", - "version": "16.1.3", + "version": "16.1.4", "description": "A log library for use on Cumulus", "keywords": [ "GIBS", diff --git a/packages/lzards-api-client/package.json b/packages/lzards-api-client/package.json index a81075bfa85..276ed142e85 100644 --- a/packages/lzards-api-client/package.json +++ b/packages/lzards-api-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/lzards-api-client", - "version": "16.1.3", + "version": "16.1.4", "description": "A Node.js client to NASA's Level Zero and Repositories Data Store (LZARDS) API.", "engines": { "node": ">=16.19.0" @@ -34,11 +34,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5", "lodash": "^4.17.21" } diff --git a/packages/message/package.json b/packages/message/package.json index 8305ab86437..30e28cddd67 100644 --- a/packages/message/package.json +++ b/packages/message/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/message", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for building and parsing Cumulus messages", "keywords": [ "GIBS", @@ -39,11 +39,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/types": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/types": "16.1.4", "jsonpath-plus": "^3.0.0", "lodash": "^4.17.21", "uuid": "^8.2.0" diff --git a/packages/oauth-client/package.json b/packages/oauth-client/package.json index adaecae9624..0218156b9d3 100644 --- a/packages/oauth-client/package.json +++ b/packages/oauth-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/oauth-client", - "version": "16.1.3", + "version": "16.1.4", "description": "A generic auth client", "homepage": "https://github.com/nasa/cumulus/tree/master/packages/oauth-client#readme", "repository": { diff --git a/packages/object-store/package.json b/packages/object-store/package.json index cc9d2436c7e..d200f2b2ceb 100644 --- a/packages/object-store/package.json +++ b/packages/object-store/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/object-store", - "version": "16.1.3", + "version": "16.1.4", "description": "Utilities for managing object stores", "keywords": [ "GIBS", @@ -40,6 +40,6 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3" + "@cumulus/aws-client": "16.1.4" } } diff --git a/packages/pvl/package.json b/packages/pvl/package.json index b99f2bdc10a..61bdf2dba48 100644 --- a/packages/pvl/package.json +++ b/packages/pvl/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/pvl", - "version": "16.1.3", + "version": "16.1.4", "description": "Parse and serialize Parameter Value Language, a data markup language used by NASA", "main": "index.js", "engine": { diff --git a/packages/s3-credentials-endpoint/package.json b/packages/s3-credentials-endpoint/package.json index 24831410ddd..bc87cf670fe 100644 --- a/packages/s3-credentials-endpoint/package.json +++ b/packages/s3-credentials-endpoint/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/s3-credentials-endpoint", - "version": "16.1.3", + "version": "16.1.4", "description": "An API Gateway Lambda to return AWS credentials for fetching objects from S3", "license": "Apache-2.0", "engines": { @@ -18,12 +18,12 @@ "timeout": "15m" }, "dependencies": { - "@cumulus/api": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/oauth-client": "16.1.3", + "@cumulus/api": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/oauth-client": "16.1.4", "aws-serverless-express": "^3.3.6", "body-parser": "^1.19.0", "cookie-parser": "^1.4.4", diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 39f731c281f..007c9e8cb1b 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/schemas", - "version": "16.1.3", + "version": "16.1.4", "description": "Helpers for managing Cumulus task schemas", "homepage": "https://github.com/nasa/cumulus/tree/master/packages/schemas", "repository": { diff --git a/packages/sftp-client/package.json b/packages/sftp-client/package.json index 676f6ee1b89..8378ef4b107 100644 --- a/packages/sftp-client/package.json +++ b/packages/sftp-client/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/sftp-client", - "version": "16.1.3", + "version": "16.1.4", "description": "A Promise-based SFTP client", "keywords": [ "GIBS", @@ -37,16 +37,16 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "lodash": "^4.17.21", "mime-types": "^2.1.27", "ssh2": "^1.0.0", "ssh2-sftp-client": "^7.0.4" }, "devDependencies": { - "@cumulus/checksum": "16.1.3", - "@cumulus/test-data": "16.1.3", + "@cumulus/checksum": "16.1.4", + "@cumulus/test-data": "16.1.4", "@types/ssh2-sftp-client": "^7.0.0" } } diff --git a/packages/tea-map-cache/package.json b/packages/tea-map-cache/package.json index c88f0420946..3b8fa9e7050 100644 --- a/packages/tea-map-cache/package.json +++ b/packages/tea-map-cache/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/tea-map-cache", - "version": "16.1.3", + "version": "16.1.4", "description": "Tea Bucket Map Cache Writer", "main": "index.js", "engines": { @@ -29,8 +29,8 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5", "p-retry": "^4.2.0" }, diff --git a/packages/test-data/package.json b/packages/test-data/package.json index fcaae8d148c..69192a21af3 100644 --- a/packages/test-data/package.json +++ b/packages/test-data/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-data", - "version": "16.1.3", + "version": "16.1.4", "description": "Includes the test data for various packages", "keywords": [ "GIBS", diff --git a/packages/tf-inventory/package.json b/packages/tf-inventory/package.json index 546e50e591e..0cecfdb8bb4 100644 --- a/packages/tf-inventory/package.json +++ b/packages/tf-inventory/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/tf-inventory", - "version": "16.1.3", + "version": "16.1.4", "description": "Package to help keep track of what resources are managed by Terraform in the AWS account", "main": "index.js", "engines": { @@ -31,11 +31,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "commander": "^4.1.0", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/common": "16.1.3" + "@cumulus/common": "16.1.4" } } diff --git a/packages/types/package.json b/packages/types/package.json index 98a79bf8d84..7e4851ab116 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/types", - "version": "16.1.3", + "version": "16.1.4", "description": "TypeScript definitions for working with Cumulus data structures", "keywords": [ "GIBS", diff --git a/tasks/add-missing-file-checksums/package.json b/tasks/add-missing-file-checksums/package.json index 46e9c0d2ff5..0c1377d1f28 100644 --- a/tasks/add-missing-file-checksums/package.json +++ b/tasks/add-missing-file-checksums/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/add-missing-file-checksums", - "version": "16.1.3", + "version": "16.1.4", "description": "Add checksums to files in S3 which don't have one", "author": "Cumulus Authors", "license": "Apache-2.0", @@ -43,12 +43,12 @@ } }, "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5" }, "devDependencies": { - "@cumulus/schemas": "16.1.3", - "@cumulus/types": "16.1.3", + "@cumulus/schemas": "16.1.4", + "@cumulus/types": "16.1.4", "@types/aws-lambda": "^8.10.58" } } diff --git a/tasks/discover-granules/package.json b/tasks/discover-granules/package.json index 0a63a7726b8..b82f8636945 100644 --- a/tasks/discover-granules/package.json +++ b/tasks/discover-granules/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/discover-granules", - "version": "16.1.3", + "version": "16.1.4", "description": "Discover Granules in FTP/HTTP/HTTPS/SFTP/S3 endpoints", "main": "index.js", "directories": { @@ -36,16 +36,16 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/api-client": "16.1.3", + "@cumulus/api-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/ingest": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5", "lodash": "^4.17.21", "p-map": "^4.0.0" }, "devDependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3" + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4" } } diff --git a/tasks/discover-pdrs/package.json b/tasks/discover-pdrs/package.json index af8156ae442..31cade5f800 100644 --- a/tasks/discover-pdrs/package.json +++ b/tasks/discover-pdrs/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/discover-pdrs", - "version": "16.1.3", + "version": "16.1.4", "description": "Discover PDRs in FTP and HTTP endpoints", "main": "index.js", "directories": { @@ -35,14 +35,14 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", + "@cumulus/ingest": "16.1.4", "lodash": "^4.17.21", "p-filter": "^2.1.0" }, "devDependencies": { - "@cumulus/common": "16.1.3", - "@cumulus/errors": "16.1.3" + "@cumulus/common": "16.1.4", + "@cumulus/errors": "16.1.4" } } diff --git a/tasks/files-to-granules/package.json b/tasks/files-to-granules/package.json index 91b7c05be0a..3f4cb45481b 100644 --- a/tasks/files-to-granules/package.json +++ b/tasks/files-to-granules/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/files-to-granules", - "version": "16.1.3", + "version": "16.1.4", "description": "Converts array-of-files input into a granules object by extracting granuleId from filename", "main": "index.js", "directories": { @@ -33,12 +33,12 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/common": "16.1.3", - "@cumulus/schemas": "16.1.3" + "@cumulus/common": "16.1.4", + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/hello-world/package.json b/tasks/hello-world/package.json index 9443ad7e80b..ae9f625de12 100644 --- a/tasks/hello-world/package.json +++ b/tasks/hello-world/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/hello-world", - "version": "16.1.3", + "version": "16.1.4", "description": "Example task", "main": "index.js", "directories": { @@ -33,8 +33,8 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5" } } diff --git a/tasks/hyrax-metadata-updates/package.json b/tasks/hyrax-metadata-updates/package.json index d05443c8e07..1c5fd19bd9b 100644 --- a/tasks/hyrax-metadata-updates/package.json +++ b/tasks/hyrax-metadata-updates/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/hyrax-metadata-updates", - "version": "16.1.3", + "version": "16.1.4", "description": "Update granule metadata with hooks to OPeNDAP URL", "main": "index.js", "directories": { @@ -39,18 +39,18 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmr-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmr-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/errors": "16.1.3", + "@cumulus/errors": "16.1.4", "libxmljs": "^0.19.7", "lodash": "^4.17.21", "xml2js": "0.5.0" }, "devDependencies": { - "@cumulus/schemas": "16.1.3", + "@cumulus/schemas": "16.1.4", "jsonwebtoken": "^9.0.0", "nock": "^12.0.1", "rewire": "^6.0.0" diff --git a/tasks/lzards-backup/package.json b/tasks/lzards-backup/package.json index 0420faf3813..68086b7e09d 100644 --- a/tasks/lzards-backup/package.json +++ b/tasks/lzards-backup/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/lzards-backup", - "version": "16.1.3", + "version": "16.1.4", "description": "Run LZARDS backup", "author": "Cumulus Authors", "license": "Apache-2.0", @@ -43,20 +43,20 @@ } }, "dependencies": { - "@cumulus/api-client": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/api-client": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/db": "16.1.3", - "@cumulus/distribution-utils": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", - "@cumulus/logger": "16.1.3", - "@cumulus/lzards-api-client": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/db": "16.1.4", + "@cumulus/distribution-utils": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", + "@cumulus/logger": "16.1.4", + "@cumulus/lzards-api-client": "16.1.4", + "@cumulus/message": "16.1.4", "got": "^11.8.5" }, "devDependencies": { - "@cumulus/schemas": "16.1.3", - "@cumulus/types": "16.1.3" + "@cumulus/schemas": "16.1.4", + "@cumulus/types": "16.1.4" } } diff --git a/tasks/move-granules/package.json b/tasks/move-granules/package.json index bb82cc398de..f7d79234754 100644 --- a/tasks/move-granules/package.json +++ b/tasks/move-granules/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/move-granules", - "version": "16.1.3", + "version": "16.1.4", "description": "Move granule files from staging to final location", "main": "index.js", "directories": { @@ -39,17 +39,17 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/distribution-utils": "16.1.3", - "@cumulus/errors": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/distribution-utils": "16.1.4", + "@cumulus/errors": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/schemas": "16.1.3" + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/orca-copy-to-archive-adapter/package.json b/tasks/orca-copy-to-archive-adapter/package.json index 34b6df5272b..7ca5929b4db 100644 --- a/tasks/orca-copy-to-archive-adapter/package.json +++ b/tasks/orca-copy-to-archive-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/orca-copy-to-archive-adapter", - "version": "16.1.3", + "version": "16.1.4", "description": "Adapter to invoke orca copy-to-archive lambda", "main": "dist/index.js", "private": true, @@ -37,13 +37,13 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/logger": "16.1.3", + "@cumulus/logger": "16.1.4", "lodash": "^4.17.15" }, "devDependencies": { - "@cumulus/schemas": "16.1.3" + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/orca-recovery-adapter/package.json b/tasks/orca-recovery-adapter/package.json index 9aa71ff6c7a..b388682a064 100644 --- a/tasks/orca-recovery-adapter/package.json +++ b/tasks/orca-recovery-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/orca-recovery-adapter", - "version": "16.1.3", + "version": "16.1.4", "description": "Adapter to invoke orca recovery workflow", "main": "dist/index.js", "private": true, @@ -37,14 +37,14 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/logger": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/logger": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.15" }, "devDependencies": { - "@cumulus/schemas": "16.1.3" + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/parse-pdr/package.json b/tasks/parse-pdr/package.json index b0083fd595b..c6871dd55df 100644 --- a/tasks/parse-pdr/package.json +++ b/tasks/parse-pdr/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/parse-pdr", - "version": "16.1.3", + "version": "16.1.4", "description": "Download and Parse a given PDR", "license": "Apache-2.0", "main": "index.js", @@ -31,17 +31,17 @@ "timeout": "15m" }, "dependencies": { - "@cumulus/api-client": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/collection-config-store": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/api-client": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/collection-config-store": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/errors": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/pvl": "16.1.3", + "@cumulus/errors": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/pvl": "16.1.4", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/test-data": "16.1.3" + "@cumulus/test-data": "16.1.4" } } diff --git a/tasks/pdr-status-check/package.json b/tasks/pdr-status-check/package.json index 64658c156d6..b0cedd4bb97 100644 --- a/tasks/pdr-status-check/package.json +++ b/tasks/pdr-status-check/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/pdr-status-check", - "version": "16.1.3", + "version": "16.1.4", "description": "Checks execution status of granules in a PDR", "main": "index.js", "directories": { @@ -33,9 +33,9 @@ "timeout": "15m" }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/errors": "16.1.3" + "@cumulus/errors": "16.1.4" } } diff --git a/tasks/post-to-cmr/package.json b/tasks/post-to-cmr/package.json index 03744671383..6c65579f31e 100644 --- a/tasks/post-to-cmr/package.json +++ b/tasks/post-to-cmr/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/post-to-cmr", - "version": "16.1.3", + "version": "16.1.4", "description": "Post a given granule to CMR", "main": "index.js", "directories": { @@ -34,16 +34,16 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/errors": "16.1.3", - "@cumulus/launchpad-auth": "16.1.3", + "@cumulus/errors": "16.1.4", + "@cumulus/launchpad-auth": "16.1.4", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/cmr-client": "16.1.3", - "@cumulus/schemas": "16.1.3" + "@cumulus/cmr-client": "16.1.4", + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/queue-granules/package.json b/tasks/queue-granules/package.json index b455b6ef30d..78dc24e30c6 100644 --- a/tasks/queue-granules/package.json +++ b/tasks/queue-granules/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/queue-granules", - "version": "16.1.3", + "version": "16.1.4", "description": "Add discovered granules to the queue", "main": "index.js", "directories": { @@ -32,13 +32,13 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/api-client": "16.1.3", - "@cumulus/aws-client": "16.1.3", - "@cumulus/collection-config-store": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/api-client": "16.1.4", + "@cumulus/aws-client": "16.1.4", + "@cumulus/collection-config-store": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/ingest": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.21", "p-map": "^4.0.0" } diff --git a/tasks/queue-pdrs/package.json b/tasks/queue-pdrs/package.json index 0867922514e..643eddaeae8 100644 --- a/tasks/queue-pdrs/package.json +++ b/tasks/queue-pdrs/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/queue-pdrs", - "version": "16.1.3", + "version": "16.1.4", "description": "Add discovered PDRs to a queue", "main": "index.js", "directories": { @@ -32,11 +32,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/ingest": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.21" } } diff --git a/tasks/queue-workflow/package.json b/tasks/queue-workflow/package.json index 05c173566fb..36968c3561f 100644 --- a/tasks/queue-workflow/package.json +++ b/tasks/queue-workflow/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/queue-workflow", - "version": "16.1.3", + "version": "16.1.4", "description": "Add workflow to the queue", "main": "index.js", "directories": { @@ -32,11 +32,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/ingest": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.21" } } diff --git a/tasks/send-pan/package.json b/tasks/send-pan/package.json index 16a30ab5025..88f211388e4 100644 --- a/tasks/send-pan/package.json +++ b/tasks/send-pan/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/send-pan", - "version": "16.1.3", + "version": "16.1.4", "description": "Sends a PAN response after parsing a PDR.", "main": "dist/index.js", "private": true, @@ -37,15 +37,15 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/api": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/api": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/ingest": "16.1.3", - "@cumulus/logger": "16.1.3", + "@cumulus/ingest": "16.1.4", + "@cumulus/logger": "16.1.4", "got": "^11.8.5" }, "devDependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "url-join": "^4.0.0" } } diff --git a/tasks/sf-sqs-report/package.json b/tasks/sf-sqs-report/package.json index bbb02b4fdf1..199d895f1be 100644 --- a/tasks/sf-sqs-report/package.json +++ b/tasks/sf-sqs-report/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/sf-sqs-report", - "version": "16.1.3", + "version": "16.1.4", "description": "Sends an incoming Cumulus message to SQS", "main": "index.js", "directories": { @@ -33,11 +33,11 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", "lodash": "^4.17.21" }, "devDependencies": { - "@cumulus/common": "16.1.3" + "@cumulus/common": "16.1.4" } } diff --git a/tasks/sync-granule/package.json b/tasks/sync-granule/package.json index 6b5214753c7..e14fb8e62d9 100644 --- a/tasks/sync-granule/package.json +++ b/tasks/sync-granule/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/sync-granule", - "version": "16.1.3", + "version": "16.1.4", "description": "Download a given granule", "main": "index.js", "directories": { @@ -38,19 +38,19 @@ "timeout": "15m" }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/collection-config-store": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/collection-config-store": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/errors": "16.1.3", - "@cumulus/ingest": "16.1.3", - "@cumulus/message": "16.1.3", + "@cumulus/errors": "16.1.4", + "@cumulus/ingest": "16.1.4", + "@cumulus/message": "16.1.4", "lodash": "^4.17.21", "p-map": "^2.1.0", "uuid": "^3.4.0" }, "devDependencies": { - "@cumulus/schemas": "16.1.3", - "@cumulus/test-data": "16.1.3" + "@cumulus/schemas": "16.1.4", + "@cumulus/test-data": "16.1.4" } } diff --git a/tasks/test-processing/package.json b/tasks/test-processing/package.json index ec91fdb9f57..d76656930b0 100644 --- a/tasks/test-processing/package.json +++ b/tasks/test-processing/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/test-processing", - "version": "16.1.3", + "version": "16.1.4", "description": "Fake processing task used for integration tests", "main": "index.js", "homepage": "https://github.com/nasa/cumulus/tree/master/tasks/test-processing", @@ -20,8 +20,8 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/aws-client": "16.1.3", + "@cumulus/aws-client": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/integration-tests": "16.1.3" + "@cumulus/integration-tests": "16.1.4" } } diff --git a/tasks/update-cmr-access-constraints/package.json b/tasks/update-cmr-access-constraints/package.json index 6ee0adf37e5..b1b5bb34ca5 100644 --- a/tasks/update-cmr-access-constraints/package.json +++ b/tasks/update-cmr-access-constraints/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/update-cmr-access-constraints", - "version": "16.1.3", + "version": "16.1.4", "description": "Updates CMR metadata to set access constraints", "author": "Cumulus Authors", "license": "Apache-2.0", @@ -35,13 +35,13 @@ "verbose": true }, "dependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/cmrjs": "16.1.3", + "@cumulus/aws-client": "16.1.4", + "@cumulus/cmrjs": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", "lodash": "^4.17.5" }, "devDependencies": { - "@cumulus/common": "16.1.3", - "@cumulus/schemas": "16.1.3" + "@cumulus/common": "16.1.4", + "@cumulus/schemas": "16.1.4" } } diff --git a/tasks/update-granules-cmr-metadata-file-links/package.json b/tasks/update-granules-cmr-metadata-file-links/package.json index 5b66c04f127..16e02540ad0 100644 --- a/tasks/update-granules-cmr-metadata-file-links/package.json +++ b/tasks/update-granules-cmr-metadata-file-links/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/update-granules-cmr-metadata-file-links", - "version": "16.1.3", + "version": "16.1.4", "description": "Update CMR metadata files with correct online access urls and etags and transfer etag info to granules' CMR files", "main": "index.js", "directories": { @@ -39,14 +39,14 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/cmrjs": "16.1.3", - "@cumulus/common": "16.1.3", + "@cumulus/cmrjs": "16.1.4", + "@cumulus/common": "16.1.4", "@cumulus/cumulus-message-adapter-js": "2.0.5", - "@cumulus/distribution-utils": "16.1.3", + "@cumulus/distribution-utils": "16.1.4", "lodash": "^4.17.15" }, "devDependencies": { - "@cumulus/aws-client": "16.1.3", - "@cumulus/schemas": "16.1.3" + "@cumulus/aws-client": "16.1.4", + "@cumulus/schemas": "16.1.4" } } diff --git a/tf-modules/cumulus/ecs_cluster_instance_autoscaling_cf_template.yml.tmpl b/tf-modules/cumulus/ecs_cluster_instance_autoscaling_cf_template.yml.tmpl index 6696f7fd0c9..fcddf0f1c5d 100644 --- a/tf-modules/cumulus/ecs_cluster_instance_autoscaling_cf_template.yml.tmpl +++ b/tf-modules/cumulus/ecs_cluster_instance_autoscaling_cf_template.yml.tmpl @@ -13,6 +13,7 @@ Resources: - DeviceName: "/dev/xvdcz" Ebs: DeleteOnTermination: true + Encrypted: true VolumeSize: ${docker_volume_size} %{ if key_name != null ~} KeyName: ${key_name} diff --git a/tf-modules/ingest/package.json b/tf-modules/ingest/package.json index c9f48fe0c11..e39822e2585 100644 --- a/tf-modules/ingest/package.json +++ b/tf-modules/ingest/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/ingest-module", - "version": "16.1.3", + "version": "16.1.4", "description": "Terraform module for data ingest related functionality", "engines": { "node": ">=16.19.0" diff --git a/tf-modules/internal/cumulus-test-cleanup/package.json b/tf-modules/internal/cumulus-test-cleanup/package.json index a343ec4fb49..ed79f133da6 100644 --- a/tf-modules/internal/cumulus-test-cleanup/package.json +++ b/tf-modules/internal/cumulus-test-cleanup/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/cumulus-test-cleanup", - "version": "16.1.3", + "version": "16.1.4", "description": "Nightly cron job for cleaning up integration test artifacts", "main": "index.js", "engines": { diff --git a/tf-modules/s3-replicator/package.json b/tf-modules/s3-replicator/package.json index 684bc5f0e4e..b13b257c442 100644 --- a/tf-modules/s3-replicator/package.json +++ b/tf-modules/s3-replicator/package.json @@ -1,6 +1,6 @@ { "name": "@cumulus/s3-replicator", - "version": "16.1.3", + "version": "16.1.4", "description": "Replicate S3 Events to alternate bucket. Solves same-region replication.", "main": "index.js", "engines": {