Skip to content

Commit 221d451

Browse files
author
Marc
authored
Merge pull request #295 from cumulus-nasa/ChangeInternalBucketParameterToBucketInParsePdrTask
Change internal bucket parameter to bucket in parse pdr task
2 parents d1b48ee + e00d9bb commit 221d451

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2121
- The config now takes a "stackName" property
2222
- [CUMULUS-450](https://bugs.earthdata.nasa.gov/browse/CUMULUS-450) - Updated
2323
the config schema of the **parse-pdr** task
24-
- The config no longer takes a "buckets" property
2524
- The config no longer takes a "collection" property
26-
- The config now takes an "internalBucket" property
27-
- The "stack", "provider", and "internalBucket" config properties are now
25+
- The "stack", "provider", and "bucket" config properties are now
2826
required
2927

3028
### Removed

tasks/parse-pdr/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const log = require('@cumulus/common/log');
1515
* @param {string} event.config.stack - the name of the deployment stack
1616
* @param {string} event.config.pdrFolder - folder for the PDRs
1717
* @param {Object} event.config.provider - provider information
18-
* @param {Object} event.config.buckets - S3 buckets
18+
* @param {Object} event.config.bucket - the internal S3 bucket
1919
* @returns {Promise.<Object>} - see schemas/output.json for detailed output schema
2020
* that is passed to the next task in the workflow
2121
**/
@@ -28,7 +28,7 @@ function parsePdr(event) {
2828
const parse = new Parse(
2929
input.pdr,
3030
config.stack,
31-
config.internalBucket,
31+
config.bucket,
3232
provider,
3333
config.useList
3434
);

tasks/parse-pdr/schemas/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "ParsePdrConfig",
33
"description": "Describes the config used by the parse-pdr task",
44
"type": "object",
5-
"required": [ "stack", "provider", "internalBucket"],
5+
"required": [ "stack", "provider", "bucket"],
66
"properties": {
77
"pdrFolder": {
88
"type": "string"
@@ -22,7 +22,7 @@
2222
}
2323
}
2424
},
25-
"internalBucket": { "type": "string" },
25+
"bucket": { "type": "string" },
2626
"useList": {
2727
"description": "flag to tell ftp server to use 'LIST' instead of 'STAT'",
2828
"default": false,

tasks/parse-pdr/tests/parse_pdrs_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test.beforeEach(async (t) => {
2020
t.context.payload = {
2121
config: {
2222
stack: randomString(),
23-
internalBucket: randomString(),
23+
bucket: randomString(),
2424
provider: {}
2525
},
2626
input: {
@@ -31,22 +31,22 @@ test.beforeEach(async (t) => {
3131
}
3232
};
3333

34-
await s3().createBucket({ Bucket: t.context.payload.config.internalBucket }).promise();
34+
await s3().createBucket({ Bucket: t.context.payload.config.bucket }).promise();
3535

3636
const collectionConfig = {
3737
name: 'MOD09GQ',
3838
granuleIdExtraction: '^(.*)\.hdf'
3939
};
4040

4141
const collectionConfigStore = new CollectionConfigStore(
42-
t.context.payload.config.internalBucket,
42+
t.context.payload.config.bucket,
4343
t.context.payload.config.stack
4444
);
4545
await collectionConfigStore.put('MOD09GQ', collectionConfig);
4646
});
4747

4848
test.afterEach(async (t) => {
49-
await recursivelyDeleteS3Bucket(t.context.payload.config.internalBucket);
49+
await recursivelyDeleteS3Bucket(t.context.payload.config.bucket);
5050
});
5151

5252
test('parse PDR from FTP endpoint', async (t) => {

tests/fixtures/workflows/pdr_parse_ingest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@
4141
"lambda": "tasks/parse-pdr",
4242
"handler": "index.handler",
4343
"cumulusConfig": {
44-
"useQueue": true,
4544
"provider": "{{$.meta.provider}}",
4645
"collection": "{{$.meta.collection}}",
47-
"internalBucket": "{{$.meta.buckets.internal}}",
46+
"bucket": "{{$.meta.buckets.internal}}",
4847
"stack": "{{$.meta.stack}}",
4948
"templateUri": "{{$.meta.templates.IngestGranule}}",
5049
"queueUrl": "{{$.meta.queues.startSF}}"

0 commit comments

Comments
 (0)