Skip to content

Commit

Permalink
Release v10.1.1 (#2880)
Browse files Browse the repository at this point in the history
* Addressing lodash vulnerability CVE-2021-23337 (#2730)

* updating lodash vulnerability
* Updated changelog
Authored-by: Katherine Kelly <[email protected]>

* Update changelog with recent maintenance branch releases (#2732)

* Release v10.1.0 (#2731) merge back to master (#2734)

* Release v10.1.0 (#2731)

* Release v10.1.0

* Update Cumulus package API documentation

* v10.1.0 Cumulus Documentation

* update orca version to v4.0.1

* add the missing fix note to release

* Adds logs surrounding the preparation and launch of asynchronous operations (#2726)

* Adds logging surrounding the preparation and launch of asynchronous operations.

* sets new docker image as default

* Put proper grammar into your logs.

* Also spell your logs correctly.

* Update the actual async_operation_image_version

I was confusing that with teh async_operation_image.

* more fixing of changelog

* really fix all grammar.

* CUMULUS-2846: Fix rules PUT logic (#2733)

* fix unit tests

* update rule PUT endpoint logic to ensure consistent record in PG/Dynamo/ES & add unit tests for updating SNS rule

* fix unit test

* add unit test for SQS rule

* add unit test for PUT for SQS rules

* add unit tests

* fix unit test

* fix revert logic for PUT endpoint and add unit tests

* add unit test for rules PG model

* update rule.upsert() to accept fieldsToDelete parameter

* CUMULUS-2703:Implement ORCA Reconciliation Reports (#2683)

* use createAt for reconciliation report time range

* update stack selection

* compare cumulus granule with orca

* add createBackupReconciliationReport

* update initial report format

* add ORCASearchCatalogQueue

* add unit test for backup-reconciliation-report

* update unit test

* rearrange unit test

* add unit test

* add more test granules to unit test

* add ORCA Backup report type

* add orca reconciliation report integration test to spec

* add and fix unit tests

* fix unit test with regex

* change report structure

* refactor

* revert back to updatedAt range for report

* v4.0.0 is not available

* update from PR feedback

* fix integration test

* remove startTimestamp for GNF report spec

* fix changelog for rds2 branch

* remove duplicate entries from changelog

* add translateApiRuleToPostgresRuleRaw helper and unit test

* fix PUT endpoint logic and update unit test

* export new helper

* update data-migration1 lambda to allow overriding rules in PG

* modify rule update logic & update unit tests

* remove unused code

* clean up code

* remove unnecessary code

* add unit test

* update unit tests

* update CHANGELOG

* remove deletion from rules model

* add unit test for updateRuleTrigger(0

* update unit tests

* refactoring test

* delete mocking code

* update localstack to 0.14.0

* fix unit test for SNS triggers

* update unit tests

* add unit tests for deleting SNS triggers

* fixing unit tests

* refactor unit tests

* fix unit tests

* fix unit tests

* fix unit tests

* update changelog

* update detection of unit test bootstrapping

* add dummy lambda zip

* fix unit tests

* fix unit tests

* update logic for rule SNS permission ID

* fix int test

* revert ORCA changes

* revert changes

* revert changes

* revert changes

* fix unresolved merge conflicts

* fix CHANGELOG

* updates

* update base model

* fix unit tests

* update unit tests

* fix unit tests

* revert schema change

* fix unit test

* fix unit test

* fix unit test

* fix unit tests

* update tests

* fix tests

* fix test for local mocking

* fix tests

* fix unit tests

* update test to use API

* fix integration test helper

* downgrade localstack to 0.11.5

* update unit tests

* fix rules migration to overwrite and delete values

* remove duplicate lines

* remove unnecessary code

* fix integration test

* address feedback

* address feedback

* update test names

* cleanup SNS topics

* cleanup SNS topics

* update CHANGELOG

* fix integration test cleanup

* fix unit tests

Co-authored-by: jennyhliu <[email protected]>

* Port CUMULUS-2845 to master (#2736)

* Add environment variables to unit test

* Update changelog, add createRuleTrigger before rulesModel.create calls

* Add missing createRuleTrigger calls

* update unit tests

* update CHANGLEOG

* fix unit tests

* fix unit tests

* fix unit tests

* fix unit tests

* fix unit tests

* fix CHANGELOG

* revert rules model change

* update unit test

* fix unit test

* fix unit tests

* add unit tests

Co-authored-by: Jennifer Tran <[email protected]>

* CUMULUS-2854: Update queue-granules to correctly set granule createdAt stamp (#2863)

Co-authored-by: Matt Savoie <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>

* Update Cumulus version and package API documentation

* Cut new version of Cumulus documentation

* Update unreleased compare link in CHANGELOG.md

* Release-10.1.1 -  Address PR review comments

* Add personal CI stack to Bamboo config

* Update config.yml for personal CI stack

* Update example/config.yml for personal sandbox stack

Co-authored-by: kkelly51 <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Matt Savoie <[email protected]>
Co-authored-by: Mark Boyd <[email protected]>
Co-authored-by: Jennifer Tran <[email protected]>
  • Loading branch information
7 people authored Mar 8, 2022
1 parent 765ba47 commit b34bda5
Show file tree
Hide file tree
Showing 139 changed files with 2,832 additions and 896 deletions.
150 changes: 147 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,53 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## Unreleased

## [v10.1.1] 2022-03-04

### Migration steps

- Due to a bug in the PUT `/rules/<name>` endpoint, the rule records in PostgreSQL may be
out of sync with records in DynamoDB. In order to bring the records into sync, re-run the
[previously deployed `data-migration1` Lambda](https://nasa.github.io/cumulus/docs/upgrade-notes/upgrade-rds#3-deploy-and-run-data-migration1) with a payload of
`{"forceRulesMigration": true}`:

```shell
aws lambda invoke --function-name $PREFIX-data-migration1 \
--payload $(echo '{"forceRulesMigration": true}' | base64) $OUTFILE
```

### Added

- **CUMULUS-2846**
- Added `@cumulus/db/translate/rule.translateApiRuleToPostgresRuleRaw` to translate API rule to PostgreSQL rules and
**keep undefined fields**

### Changed

- **CUMULUS-NONE**
- Adds logging to ecs/async-operation Docker conatiner that launches async
tasks on ECS. Sets default `async_operation_image_version` to 39.
- **CUMULUS-2845**
- Updated rules model to decouple `createRuleTrigger` from `create`.
- Updated rules POST endpoint to call `rulesModel.createRuleTrigger` directly to create rule trigger.
- Updated rules PUT endpoints to call `rulesModel.createRuleTrigger` if update fails and reversion needs to occur.
- **CUMULUS-2846**
- Updated version of `localstack/localstack` used in local unit testing to `0.11.5`

### Fixed

- Upgraded lodash to version 4.17.21 to fix vulnerability
- **CUMULUS-2845**
- Fixed bug in POST `/rules` endpoint causing rule records to be created
inconsistently in DynamoDB and PostgreSQL
- **CUMULUS-2846**
- Fixed logic for `PUT /rules/<name>` endpoint causing rules to be saved
inconsistently between DynamoDB and PostgreSQL
- **CUMULUS-2854**
- Fixed queue granules behavior where the task was not accounting for granules that
*already* had createdAt set. Workflows downstream in this scenario should no longer
fail to write their granules due to order-of-db-writes constraints in the database
update logic.

## [v10.1.0] 2022-02-23

### Added
Expand Down Expand Up @@ -42,8 +89,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Fixed

- Fixed IAM permissions issue with `<prefix>-postgres-migration-async-operation` Lambda
which prevented it from running a Fargate task for data migration.
- **CUMULUS-2853**
- Move OAUTH_PROVIDER to lambda env variables to address regression in CUMULUS-2781
- Add logging output to api app router
Expand Down Expand Up @@ -230,6 +275,69 @@ instances according to the [policy configuration](https://github.com/nasa/cumulu
- **CUMULUS-2835**
- Updated `hyrax-metadata-updates` task to support reading the DatasetId from ECHO10 XML, and the EntryTitle from UMM-G JSON; these are both valid alternatives to the shortname and version ID.

## [v9.9.3] 2021-02-17 [BACKPORT]

**Please note** changes in 9.9.3 may not yet be released in future versions, as
this is a backport and patch release on the 9.9.x series of releases. Updates that
are included in the future will have a corresponding CHANGELOG entry in future
releases.


- **CUMULUS-2853**
- Move OAUTH_PROVIDER to lambda env variables to address regression in 9.9.2/CUMULUS-2275
- Add logging output to api app router

## [v9.9.2] 2021-02-10 [BACKPORT]

**Please note** changes in 9.9.2 may not yet be released in future versions, as
this is a backport and patch release on the 9.9.x series of releases. Updates that
are included in the future will have a corresponding CHANGELOG entry in future
releases.### Added

- **CUMULUS-2775**
- Added a configurable parameter group for the RDS serverless database cluster deployed by `tf-modules/rds-cluster-tf`. The allowed parameters for the parameter group can be found in the AWS documentation of [allowed parameters for an Aurora PostgreSQL cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.ParameterGroups.html). By default, the following parameters are specified:
- `shared_preload_libraries`: `pg_stat_statements,auto_explain`
- `log_min_duration_statement`: `250`
- `auto_explain.log_min_duration`: `250`
- **CUMULUS-2840**
- Added an index on `granule_cumulus_id` to the RDS files table.

### Changed

- **CUMULUS-2847**
- Move DyanmoDb table name into API keystore and initialize only on lambda cold start
- **CUMULUS-2781**
- Add api_config secret to hold API/Private API lambda configuration values
- **CUMULUS-2775**
- Changed the `timeout_action` to `ForceApplyCapacityChange` by default for the RDS serverless database cluster `tf-modules/rds-cluster-tf`

## [v9.9.1] 2021-02-10 [BACKPORT]

**Please note** changes in 9.9.1 may not yet be released in future versions, as
this is a backport and patch release on the 9.9.x series of releases. Updates that
are included in the future will have a corresponding CHANGELOG entry in future
releases.

### Fixed

- **CUMULUS-2775**
- Updated `@cumulus/api-client` to not log an error for 201 response from `updateGranule`

### Changed

- Updated version of `@cumulus/cumulus-message-adapter-js` from `2.0.3` to `2.0.4` for
all Cumulus workflow tasks
- **CUMULUS-2775**
- Changed `@cumulus/api-client/invokeApi()` to accept a single accepted status code or an array
of accepted status codes via `expectedStatusCodes`
- **CUMULUS-2837**
- Update process-s3-dead-letter-archive to unpack SQS events in addition to
Cumulus Messages
- Update process-s3-dead-letter-archive to look up execution status using
getCumulusMessageFromExecutionEvent (common method with sfEventSqsToDbRecords)
- Move methods in api/lib/cwSfExecutionEventUtils to
@cumulus/message/StepFunctions

## [v9.9.0] 2021-11-03

### Added
Expand Down Expand Up @@ -305,6 +413,15 @@ upgrades to `knex` package and to address security vulnerabilities.
`s3://internal-bucket/workflows` directory into
`s3://internal-bucket/buckets`.


## [v9.7.1] 2021-12-08 [Backport]

Please note changes in 9.7.0 may not yet be released in future versions, as this is a backport and patch release on the 9.7.x series of releases. Updates that are included in the future will have a corresponding CHANGELOG entry in future releases.
Fixed

- **CUMULUS-2751**
- Update all tasks to update to use cumulus-message-adapter-js version 2.0.4

## [v9.7.0] 2021-10-01

### Notable Changes
Expand Down Expand Up @@ -454,6 +571,27 @@ when output of the operation is `undefined`
undefined`. This function has also been updated to throw descriptive errors
if an incorrectly formatted collectionId is input.

## [v9.4.1] 2022-02-14 [BACKPORT]

**Please note** changes in 9.4.1 may not yet be released in future versions, as
this is a backport and patch release on the 9.4.x series of releases. Updates that
are included in the future will have a corresponding CHANGELOG entry in future
releases.

- **CUMULUS-2847**
- Update dynamo configuration to read from S3 instead of System Manager
Parameter Store
- Move api configuration initialization outside the lambda handler to
eliminate unneded S3 calls/require config on cold-start only
- Moved `ssh2` package from `@cumulus/common` to `@cumulus/sftp-client` and
upgraded package from `^0.8.7` to `^1.0.0` to address security vulnerability
issue in previous version.
- Fixed hyrax task package.json dev dependency
- Update CNM lambda dependencies for Core tasks
- cumulus-cnm-response-task: 1.4.4
- cumulus-cnm-to-granule: 1.5.4
- Whitelist ssh2 re: https://github.com/advisories/GHSA-652h-xwhf-q4h6

## [v9.4.0] 2021-08-16

### Notable changes
Expand Down Expand Up @@ -5204,15 +5342,21 @@ 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/v10.1.0...HEAD
[unreleased]: https://github.com/nasa/cumulus/compare/v10.1.1...HEAD
[v10.1.1]: https://github.com/nasa/cumulus/compare/v10.1.0...v10.1.1
[v10.1.0]: https://github.com/nasa/cumulus/compare/v10.0.1...v10.1.0
[v10.0.1]: https://github.com/nasa/cumulus/compare/v10.0.0...v10.0.1
[v10.0.0]: https://github.com/nasa/cumulus/compare/v9.9.0...v10.0.0
[v9.9.3]: https://github.com/nasa/cumulus/compare/v9.9.2...v9.9.3
[v9.9.2]: https://github.com/nasa/cumulus/compare/v9.9.1...v9.9.2
[v9.9.1]: https://github.com/nasa/cumulus/compare/v9.9.0...v9.9.1
[v9.9.0]: https://github.com/nasa/cumulus/compare/v9.8.0...v9.9.0
[v9.8.0]: https://github.com/nasa/cumulus/compare/v9.7.0...v9.8.0
[v9.7.1]: https://github.com/nasa/cumulus/compare/v9.7.0...v9.7.1
[v9.7.0]: https://github.com/nasa/cumulus/compare/v9.6.0...v9.7.0
[v9.6.0]: https://github.com/nasa/cumulus/compare/v9.5.0...v9.6.0
[v9.5.0]: https://github.com/nasa/cumulus/compare/v9.4.0...v9.5.0
[v9.4.1]: https://github.com/nasa/cumulus/compare/v9.3.0...v9.4.1
[v9.4.0]: https://github.com/nasa/cumulus/compare/v9.3.0...v9.4.0
[v9.3.0]: https://github.com/nasa/cumulus/compare/v9.2.2...v9.3.0
[v9.2.2]: https://github.com/nasa/cumulus/compare/v9.2.1...v9.2.2
Expand Down
2 changes: 1 addition & 1 deletion bamboo/bootstrap-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ echo 'Elasticsearch status is green'
$docker_command "curl -XPUT 'http://127.0.0.1:9200/_cluster/settings' -d \@/$UNIT_TEST_BUILD_DIR/bamboo/elasticsearch.config"

# Lambda seems to be the last service that's started up by Localstack
while ! $docker_command 'nc -z 127.0.0.1 4574'; do
while ! $docker_command 'nc -z 127.0.0.1 4566'; do
echo 'Waiting for Localstack Lambda service to start'
docker ps -a
sleep 2
Expand Down
2 changes: 1 addition & 1 deletion bamboo/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- 8080:8080
- 9200:9200
localstack:
image: localstack/localstack:0.10.7
image: localstack/localstack:0.11.5
elasticsearch:
image: elasticsearch:5.3
sftp:
Expand Down
4 changes: 2 additions & 2 deletions bamboo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ services:
environment:
ES_JAVA_OPTS: "-Xms750m -Xmx750m"
localstack:
image: maven.earthdata.nasa.gov/localstack/localstack:0.10.7
image: maven.earthdata.nasa.gov/localstack/localstack:0.11.5
network_mode: "service:build_env"
environment:
SERVICES: "cloudformation,cloudwatch,cloudwatchlogs,dynamodb,kinesis,kms,lambda,s3,secretsmanager,sns,sqs,stepfunctions,ssm"
SERVICES: "cloudformation,cloudwatch,cloudwatchlogs,dynamodb,iam,kinesis,kms,lambda,s3,secretsmanager,sns,sqs,stepfunctions,ssm,logs"
build_env:
image: maven.earthdata.nasa.gov/cumulus:latest
volumes:
Expand Down
1 change: 1 addition & 0 deletions bamboo/select-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function determineIntegrationTestStackName(cb) {
'Nate Pauzenga': 'np-ci',
'Danielle Peters': 'dop-ci',
'Anthony Ortega': 'jao-ci',
vpnguye2: 'vkn-ci',
};

return git('.').log({ '--max-count': '1' }, (e, r) => {
Expand Down
6 changes: 6 additions & 0 deletions example/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,11 @@ jtran-int-tf:
jtran-tf:
bucket: jtran-internal

vkn-ci-tf:
bucket: vkn-ci-tf-internal

vkn-tf:
bucket: vkn-tf-internal

np:
bucket: npauzenga-internal
9 changes: 9 additions & 0 deletions example/cumulus-tf/passthrough_workflow.asl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Comment": "State machine that creates a step function success event",
"StartAt": "SuccessState",
"States": {
"SuccessState": {
"Type": "Succeed"
}
}
}
16 changes: 16 additions & 0 deletions example/cumulus-tf/passthrough_workflow.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module "passthrough_workflow" {
source = "../../tf-modules/workflow"

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

state_machine_definition = templatefile(
"${path.module}/passthrough_workflow.asl.json",
{
hello_world_task_arn: module.cumulus.hello_world_task.task_arn
}
)
}
65 changes: 65 additions & 0 deletions example/cumulus-tf/queue_granules_passthrough_workflow.asl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"Comment": "Queue Granules",
"StartAt": "QueueGranules",
"States": {
"QueueGranules": {
"Parameters": {
"cma": {
"event.$": "$",
"task_config": {
"queueUrl": "${start_sf_queue_url}",
"provider": "{$.meta.provider}",
"internalBucket": "{$.meta.buckets.internal.name}",
"stackName": "{$.meta.stack}",
"granuleIngestWorkflow": "${ingest_granule_workflow_name}",
"cumulus_message": {
"input": "{$.payload}",
"outputs": [
{
"source": "{$.granules}",
"destination": "{$.meta.input_granules}"
},
{
"source": "{$}",
"destination": "{$.payload}"
},
{
"source": "{$.process}",
"destination": "{$.meta.process}"
}
]
}
}
}
},
"Type": "Task",
"Resource": "${queue_granules_task_arn}",
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
}
],
"Catch": [
{
"ErrorEquals": [
"States.ALL"
],
"ResultPath": "$.exception",
"Next": "WorkflowFailed"
}
],
"End": true
},
"WorkflowFailed": {
"Type": "Fail",
"Cause": "Workflow failed"
}
}
}
18 changes: 18 additions & 0 deletions example/cumulus-tf/queue_granules_passthrough_workflow.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module "queue_granules_passthrough_workflow" {
source = "../../tf-modules/workflow"

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

state_machine_definition = templatefile(
"${path.module}/queue_granules_passthrough_workflow.asl.json",
{
ingest_granule_workflow_name: module.passthrough_workflow.name,
queue_granules_task_arn: module.cumulus.queue_granules_task.task_arn,
start_sf_queue_url: module.cumulus.start_sf_queue_url
}
)
}
2 changes: 1 addition & 1 deletion example/cumulus-tf/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ variable "rds_admin_access_secret_arn" {
variable "async_operation_image_version" {
description = "docker image version to use for Cumulus async operations tasks"
type = string
default = "36"
default = "39"
}

variable "cumulus_process_activity_version" {
Expand Down
Loading

0 comments on commit b34bda5

Please sign in to comment.