Skip to content
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

Ecarton/cumulus 3751 from 18.5.2 #3900

Open
wants to merge 261 commits into
base: release-18.5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
92e41df
Ecarton/hailian fix sf event sqs to db records CUMULUS-3901 (#3799)
cumulus-bot Sep 19, 2024
ef1dacc
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Sep 19, 2024
0f0cd98
reintroduce Migration Count Report to migrations with async_operation…
cumulus-bot Sep 20, 2024
7bac340
CUMULUS-3536 Update Cumulus Core from Aurora Serverless V1 to V2 (#3632)
tclark-innovim Sep 24, 2024
67b6145
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Sep 26, 2024
de355c9
[CUMULUS-3902]: Update AWS-SDK errors to use the V3 error classes (#3…
npauzenga Oct 4, 2024
3192e08
Jk/cumulus 3020 (#3800)
Jkovarik Oct 7, 2024
2b25cfa
CUMULUS-3906 - Update to ORCA v10.0.0 (#3813)
paulpilone Oct 8, 2024
82abf69
CUMULUS-3897 - Merges v18.5.0 CL updates (#3817)
paulpilone Oct 8, 2024
151ec9c
CUMULUS-3897 - Adds release 18.5.0 website docs (#3819)
paulpilone Oct 9, 2024
5342484
Reverts ORCA v10.0.0 update (#3821)
paulpilone Oct 10, 2024
818f7ff
CUMULUS-3756 NDCUM-1264 Added excludeFileRegex configuration to updat…
etcart Oct 11, 2024
edb9f7b
Fix cumulus versions due to bad merge (#3826)
npauzenga Oct 15, 2024
820792b
update dependencies to latest cma, cma-python, cumulus-process (#3810)
cumulus-bot Oct 16, 2024
a31481b
CUMULUS-3891/3773: Add sftpFastDownload config to SyncGranule (#3818)
jennyhliu Oct 18, 2024
0f0b794
Just adding in my creds to the CI. (#3827)
BWex-NASA Oct 18, 2024
199cdcd
[CUMULUS-3921] Test new Orca version and update example deployment (#…
npauzenga Oct 21, 2024
93ca477
CUMULUS-2564 - Update staging paths to use granuleId hash prefix in s…
Jkovarik Oct 22, 2024
02b42fb
CUMULUS-3919:Added terraform variables disableSSL and rejectUnauthori…
jennyhliu Oct 22, 2024
c16fe6f
Minor document typo/fix (#3834)
Jkovarik Oct 23, 2024
d1e0311
CUMULUS-3931: Allowing force_new_deployment to be configurable for ec…
Jkovarik Oct 24, 2024
d919f16
Ecarton/cumulus 3928 imf work (#3831)
etcart Oct 25, 2024
d340f1e
fix no top level await (#3843)
etcart Oct 28, 2024
adac427
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Oct 28, 2024
5246281
19.1.x with master (#3847)
npauzenga Oct 29, 2024
9b51d05
Update CHANGELOG from release 18.5.1 (#3845)
Jkovarik Oct 29, 2024
2fe02e6
Cumulus 3904 (#3837)
Jkovarik Oct 30, 2024
0923f4b
CUMULUS-3876: Fix S3 Replicator cross region bucket writes (#3836)
jennyhliu Oct 31, 2024
fcfe2db
CUMULUS-2564 - Fix 2564 docs (#3856)
Jkovarik Nov 4, 2024
7730d99
Update bootstrap/pdr-upsert tests to run serially (#3855)
Jkovarik Nov 5, 2024
b8c9ae6
Jk/cumulus 3933 (#3839)
Jkovarik Nov 7, 2024
e8ea49b
adding cbanh CI stack
Nov 12, 2024
8e75138
fixed syntax
Nov 13, 2024
7e09e80
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Nov 18, 2024
b459a32
[CUMULUS-3934] Update resources to restrict cidr range to VPC (#3859)
npauzenga Nov 18, 2024
1b7a2cc
resolving cross-spwan vulnerability
Nov 19, 2024
449fdf9
Merge branch 'master' into cbanh/CUMULUS-3916
cqbanh Nov 20, 2024
1bc74e1
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Nov 20, 2024
6135a6c
Address audit issue and update integration test bucket (#3866)
jennyhliu Nov 21, 2024
bab68e8
very broken save
etcart Nov 22, 2024
5d50eb5
WIP shaped right but need to fix a lot
etcart Nov 26, 2024
26cbdc1
Merge branch 'master' of https://github.com/nasa/cumulus
Nnaga1 Nov 27, 2024
b89e616
updated some typing in associated files
etcart Nov 29, 2024
302c325
WIP on testing and functionality
etcart Nov 29, 2024
b5f5132
some cleanup
etcart Nov 29, 2024
40fa00a
WIP on idempotency testing
etcart Dec 2, 2024
b1bbc29
first committ
Nnaga1 Dec 2, 2024
1e647c4
WIP use cmr data store for reference details
etcart Dec 2, 2024
7bca627
linter fixes
etcart Dec 2, 2024
bfbb9c6
get some printouts during integration tests
etcart Dec 2, 2024
3b22031
point correctly
etcart Dec 2, 2024
a539a85
why cna't you be found?
etcart Dec 2, 2024
67064c5
fixes for packaging
etcart Dec 3, 2024
fd01576
more linting fixes
etcart Dec 3, 2024
ea735d6
temp fixes to get stuff to run?
etcart Dec 3, 2024
cf58c1c
making sur epakcage works
etcart Dec 3, 2024
382bf94
trying to debug call
etcart Dec 3, 2024
2ec3548
how bout this format?
etcart Dec 3, 2024
7c08f37
need a touch more info
etcart Dec 3, 2024
96c2327
stupid truncated objects
etcart Dec 3, 2024
b1d0ddf
typo
etcart Dec 3, 2024
f4534b1
CUMULUS-3941: Adds Failed disposition for short pan (#3868)
jennyhliu Dec 3, 2024
1517216
who knows if this pathing is right
etcart Dec 3, 2024
fa3f53f
seemed to work
etcart Dec 3, 2024
553545e
cleanup cmrutils
etcart Dec 3, 2024
d26a787
some light cleanup
etcart Dec 4, 2024
ddaa54d
copy and cleanup cmr metadata files
etcart Dec 4, 2024
eb330c2
cleanup
etcart Dec 4, 2024
ab21ee4
why remove-scripts?
etcart Dec 4, 2024
94cd0a2
why remove-scripts?
etcart Dec 4, 2024
ede6f84
updating the meta-variables
etcart Dec 4, 2024
ba98f0c
tests expanded and bugfixes to what was encountered
etcart Dec 5, 2024
e46cfe7
linting
etcart Dec 5, 2024
2442b39
remove unneeded task dep in example
etcart Dec 5, 2024
b1d0802
reintroduced removed ignore scripts
etcart Dec 5, 2024
fa77bf3
fix the md
etcart Dec 5, 2024
5ed88d5
doc linting
etcart Dec 5, 2024
4e9bdc9
remove unnecessary values from config
etcart Dec 5, 2024
8b1132e
remove extraneous values forn config
etcart Dec 5, 2024
c1619c4
total refactoring
Nnaga1 Dec 5, 2024
68a8b28
CHANGELOG change
Nnaga1 Dec 5, 2024
d36fc3b
Merge branch 'master' into CUMULUS-3757-move-granule
Nnaga1 Dec 5, 2024
41d407f
Merge remote-tracking branch 'origin/master' into ecarton/CUMULUS-375…
etcart Dec 6, 2024
cf465a7
Merge remote-tracking branch 'origin/CUMULUS-3757-move-granule' into …
etcart Dec 6, 2024
108e42d
switching fors with promise.all
Nnaga1 Dec 6, 2024
b92ced4
Merge branch 'CUMULUS-3757-move-granule' of https://github.com/nasa/c…
Nnaga1 Dec 6, 2024
c46187d
updating to the new pg interface
etcart Dec 6, 2024
7b118f0
more linting
etcart Dec 6, 2024
b5eeba5
Merge branch 'master' into cbanh/CUMULUS-3916
cqbanh Dec 7, 2024
4a6bb01
different package structure to satisfy scriptless bootstrap
etcart Dec 9, 2024
e8346ea
feedback
Nnaga1 Dec 9, 2024
406e791
don't lint compiled js files
etcart Dec 9, 2024
6cba814
Merge remote-tracking branch 'origin/CUMULUS-3757-move-granule' into …
etcart Dec 9, 2024
6a0d618
small feedback change
Nnaga1 Dec 9, 2024
65f4456
updated tests
etcart Dec 9, 2024
294fe22
fix package script
etcart Dec 9, 2024
8342a02
adding jsdoc
Nnaga1 Dec 9, 2024
1853e54
From nsidc CUMULUS-3948/CUMULUS-3936: Update Cumulus EC2 Clusters for…
jennyhliu Dec 9, 2024
b0571af
Merge branch 'master' into cbanh/CUMULUS-3916
cqbanh Dec 10, 2024
70b09b7
Merge branch 'master' into CUMULUS-3757-move-granule
Nnaga1 Dec 10, 2024
7b4fe05
linter fixes
etcart Dec 10, 2024
98f2af9
Merge pull request #3860 from nasa/cbanh/CUMULUS-3916
cqbanh Dec 10, 2024
414851a
first pass at calling the lambda in integration tests and bugfix in t…
etcart Dec 10, 2024
9a800b8
Merge branch 'master' into CUMULUS-3757-move-granule
Nnaga1 Dec 10, 2024
3583293
linting
etcart Dec 10, 2024
3133cc2
more to int tests and why is output format getting flagged
etcart Dec 10, 2024
096b713
mistaken name from old move granules
etcart Dec 10, 2024
25cd0a7
still need to point to the right file
etcart Dec 10, 2024
4a18e38
naming cleanup
etcart Dec 11, 2024
0c1c36c
more movin stuff around
etcart Dec 11, 2024
1bad8c3
point webpack right
etcart Dec 11, 2024
6e7ce70
[CUMULUS-3955] Update migration to remove vacuum statements (#3881)
npauzenga Dec 11, 2024
acb681c
unsure what's wrong I'm closer imitating another that works
etcart Dec 11, 2024
a3db811
corrected pathing in tf
etcart Dec 12, 2024
96f7c20
corrected pthing in package
etcart Dec 12, 2024
462a65e
cont to massage configuration
etcart Dec 12, 2024
a835a6a
PR feedback--naming
Nnaga1 Dec 12, 2024
4834f68
PR feedback - transactions
Nnaga1 Dec 16, 2024
c8bc308
Merge branch 'CUMULUS-3757-move-granule' of https://github.com/nasa/c…
Nnaga1 Dec 16, 2024
2d15b5f
PR feedback
Nnaga1 Dec 16, 2024
5c81cf4
Merge branch 'master' into CUMULUS-3757-move-granule
Nnaga1 Dec 16, 2024
a2efe77
Merge branch 'CUMULUS-3757-move-granule' of https://github.com/nasa/c…
Nnaga1 Dec 18, 2024
fcd1c5b
backport changelog changes (#3884)
Nnaga1 Dec 18, 2024
5f29b66
Merge branch 'master' into CUMULUS-3757-move-granule
Nnaga1 Dec 18, 2024
0e05f81
Merge branch 'CUMULUS-3757-move-granule' of https://github.com/nasa/c…
Nnaga1 Dec 18, 2024
03237e0
converting to PATCH endpoint
Nnaga1 Dec 18, 2024
bae3a87
CUMULUS-3759:Migrated ECS Autoscaling group from launch configuration…
jennyhliu Dec 19, 2024
dfef9e1
Merge branch 'CUMULUS-3757-move-granule' into ecarton/cumulus-3751-us…
etcart Dec 19, 2024
8756769
Merge remote-tracking branch 'origin/master' into ecarton/cumulus-375…
etcart Dec 19, 2024
c4b76f6
api client for this endpoint
etcart Dec 19, 2024
a840ed1
Merge branch 'CUMULUS-3757-move-granule' into ecarton/cumulus-3751-us…
etcart Dec 19, 2024
fa73c4d
update to use and mock for testing the api-client
etcart Dec 19, 2024
9aad83a
lint fixes
etcart Dec 19, 2024
76f6756
some mistakes brought over from old version
etcart Dec 19, 2024
c1c3ff2
mistaken config require
etcart Dec 20, 2024
ff76289
linting and proper environment variable
etcart Dec 20, 2024
8ae5ee3
should expect 200
etcart Dec 20, 2024
2075500
linting fixes and test for presence in cumulus according to api
etcart Dec 20, 2024
833fb5f
move to task declared as ecs in the example directory
etcart Dec 30, 2024
8b5bac4
unneeded duplicate
etcart Dec 30, 2024
5c27fa4
mistake in naming the task id
etcart Dec 30, 2024
949fed1
add the task into the module outputs
etcart Dec 30, 2024
7d06ba3
first commit
Nnaga1 Dec 31, 2024
31812a3
Merge branch 'release-18.5.x' into CUMULUS-3757
Nnaga1 Dec 31, 2024
6ba70e5
Merge branch 'CUMULUS-3757' of https://github.com/nasa/cumulus into C…
Nnaga1 Dec 31, 2024
9c53d78
fixing CHANGELOG
Nnaga1 Dec 31, 2024
56287ad
get from module.ingest
etcart Dec 31, 2024
82de20f
need this to be in cumulus outputs
etcart Dec 31, 2024
ae96f3d
gottta get it from cumulus duh
etcart Dec 31, 2024
75bb1d3
mistake updated in ecs naming
etcart Dec 31, 2024
080441f
slightly misnamed
etcart Jan 1, 2025
d61d2f6
adding api-client tests + removing extraneous changes
Nnaga1 Jan 1, 2025
0850a6c
naming fix
Nnaga1 Jan 1, 2025
8bf1f4e
update to id name
etcart Jan 2, 2025
dfd5192
small indexer change
Nnaga1 Jan 2, 2025
32acc20
pmap concurrency limited
etcart Jan 2, 2025
cc02bfd
reverting some changes
Nnaga1 Jan 2, 2025
55232b3
reduce memory size to see if it needs to scale down to fit
etcart Jan 2, 2025
e6992e0
redefinition of workflow with a usable payload in
etcart Jan 3, 2025
adedba0
json typo
etcart Jan 3, 2025
f1964c6
see if this is a helpful debug output
etcart Jan 3, 2025
9d62575
WIP
etcart Jan 3, 2025
440e084
Jk/cumulus 3940 to main from #3877 (#3877) (#3890)
Jkovarik Jan 3, 2025
c6777ca
adding changes from code review
Nnaga1 Jan 3, 2025
9de367f
removing parent from esUpdate
Nnaga1 Jan 3, 2025
cb39dad
commenting out some es temp. + some PR feedback for formatting
Nnaga1 Jan 4, 2025
d8bccf0
commenting out more ES
Nnaga1 Jan 4, 2025
f218ffc
adding back in ES update after some changes
Nnaga1 Jan 4, 2025
668542f
changes to get ES working + linting
Nnaga1 Jan 4, 2025
0839c3d
chaging back from 2 to 50 in tests
Nnaga1 Jan 4, 2025
548fda5
PR feedback (zod) + fixing concurrency
Nnaga1 Jan 5, 2025
18d5353
decreasing num granules 50 -> 25 for test
Nnaga1 Jan 5, 2025
76975a6
removing res.send for batchPatch
Nnaga1 Jan 5, 2025
93756a8
adding back in res.send + lowering numbers
Nnaga1 Jan 5, 2025
0fa0015
adding console.log for test
Nnaga1 Jan 6, 2025
879d146
added more error logging
Nnaga1 Jan 6, 2025
76cb9a1
removing all console.log
Nnaga1 Jan 6, 2025
8bd526c
bumping concurrency
Nnaga1 Jan 6, 2025
4d1af36
lowering nums
Nnaga1 Jan 6, 2025
a699239
WIP moving to some standard data for ease of maintenance
etcart Jan 6, 2025
cc3d440
refactor of workflow spec to use common functions
etcart Jan 6, 2025
688aaf9
PR feedback (1/6/25)
Nnaga1 Jan 6, 2025
3f9928f
bumping up numGranules 5 -> 25
Nnaga1 Jan 6, 2025
df73eaf
bumping numGranules 25 -> 50
Nnaga1 Jan 6, 2025
fa44f4e
correcting names
Nnaga1 Jan 7, 2025
a3c3dcc
small formatting fix
Nnaga1 Jan 7, 2025
eb7e2f1
fixing linting
Nnaga1 Jan 7, 2025
2027237
CUMULUS-3965:Update launch templates to require IMDSv2 (#3894)
jennyhliu Jan 7, 2025
30d16db
integration finally works
etcart Jan 7, 2025
a5ddcdb
try these memory reservation
etcart Jan 7, 2025
ab74050
Merge remote-tracking branch 'origin/master' into ecarton/cumulus-375…
etcart Jan 7, 2025
d2f3b2b
reduce memory footprints
etcart Jan 8, 2025
59a44c8
Merge branch 'ecarton/cumulus-3751-ecs_task_in_example' into ecarton/…
etcart Jan 8, 2025
425e157
corrected versioning
etcart Jan 8, 2025
492ddb3
missed changes meant to rbing in
etcart Jan 8, 2025
08816c8
PR feedback minus (adding tests to db/lib + tests/endpoints)
Nnaga1 Jan 8, 2025
740c22c
missing funcs
etcart Jan 8, 2025
06e0193
get webpack in
etcart Jan 8, 2025
77a177f
import fix for test-granules endpoints test
Nnaga1 Jan 8, 2025
2827f3f
PR feedback
Nnaga1 Jan 9, 2025
6ec79e5
PR feedback part-1 1/9/2025
Nnaga1 Jan 9, 2025
6b255a7
add doc inline
etcart Jan 9, 2025
93b5fcb
Merge remote-tracking branch 'origin/CUMULUS-3757' into ecarton/cumul…
etcart Jan 9, 2025
7f595cd
maybe too much mocking
etcart Jan 10, 2025
10b27d0
de-nesting try's
etcart Jan 10, 2025
1980d12
much better mocking
etcart Jan 10, 2025
1d63122
PR feedback - remaining
Nnaga1 Jan 10, 2025
23ab63c
fixing some jsdocs + PR feedback
Nnaga1 Jan 10, 2025
a493469
WIP dependency cycles and cleanup in tests
etcart Jan 10, 2025
1e969f9
fixing lint errors
etcart Jan 10, 2025
6aced05
changelog
etcart Jan 10, 2025
ae59a50
adding CHANGELOG linking
Nnaga1 Jan 10, 2025
1873adb
removing extraneous string
Nnaga1 Jan 10, 2025
ce1ed8d
fix to error checking from aws latest
etcart Jan 10, 2025
e9c6768
typo fix in error check
etcart Jan 10, 2025
cb3c7ad
Merge branch 'CUMULUS-3757' of https://github.com/nasa/cumulus into C…
Nnaga1 Jan 13, 2025
6677cfc
reverting AWS changes in anticipation for cherry-pick and fixing a co…
Nnaga1 Jan 13, 2025
c24d218
Merge branch 'CUMULUS-3757' into ecarton/cumulus-3751-from-18.5.2
etcart Jan 13, 2025
cb5c950
Merge remote-tracking branch 'origin/CUMULUS-3757' into ecarton/cumul…
etcart Jan 13, 2025
5a5798b
correct new name for endpoints and functions
etcart Jan 13, 2025
261e9de
Merge remote-tracking branch 'origin/release-18.5.x' into ecarton/cum…
etcart Jan 13, 2025
412382c
cleanup leftover api endpoitn from previous format
etcart Jan 13, 2025
ccead63
some typing cleanup
etcart Jan 13, 2025
2d494ba
correct api return values and needed data file for int tests
etcart Jan 15, 2025
dd1a0f3
api-client should expect 200 from test-granules.js
etcart Jan 15, 2025
53e4ddb
fix changelog and tasks.md extra entries
etcart Jan 15, 2025
44e3ec1
testing for ummg and iso
etcart Jan 16, 2025
392aa85
Update CHANGELOG.md
etcart Jan 18, 2025
06f5f68
WIP still figuring out the right way to update the cmr file
etcart Jan 19, 2025
8ce2e2e
Merge branch 'ecarton_rebase-3751' into ecarton/cumulus-3751-from-18.5.2
etcart Jan 19, 2025
db8c1da
move to using api to get granule data from ID
etcart Jan 21, 2025
6c9fa7a
shift tests to using granuleId as input
etcart Jan 21, 2025
cae4527
test files have granule id payload instead of granule payload
etcart Jan 21, 2025
ab0f609
sourceCollection in code and tests to allow update with details befor…
etcart Jan 21, 2025
0134166
small format fix
etcart Jan 21, 2025
4a59394
config and linter errors
etcart Jan 21, 2025
65f4673
more linting
etcart Jan 21, 2025
148a291
fix input configuration
etcart Jan 21, 2025
21fe9f9
double check my inputs
etcart Jan 21, 2025
dacde25
let me make sure the config is right
etcart Jan 22, 2025
762b655
CUMULUS-3967 -- Forward port of release fix -- Pin @aws-sdk/client-s3…
Jkovarik Jan 21, 2025
d46049b
think this needs to be corected
etcart Jan 22, 2025
707e101
remove unnecessary eslints
etcart Jan 23, 2025
6bd075e
moving to non-hardcoded buckets
etcart Jan 24, 2025
5180b4a
CL for memory reservation
etcart Jan 24, 2025
534a951
remove gitignore from task
etcart Jan 24, 2025
49295be
appears to be workign bu tstill need to test cmr udates
etcart Jan 26, 2025
456df87
remove unneeded import o CMRFile
etcart Jan 26, 2025
f7965e9
Merge remote-tracking branch 'origin/release-18.5.x' into ecarton/cum…
etcart Jan 26, 2025
220ea3c
accidentally commited mangled ts output
etcart Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ included in the future will have a corresponding CHANGELOG entry in future relea

### Changed

- **CUMULUS-3751**
- lowered memory reservation of python_processing_workflow and hello_world_workflow to share resources with ecs_move_granule_collections workflow
- **CUMULUS-3967**
- Pinned @aws-sdk/client-s3 in @cumulus/aws-client to 3.726.0 to address breaking changes/incompatibility in releases > 3.726.0
- Pinned @aws-sdk/client-s3 in @cumulus/lib-storage to 3.726.0 to address breaking changes/incompatibility in releases > 3.726.0
Expand All @@ -44,6 +46,17 @@ included in the future will have a corresponding CHANGELOG entry in future relea
- **CUMULUS-3981**
- Added required $metadata field when creating new instance of ServiceException.

### Added

- **CUMULUS-3751**
- Added `move-granule-collections` to move granules to a different collection.
- expects a list of granules along with a new (target) collection
- transfers those granules to that collection in cumulus data stores
- moves those granule files in S3 according to pathing of target collection
- **CUMULUS-3757**
- Added a `/granules` [endpoint](https://nasa.github.io/cumulus-api/#bulk-update-granules-collectionId) `PATCH/bulkPatchGranuleCollection` which updates a batch of granule records collectionId to a new collectionId. This endpoint takes a list of granules, a collectionId, and an `esConcurrency` variable, updating the granules' to the collectionId passed with the payload in both postgres and elasticsearch, while providing concurrency for updating elasticsearch to tailor for performance and database needs.
- Added a `/granules` [endpoint](https://nasa.github.io/cumulus-api/#bulk-update-granules) `PATCH/bulkPatch` which applies PATCH to a list of granules. For its payload, this endpoint takes a list of granules (the updates to be made to the granule, similar to the pre-existing `PATCH`), a `dbConcurrency` and `dbMaxPool` variables for configuring concurrency and database thoroughput for postgres to tailor to performance and database needs.

## [v18.5.2] 2024-12-12

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion example/cumulus-tf/ecs_hello_world_workflow.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "hello_world_service" {
image = "${data.aws_ecr_repository.ecs_task_image.repository_url}:${var.ecs_task_image_version}"

cpu = 400
memory_reservation = 700
memory_reservation = 400
default_log_retention_days = var.default_log_retention_days
cloudwatch_log_retention_periods = var.cloudwatch_log_retention_periods

Expand Down
31 changes: 31 additions & 0 deletions example/cumulus-tf/ecs_move_granule_collections.asl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"Comment": "Moves granules across collections",
"StartAt": "EcsTaskMoveGranuleCollections",
"States": {
"EcsTaskMoveGranuleCollections": {
"Parameters": {
"cma": {
"event.$": "$",
"task_config": {
"buckets": "{$.meta.buckets}",
"provider": "{$.meta.provider}",
"sourceCollection": "{$.meta.sourceCollection}",
"targetCollection": "{$.meta.targetCollection}"
}
}
},
"Type": "Task",
"Resource": "${ecs_task_move_granule_collections_id}",
"TimeoutSeconds": 60,
"Retry": [
{
"ErrorEquals": [
"States.Timeout"
],
"MaxAttempts": 1
}
],
"End": true
}
}
}
54 changes: 54 additions & 0 deletions example/cumulus-tf/ecs_move_granule_collections.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
resource "aws_sfn_activity" "ecs_task_move_granule_collections" {
name = "${var.prefix}-EcsTaskMoveGranuleCollections"
tags = local.tags
}

module "move_granule_collections_services" {
source = "../../tf-modules/cumulus_ecs_service"

prefix = var.prefix
name = "MoveGranuleCollections"
tags = local.tags

cluster_arn = module.cumulus.ecs_cluster_arn
desired_count = 1
image = "${data.aws_ecr_repository.ecs_task_image.repository_url}:${var.ecs_task_image_version}"

cpu = 400
memory_reservation = 700
default_log_retention_days = var.default_log_retention_days
cloudwatch_log_retention_periods = var.cloudwatch_log_retention_periods

environment = {
AWS_DEFAULT_REGION = data.aws_region.current.name
stackName = var.prefix
}
command = [
"cumulus-ecs-task",
"--activityArn",
aws_sfn_activity.ecs_task_move_granule_collections.id,
"--lambdaArn",
module.cumulus.move_granule_collections_task.task_arn,
"--lastModified",
module.cumulus.move_granule_collections_task.last_modified_date
]
}


module "ecs_move_granule_collections" {
source = "../../tf-modules/workflow"

prefix = var.prefix
name = "ECSMoveGranuleCollectionsWorkflow"
workflow_config = module.cumulus.workflow_config
system_bucket = var.system_bucket
tags = local.tags


state_machine_definition = templatefile(
"${path.module}/ecs_move_granule_collections.asl.json",
{
ecs_task_move_granule_collections_id: aws_sfn_activity.ecs_task_move_granule_collections.id
}
)
}
2 changes: 1 addition & 1 deletion example/cumulus-tf/python_processing_workflow.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "python_test_ingest_processing_service" {
image = "${data.aws_ecr_repository.cumulus_test_ingest_process.repository_url}:${var.cumulus_test_ingest_image_version}"

cpu = 400
memory_reservation = 700
memory_reservation = 400
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a CL re: this change if possible


environment = {
AWS_DEFAULT_REGION = data.aws_region.current.name
Expand Down
2 changes: 1 addition & 1 deletion example/cumulus-tf/python_reference_workflow.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "python_processing_service" {
image = "${data.aws_ecr_repository.cumulus_process_activity.repository_url}:${var.cumulus_process_activity_version}"

cpu = 400
memory_reservation = 700
memory_reservation = 400

environment = {
AWS_DEFAULT_REGION = data.aws_region.current.name
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
const { deleteExecution } = require('@cumulus/api-client/executions');
const { ActivityStep } = require('@cumulus/integration-tests/sfnStep');
const fs = require('fs');
const { waitForListObjectsV2ResultCount } = require('@cumulus/integration-tests');
const {
deleteS3Object,
} = require('@cumulus/aws-client/S3');
const { createProvider } = require('@cumulus/api-client/providers');
const { deleteGranule } = require('@cumulus/api-client/granules');
const { buildAndStartWorkflow } = require('../../helpers/workflowUtils');
const { loadConfig, createTestSuffix, createTimestampedTestId } = require('../../helpers/testUtils');
const { setupInitialState, getTargetFiles, getTargetCollection, getSourceCollection } = require('./move-granule-collection-spec-utils');

const activityStep = new ActivityStep();

describe('The MoveGranuleCollection workflow using ECS', () => {
Copy link
Contributor

@jennyhliu jennyhliu Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the source and target collections? I can't tell from the specs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the difference between MoveGranuleCollectionWorkflowSpec and MoveGranuleCollectionsSpec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is to run movegranulecollectionsSoec as a test of the functionality of the lambda, while the workflow is meant to run the workflow as it would exist with example data, to be added to with CMR, lizards etc when those tickets are done. Right now the only functional difference is that it tests the lambda in the ECS deployment

let workflowExecutionArn;
let config;
let finalFiles;
let beforeAllFailed = false;
const granuleIds = ['MOD11A1.A2017200.h19v04.006.2017201090724'];
afterAll(async () => {
try {
await Promise.all(finalFiles.map((fileObj) => deleteS3Object(
fileObj.bucket,
fileObj.key
)));
} catch {
console.log('no need to delete s3 objects');
}
try {
await Promise.all(granuleIds.map((granuleId) => deleteGranule({ prefix: config.stackName, granuleId})));
} catch {
console.log('no need to delete granules');
}

try {
await deleteExecution({ prefix: config.stackName, executionArn: workflowExecutionArn });
} catch {
console.log('no need to delete execution');
}
});
beforeAll(async () => {

const sourceUrlPrefix = 'move-granule-collection-testing';
const targetUrlPrefix = 'move-granule-collection-testing-target';
config = await loadConfig();
const providersDir = './data/providers/s3/';
const stackName = config.stackName;
const testId = createTimestampedTestId(config.stackName, 'MoveGranuleCollections');
const testSuffix = createTestSuffix(testId);
const provider = { id: `s3_provider${testSuffix}` };

const providerJson = JSON.parse(fs.readFileSync(`${providersDir}/s3_provider.json`, 'utf8'));
const providerData = {
...providerJson,
id: provider.id,
host: config.bucket,
};
await createProvider({ prefix: config.stackName, provider: providerData })

finalFiles = getTargetFiles(targetUrlPrefix, config);
//upload to cumulus

try {
await setupInitialState(stackName, sourceUrlPrefix, targetUrlPrefix, config);

workflowExecutionArn = await buildAndStartWorkflow(
config.stackName,
config.bucket,
'ECSMoveGranuleCollectionsWorkflow',
getSourceCollection(sourceUrlPrefix),
provider,
{ granules: ['MOD11A1.A2017200.h19v04.006.2017201090724'] },
{
targetCollection: getTargetCollection(targetUrlPrefix),
sourceCollection: getSourceCollection(sourceUrlPrefix),
buckets: config.buckets
}
);
await Promise.all(finalFiles.map((file) => expectAsync(
waitForListObjectsV2ResultCount({
bucket: file.bucket,
prefix: file.key,
desiredCount: 1,
interval: 5 * 1000,
timeout: 60 * 1000,
})
).toBeResolved()));
} catch (error) {
console.log(`files do not appear to have been moved: error: ${error}`);
beforeAllFailed = true;
}
});

it('executes successfully', () => {
expect(beforeAllFailed).toEqual(false);
});

it('outputs the updated granules', async () => {
expect(beforeAllFailed).toEqual(false);
const activityOutput = await activityStep.getStepOutput(
workflowExecutionArn,
'EcsTaskMoveGranuleCollections'
);
expect(activityOutput.payload.granules[0].files).toEqual([
{
key: 'move-granule-collection-testing-target/MOD11A1.A2017200.h19v04.006.2017201090724.hdf',
bucket: config.buckets.protected.name,
type: 'data',
fileName: 'MOD11A1.A2017200.h19v04.006.2017201090724.hdf',
},
{
key: 'move-granule-collection-testing-target/jpg/example2/MOD11A1.A2017200.h19v04.006.2017201090724_1.jpg',
bucket: config.buckets.public.name,
type: 'browse',
fileName: 'MOD11A1.A2017200.h19v04.006.2017201090724_1.jpg',
},
{
key: 'move-granule-collection-testing-target/MOD11A1.A2017200.h19v04.006.2017201090724_2.jpg',
bucket: config.buckets.public.name,
type: 'browse',
fileName: 'MOD11A1.A2017200.h19v04.006.2017201090724_2.jpg',
},
{
key: 'move-granule-collection-testing-target/MOD11A1.A2017200.h19v04.006.2017201090724.cmr.xml',
bucket: config.buckets.public.name,
type: 'metadata',
fileName: 'MOD11A1.A2017200.h19v04.006.2017201090724.cmr.xml',
},
]);
expect(activityOutput.payload.granules[0].granuleId).toEqual('MOD11A1.A2017200.h19v04.006.2017201090724');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
'use strict';

const { InvokeCommand } = require('@aws-sdk/client-lambda');
const { lambda } = require('@cumulus/aws-client/services');
const {
deleteS3Object,
} = require('@cumulus/aws-client/S3');
const { waitForListObjectsV2ResultCount } = require('@cumulus/integration-tests');
const {
granules,
} = require('@cumulus/api-client');

const { v4: uuidv4 } = require('uuid');
const { loadConfig } = require('../../helpers/testUtils');
const { constructCollectionId } = require('../../../../packages/message/Collections');
const { getTargetCollection, getProcessGranule, setupInitialState, getPayload, getTargetFiles } = require('./move-granule-collection-spec-utils');
describe('when moveGranulesCollection is called', () => {
let stackName;
const sourceUrlPrefix = `source_path/${uuidv4()}`;
const targetUrlPrefix = `target_path/${uuidv4()}`;
const targetCollection = getTargetCollection(targetUrlPrefix);
let processGranule;
let config;
// let systemBucket;
beforeAll(async () => {
config = await loadConfig();
stackName = config.stackName;
processGranule = getProcessGranule(sourceUrlPrefix, config);
});

describe('under normal circumstances', () => {
let beforeAllFailed = false;
let finalFiles;
afterAll(async () => {
await Promise.all(finalFiles.map((fileObj) => deleteS3Object(
fileObj.bucket,
fileObj.key
)));
});
beforeAll(async () => {
finalFiles = getTargetFiles(targetUrlPrefix, config);
const payload = getPayload(sourceUrlPrefix, targetUrlPrefix, config);
//upload to cumulus
try {
await setupInitialState(stackName, sourceUrlPrefix, targetUrlPrefix, config);
const { $metadata } = await lambda().send(new InvokeCommand({
FunctionName: `${stackName}-MoveGranuleCollections`,
InvocationType: 'RequestResponse',
Payload: JSON.stringify({
cma: {
meta: payload.meta,
task_config: payload.config,
event: {
payload: payload.input,
},
},
}),
}));
if ($metadata.httpStatusCode >= 400) {
console.log(`lambda invocation to set up failed, code ${$metadata.httpStatusCode}`);
beforeAllFailed = true;
}
await Promise.all(finalFiles.map((file) => expectAsync(
waitForListObjectsV2ResultCount({
bucket: file.bucket,
prefix: file.key,
desiredCount: 1,
interval: 5 * 1000,
timeout: 60 * 1000,
})
).toBeResolved()));
} catch (error) {
console.log(`files do not appear to have been moved: error: ${error}`);
beforeAllFailed = true;
}
});
it('moves the granule data in s3', () => {
if (beforeAllFailed) fail('beforeAllFailed');
});
it('updates the granule data in cumulus', async () => {
if (beforeAllFailed) fail('beforeAllFailed');
const cumulusGranule = await granules.getGranule({
prefix: stackName,
granuleId: processGranule.granuleId,
});
expect(cumulusGranule.granuleId).toEqual(processGranule.granuleId);
expect(cumulusGranule.collectionId).toEqual(constructCollectionId(targetCollection.name, targetCollection.version));
});
});
});
Loading