-
Notifications
You must be signed in to change notification settings - Fork 131
CSD-91: Make the updateGranuleIdentifiers flag configurable in the update-granules-cmr-metadata-file-links task #4246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e3e4b1c
bd70a24
7c374dd
e63400c
0ca0245
353ca98
2624d49
51795d0
6db1f58
7116f4c
0a73f3c
a7adf25
50320e7
e51ef27
be0f676
b000252
e92496e
320b3fa
3afff4f
41d91c7
0a888f3
9da0afc
b9b4494
117568d
71cf37c
54d4df7
5ea4c90
ae980cb
7390d87
c832abb
ee03381
81fd19e
d5b039d
7a69485
1c05a5c
38991fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,9 @@ const logger = new Logger({ sender: '@cumulus/update-granules-cmr-metadata-file- | |
| * (e.g. { bucket: distribution path }) | ||
| * @param {Object} excludeFileRegexPattern - pattern by which to exclude files from processing | ||
| * @param {boolean} excludeDataGranule - Whether to add or update the DataGranule | ||
| * node in the granule's metadata | ||
| * node in the granule's metadata | ||
| * @param {boolean} updateGranuleIdentifiers - Whether to update the Granule's Identifiers | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for this can you re-add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I didn't realize I accidentally remove that line. Will do. |
||
| * and granuleUR | ||
| * @returns {Promise<Object[]>} Array of updated CMR files with etags of newly updated files. | ||
| * | ||
| */ | ||
|
|
@@ -51,7 +53,8 @@ async function updateEachCmrFileMetadata( | |
| bucketTypes, | ||
| distributionBucketMap, | ||
| excludeFileRegexPattern, | ||
| excludeDataGranule | ||
| excludeDataGranule, | ||
| updateGranuleIdentifiers | ||
| ) { | ||
| return await Promise.all(cmrFiles.map(async (cmrFile) => { | ||
| const granuleId = cmrFile.granuleId; | ||
|
|
@@ -75,7 +78,7 @@ async function updateEachCmrFileMetadata( | |
| bucketTypes, | ||
| cmrGranuleUrlType, | ||
| distributionBucketMap, | ||
| updateGranuleIdentifiers: true, | ||
| updateGranuleIdentifiers, | ||
| excludeDataGranule, | ||
| }); | ||
| })); | ||
|
|
@@ -118,6 +121,8 @@ async function updateGranulesCmrMetadata(event) { | |
| const granulesByGranuleId = keyBy(granules, 'granuleId'); | ||
| const excludeDataGranule = isBoolean(event.config.excludeDataGranule) ? | ||
| event.config.excludeDataGranule : false; | ||
| const updateGranuleIdentifiers = isBoolean(event.config.updateGranuleIdentifiers) ? | ||
| event.config.updateGranuleIdentifiers : true; | ||
|
|
||
| const distributionBucketMap = await fetchDistributionBucketMap(); | ||
| const updatedCmrFiles = await updateEachCmrFileMetadata( | ||
|
|
@@ -128,7 +133,8 @@ async function updateGranulesCmrMetadata(event) { | |
| bucketTypes, | ||
| distributionBucketMap, | ||
| config.excludeFileRegex, | ||
| excludeDataGranule | ||
| excludeDataGranule, | ||
| updateGranuleIdentifiers | ||
| ); | ||
|
|
||
| const updatedGranulesByGranuleId = await updateCmrFileInfo(cmrFiles, granulesByGranuleId); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.