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

feature/es-phase-2 #3785

Draft
wants to merge 84 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
81018b2
CUMULUS-3692: Update granules List endpoints to query postgres for ba…
jennyhliu May 8, 2024
a2ca3f2
Merge branch 'master' into feature/es-phase-1
jennyhliu May 10, 2024
1c2a666
CUMULUS-3694: Update granules List endpoints to query postgres - filt…
jennyhliu May 13, 2024
6744454
CUMULUS-3689: Update Stats/Summary and Stats/Aggregate endpoints to u…
Nnaga1 May 17, 2024
b944824
Merge branch 'master' into feature/es-phase-1
jennyhliu May 21, 2024
ad28841
CUMULUS-3693: Update granules List endpoints to query postgres - rang…
jennyhliu May 25, 2024
fff3505
CUMULUS-3695 - Update Granules endpoint to handle SortFields (#3663)
Nnaga1 May 30, 2024
d1b73fa
Merge branch 'master' into feature/es-phase-1
jennyhliu May 31, 2024
f08edd5
CUMULUS-3696: Update granules List endpoints to query postgres - matc…
jennyhliu Jun 3, 2024
e73059d
CUMULUS-3641 - Update Collections LIST endpoint to query Postgres bas…
Nnaga1 Jun 13, 2024
9f60e01
Merge branch 'master' into feature/es-phase-1
jennyhliu Jun 19, 2024
8c83b85
CUMULUS-3699 - Update collection List endpoints to query postgres - i…
Nnaga1 Jun 21, 2024
4e84406
CUMULUS-3639: Add support to db/CollectionSearch to retrieve active c…
jennyhliu Jul 2, 2024
a94df43
CUMULUS-3239 - Update Executions LIST endpoint to query Postgres basi…
Nnaga1 Jul 5, 2024
0e6e32c
Merge branch 'master' into feature/es-phase-1
jennyhliu Jul 11, 2024
9b3aa18
Merge branch 'master' into feature/es-phase-1
jennyhliu Jul 18, 2024
87dcd7b
fix changelog
jennyhliu Jul 18, 2024
0415961
Merge branch 'master' into feature/es-phase-1
jennyhliu Jul 22, 2024
af78001
Cumulus 3640/3242- Update granule non-LIST endpoints and other granul…
Nnaga1 Jul 25, 2024
d3c36a9
CUMULUS-3240: Remove Elasticsearch dependency from executions endpoin…
jennyhliu Jul 25, 2024
8d8e15f
Merge branch 'master' into feature/es-phase-1
npauzenga Jul 30, 2024
aa2254b
Merge branch 'master' into feature/es-phase-1
jennyhliu Jul 30, 2024
867b325
CUMULUS-3642: postgres query adjustment (#3731)
jennyhliu Jul 31, 2024
6f70321
CUMULUS-3238: Remove ElasticSearch dependency from Collection POST, P…
Nnaga1 Aug 7, 2024
59bd307
Merge branch 'master' into feature/es-phase-1
jennyhliu Aug 8, 2024
73cdc6b
CUMULUS-3792: Add db indexes to improve search performance (#3751)
jennyhliu Aug 9, 2024
227bfee
CUMULUS-3236 - Update POST/DEL async operation api endpoints to use p…
Jkovarik Aug 16, 2024
21d05ff
CUMULUS-3235: Updated asyncOperations api endpoint to query postgres …
jennyhliu Aug 18, 2024
f4afe19
Jk/cumulus 3232 (#3778)
Jkovarik Aug 21, 2024
4b46cec
CUMULUS-3233/3234: Update Providers LIST endpoint to remove ElasticSe…
Nnaga1 Aug 22, 2024
34c3be8
[CUMULUS-3229] - Remove ElasticSearch from Rules Endpoints and Update…
npauzenga Aug 26, 2024
3758b04
Merge branch 'master' into feature/es-phase-2
jennyhliu Aug 27, 2024
a287429
CUMULUS-3837: Create ReconciliationReportsTable in RDS and add indexes
charleshuang80 Aug 28, 2024
48f852d
CUMULUS-3837: update changelog
charleshuang80 Aug 28, 2024
0a6dd42
CUMULUS-3837: fix prepare in @cumulus/db
charleshuang80 Aug 28, 2024
15f685f
CUMULUS-3837: fix eslint errors
charleshuang80 Aug 28, 2024
ae4a0d1
CUMULUS-3837: fix more eslint errors
charleshuang80 Aug 28, 2024
2000665
CUMULUS-3837: add missing export, add unique constraint
charleshuang80 Aug 29, 2024
cb332ec
CUMULUS-3837: fix test-create-reconciliation-report
charleshuang80 Sep 5, 2024
f47e1f2
CUMULUS-3837: remove no longer needed dynamo table in test-internal-r…
charleshuang80 Sep 5, 2024
50ab0e5
CUMULUS-3837: fix lint errors
charleshuang80 Sep 5, 2024
758140e
CUMULUS-3837: fix another lint error
charleshuang80 Sep 5, 2024
bbc27fd
CUMULUS-3837: remove superfluous comment
charleshuang80 Sep 5, 2024
853b37c
Merge branch 'feature/es-phase-2' into CUMULUS-3837
charleshuang80 Sep 5, 2024
53aa733
CUMULUS-3231: Update PDRs LIST endpoint to query RDS (#3784)
jennyhliu Sep 5, 2024
953d174
Merge branch 'master' into feature/es-phase-2
jennyhliu Sep 5, 2024
f9cdc5d
CUMULUS-3837: modify lines to remove some disable lint max line length
charleshuang80 Sep 6, 2024
9e01a3d
CUMULUS-3837: modify recon report api/endpoint to use PG table, add a…
charleshuang80 Sep 12, 2024
322e135
CUMULUS-3837: modify recon report api/endpoint to use PG table, add a…
charleshuang80 Sep 12, 2024
e096818
Merge branch 'master' into feature/es-phase-2
jennyhliu Sep 13, 2024
417057a
CUMULUS-3837: fix recon report endpoint tests, update migration, type…
charleshuang80 Sep 17, 2024
85e9fab
CUMULUS-3837: fix eslint errors
charleshuang80 Sep 18, 2024
4345b82
CUMULUS-3837: fix eslint errors
charleshuang80 Sep 18, 2024
1a8192b
CUMULUS-3837: fix eslint errors
charleshuang80 Sep 18, 2024
cdf23ff
CUMULUS-3837: add unit tests for translate method
charleshuang80 Sep 18, 2024
0ed9152
CUMULUS-3837: add unit tests for translate method
charleshuang80 Sep 18, 2024
df70f15
CUMULUS-3837: remove redundant lines
charleshuang80 Sep 18, 2024
568d5c0
CUMULUS-3837: remove a testDb
charleshuang80 Sep 19, 2024
f45d85a
CUMULUS-3837: remove a testDb
charleshuang80 Sep 19, 2024
f91bd40
CUMULUS-3837: move lines out of try/catch
charleshuang80 Sep 19, 2024
baa10b2
CUMULUS-3837: make db/index back to not very ordered
charleshuang80 Sep 19, 2024
3776efe
Merge pull request #3788 from nasa/CUMULUS-3837
charleshuang80 Sep 19, 2024
1a7a104
Update default reject configuration
Jkovarik Oct 1, 2024
cfd6ad3
Revert "Update default reject configuration"
Jkovarik Oct 1, 2024
80c8e57
CUMULUS-3833: Migrate ReconciliationReports data from DynamoDB to Pos…
jennyhliu Oct 3, 2024
90d8f6d
CUMULUS-3806 update Orca Recon Report to use postgres as source of tr…
Jkovarik Oct 10, 2024
952988e
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 11, 2024
be3de89
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 11, 2024
ec23d13
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 15, 2024
e5d5464
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 17, 2024
9c341c5
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 21, 2024
348b210
Jk/cumulus 3806 2 (#3811)
Jkovarik Oct 23, 2024
1e1af2e
CUMULUS-3806-3 -- Remove internal rec report references/cleanup (#3822)
Jkovarik Oct 24, 2024
563d7f5
Merge branch 'master' into feature/es-phase-2
jennyhliu Oct 30, 2024
4b5dbcb
Merge branch 'master' into feature/es-phase-2
jennyhliu Nov 1, 2024
d548a74
CUMULUS-3718: Update Reconciliation Report List endpoints to query po…
charleshuang80 Nov 1, 2024
34a9205
CUMULUS-3859: Update @cumulus/api/bin/serveUtils to no longer add rec…
jennyhliu Nov 4, 2024
37e639f
Ecarton/cumulus 3698 granules list files executions (#3853)
etcart Nov 7, 2024
0d7afd1
CUMULUS-3859-1: Remove es from local api code and update active colle…
jennyhliu Nov 20, 2024
deafd8b
Merge branch 'master' into feature/es-phase-2
jennyhliu Nov 21, 2024
6a1cf95
CUMULUS-3697: Remove searchContext from granules LIST endpoint ( Jk/…
Jkovarik Nov 25, 2024
0d01208
Merge branch 'master' into feature/es-phase-2
jennyhliu Dec 10, 2024
59e27b7
Merge branch 'master' into feature/es-phase-2
jennyhliu Dec 16, 2024
2d094aa
Merge branch 'master' into feature/es-phase-2
jennyhliu Dec 19, 2024
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
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,95 @@ 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/).

## Phase 2 Release

### Breaking Changes

- **CUMULUS-3698**
- GranuleSearch retrieving files/execution is toggled
by setting "includeFullRecord" field to 'true' in relevant api endpoint params
- GranuleSearch does *not* retrieve files/execution by default unless includeFullRecord is set to 'true'
- @cumulus/db function getExecutionArnByGranuleCumulusId is removed. To replace this function use getExecutionInfoByGranuleCumulusId with parameter executionColumns set to ['arn'] or unset (['arn'] is the default argument)

### Migration Notes

#### CUMULUS-3833 Migration of ReconciliationReports from DynamoDB to Postgres after Cumulus is upgraded.

To invoke the Lambda and start the ReconciliationReport migration, you can use the AWS Console or CLI:

```bash
aws lambda invoke --function-name $PREFIX-ReconciliationReportMigration $OUTFILE
```

- `PREFIX` is your Cumulus deployment prefix.
- `OUTFILE` (**optional**) is the filepath where the Lambda output will be saved.


#### CUMULUS-3967

External tooling making use of `searchContext` in the `GET` `/granules/` endpoint will need to update to make use of standard pagination via `limit` and `page` scrolling, as `searchContext` is no longer supported/is an ES specific feature.

### Replace ElasticSearch Phase 2

- **CUMULUS-3967**
- Remove `searchContext` from API granules GET `/granules` endpoint.
- Update relevant tests to validate expected behavior utilizing postgres pagination
- **CUMULUS-3229**
- Remove ElasticSearch queries from Rule LIST endpoint
- **CUMULUS-3230**
- Remove ElasticSearch dependency from Rule Endpoints
- **CUMULUS-3231**
- Updated API `pdrs` `LIST` endpoint to query postgres
- **CUMULUS-3232**
- Update API PDR endpoints `DEL` and `GET` to not update Elasticsearch
- **CUMULUS-3233**
- Updated `providers` list api endpoint and added `ProviderSearch` class to query postgres
- Removed Elasticsearch dependency from `providers` endpoints
- **CUMULUS-3235**
- Updated `asyncOperations` api endpoint to query postgres
- **CUMULUS-3236**
- Update API AsyncOperation endpoints `POST` and `DEL` to not update
Elasticsearch
- Update `@cumlus/api/ecs/async-operation` to not update Elasticsearch index when
reporting status of async operation
- **CUMULUS-3698**
- GranuleSearch now can retrieve associated files for granules
- GranuleSearch now can retrieve latest associated execution for granules
- **CUMULUS-3806**
- Update `@cumulus/db/search` to allow for ordered collation as a
dbQueryParameter
- Update `@cumulus/db/search` to allow `dbQueryParameters.limit` to be set to
`null` to allow for optional unlimited page sizes in search results
- Update/add type annotations/logic fixes to `@cumulus/api` reconciliation report code
- Annotation/typing fixes to `@cumulus/cmr-client`
- Typing fixes to `@cumulus/db`
- Re-enable Reconciliation Report integration tests
- Update `@cumulus/client/CMR.getToken` to throw if a non-launchpad token is requested without a username
- Update `Inventory` and `Granule Not Found` reports to query postgreSQL
database instead of elasticsearch
- Update `@cumulus/db/lib/granule.getGranulesByApiPropertiesQuery` to
allow order by collation to be optionally specified
- Update `@cumulus/db/lib/granule.getGranulesByApiPropertiesQuery` to
be parameterized and include a modifier on `temporalBoundByCreatedAt`
- Remove endpoint call to and all tests for Internal Reconciliation Reports
and updated API to throw an error if report is requested
- Update Orca reconciliation reports to pull granules for comparison from
postgres via `getGranulesByApiPropertiesQuery`
- **CUMULUS-3837**
- Added `reconciliation_reports` table in RDS, including indexes
- Created pg model, types, and translation for `reconciliationReports` in `@cumulus/db`
- **CUMULUS-3833**
- Created api types for `reconciliation_reports` in `@cumulus/types/api`
- Updated reconciliation reports lambda to write to new RDS table instead of Dynamo
- Updated `@cumulus/api/endpoints/reconciliation-reports` `getReport` and `deleteReport` to work with the new RDS table instead of Dynamo
- **CUMULUS-3718**
- Updated `reconciliation_reports` list api endpoint and added `ReconciliationReportSearch` class to query postgres
- Added `reconciliationReports` type to stats endpoint, so `aggregate` query will work for reconciliation reports
- **CUMULUS-3859**
- Updated `@cumulus/api/bin/serveUtils` to no longer add records to ElasticSearch
- Removed ElasticSearch from local API server code
- Updated CollectionSearch to filter granule fields in addition to time frame for active collections

## [Unreleased]

### Breaking Changes
Expand Down
6 changes: 0 additions & 6 deletions audit-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
"pass-enoaudit": true,
"retry-count": 20,
"allowlist": [
{
"GHSA-776f-qx25-q3cc": {
"active": true,
"expiry": "1 July 2023 11:00"
}
},
"jsonpath-plus",
"semver"
]
Expand Down
2 changes: 1 addition & 1 deletion example/cumulus-tf/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,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 = "52"
default = "53"
}

variable "cumulus_process_activity_version" {
Expand Down
5 changes: 2 additions & 3 deletions example/spec/helpers/granuleUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ const waitForGranuleRecordUpdatedInList = async (stackName, granule, additionalQ
'beginningDateTime',
'endingDateTime',
'error',
'execution', // TODO remove after CUMULUS-3698
'files', // TODO -2714 this should be removed
'lastUpdateDateTime',
'productionDateTime',
'updatedAt',
Expand All @@ -255,7 +253,8 @@ const waitForGranuleRecordUpdatedInList = async (stackName, granule, additionalQ
});
const results = JSON.parse(resp.body).results;
if (results && results.length === 1) {
// TODO - CUMULUS-2714 key sort both files objects for comparison
results[0].files.sort((a, b) => a.cumulus_id - b.cumulus_id);
granule.files.sort((a, b) => a.cumulus_id - b.cumulus_id);
const granuleMatches = isEqual(omit(results[0], fieldsIgnored), omit(granule, fieldsIgnored));

if (!granuleMatches) {
Expand Down
Loading