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

CUMULUS-3847: Remove any remaining ES indexing functions and tests #3897

Merged
merged 21 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bace254
CUMULUS-3847: first round of changes, remove es indexing except for C…
charleshuang80 Jan 8, 2025
a71fb8a
CUMULUS-3847: add changelog placeholder
charleshuang80 Jan 8, 2025
f405651
CUMULUS-3847: fix lint issues, more index removal
charleshuang80 Jan 9, 2025
90683a9
CUMULUS-3874: add a few questions as comments
charleshuang80 Jan 9, 2025
c6f3cee
CUMULUS-3847: more lint fixes
charleshuang80 Jan 9, 2025
5801e86
CUMULUS-3847: more removals, add back lambda to modify/comment instea…
charleshuang80 Jan 9, 2025
2b6cb9f
CUMULUS-3847: remove lambda exports, comment out cleanExecutions lamb…
charleshuang80 Jan 10, 2025
af84342
CUMULUS-3847: more removals. try to disable max-len on commented out …
charleshuang80 Jan 13, 2025
57df04d
CUMULUS-3847: remove tf for removed bootstrap lambda
charleshuang80 Jan 13, 2025
8034a5d
CUMULUS-3847: modify eslint rule disable
charleshuang80 Jan 13, 2025
596ab38
CUMULUS-3847: remove unused var
charleshuang80 Jan 13, 2025
5317873
CUMULUS-3847: remove resource reference
charleshuang80 Jan 13, 2025
a1a5183
CUMULUS-3847: remove extra line
charleshuang80 Jan 13, 2025
94b1b25
Merge branch 'feature/es-phase-2' into CUMULUS-3847
charleshuang80 Jan 14, 2025
7d5c880
CUMULUS-3847: fill in changelog, clear out commented code in cleanExe…
charleshuang80 Jan 17, 2025
ab5fd6a
CUMULUS-3847: another lint fix
charleshuang80 Jan 17, 2025
28e596a
Merge branch 'feature/es-phase-2' into CUMULUS-3847
charleshuang80 Jan 22, 2025
48ed4b3
CUMULUS-3847: pr feedback - clarify comments, modify and add logging
charleshuang80 Jan 23, 2025
a66b5b5
CUMULUS-3847: remove es references from tf-inventory
charleshuang80 Jan 23, 2025
ee55bb1
CUMULUS-3847: fix lint error
charleshuang80 Jan 23, 2025
60733b0
CUMULUS-3847: remove additional references
charleshuang80 Jan 24, 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ External tooling making use of `searchContext` in the `GET` `/granules/` endpoin
- 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
- **CUMULUS-3847**
- remove remaining ES indexing in code and tests
- for asyncOperations test data, change any ES related values to other options
- remove code from `@cumulus/api/lambdas/cleanExecutions` leaving a dummy handler, as the code worked with ES. lambda will be rewritten with CUMULUS-3982
- remove `@cumulus/api/endpoints/elasticsearch`, `@cumulus/api/lambdas/bootstrap`, and `@cumulus/api/lambdas/index-from-database`

## [Unreleased]

Expand Down
5 changes: 0 additions & 5 deletions example/deployments/cumulus/sandbox.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ csdap_host_url = "https://auth.csdap.uat.earthdatacloud.nasa.gov"

default_s3_multipart_chunksize_mb = 128

elasticsearch_client_config = {
create_reconciliation_report_es_scroll_duration = "8m"
create_reconciliation_report_es_scroll_size = 1500
}

launchpad_api = "https://api.launchpad.nasa.gov/icam/api/sm/v1"
launchpad_certificate = "launchpad.pfx"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('The AsyncOperation task runner executing a failing lambda function', (
id: asyncOperationId,
taskArn: randomString(),
description: 'Some description',
operationType: 'ES Index',
operationType: 'Bulk Granules',
status: 'RUNNING',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('The AsyncOperation task runner running a non-existent lambda function'
id: asyncOperationId,
taskArn: randomString(),
description: 'Some description',
operationType: 'ES Index',
operationType: 'Bulk Granules',
status: 'RUNNING',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('The AsyncOperation task runner with a non-existent payload', () => {
id: asyncOperationId,
taskArn: randomString(),
description: 'Some description',
operationType: 'ES Index',
operationType: 'Bulk Granules',
status: 'RUNNING',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('The AsyncOperation task runner with a non-JSON payload', () => {
id: asyncOperationId,
taskArn: randomString(),
description: 'Some description',
operationType: 'ES Index',
operationType: 'Kinesis Replay',
status: 'RUNNING',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('The AsyncOperation task runner executing a successful lambda function'

const asyncOperationObject = {
description: 'Some description',
operationType: 'ES Index',
operationType: 'Bulk Granules',
id: asyncOperationId,
taskArn: randomString(),
status: 'RUNNING',
Expand Down
3 changes: 0 additions & 3 deletions packages/api/app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const stats = require('../endpoints/stats');
const version = require('../endpoints/version');
const workflows = require('../endpoints/workflows');
const dashboard = require('../endpoints/dashboard');
const elasticsearch = require('../endpoints/elasticsearch');
const deadLetterArchive = require('../endpoints/dead-letter-archive');
const { launchpadProtectedAuth } = require('./launchpadAuth');
const launchpadSaml = require('../endpoints/launchpadSaml');
Expand Down Expand Up @@ -110,8 +109,6 @@ router.delete('/tokenDelete/:token', token.deleteTokenEndpoint);

router.use('/dashboard', dashboard);

router.use('/elasticsearch', ensureAuthorized, elasticsearch.router);

// Catch and send the error message down (instead of just 500: internal server error)
router.use(defaultErrorHandler);

Expand Down
2 changes: 1 addition & 1 deletion packages/api/ecs/async-operation/tests/test-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test.beforeEach(async (t) => {
t.context.testAsyncOperation = {
id: t.context.asyncOperationId,
description: 'test description',
operationType: 'ES Index',
operationType: 'Reconciliation Report',
status: 'RUNNING',
createdAt: Date.now(),
};
Expand Down
233 changes: 0 additions & 233 deletions packages/api/endpoints/elasticsearch.js

This file was deleted.

35 changes: 0 additions & 35 deletions packages/api/lambdas/bootstrap.js

This file was deleted.

8 changes: 4 additions & 4 deletions packages/api/lambdas/bulk-operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ async function applyWorkflowToGranules({
* Defaults to `concurrency`
* @param {number} [payload.concurrency]
* granule concurrency for the bulk deletion operation. Defaults to 10
* @param {Object} [payload.query] - Optional parameter of query to send to ES
* @param {string} [payload.index] - Optional parameter of ES index to query.
* @param {Object} [payload.query] - Optional parameter of query to send to ES (Cloud Metrics)
* @param {string} [payload.index] - Optional parameter of ES index to query (Cloud Metrics).
* Must exist if payload.query exists.
* @param {Object} [payload.granules] - Optional list of granule unique IDs to bulk operate on
* e.g. { granuleId: xxx, collectionID: xxx }
Expand Down Expand Up @@ -178,8 +178,8 @@ async function bulkGranuleDelete(
* @param {string} payload.workflowName - name of the workflow that will be applied to each granule.
* @param {Object} [payload.meta] - Optional meta to add to workflow input
* @param {string} [payload.queueUrl] - Optional name of queue that will be used to start workflows
* @param {Object} [payload.query] - Optional parameter of query to send to ES
* @param {string} [payload.index] - Optional parameter of ES index to query.
* @param {Object} [payload.query] - Optional parameter of query to send to ES (Cloud Metrics)
* @param {string} [payload.index] - Optional parameter of ES index to query (Cloud Metrics).
* Must exist if payload.query exists.
* @param {Object} [payload.granules] - Optional list of granule unique IDs to bulk operate on
* e.g. { granuleId: xxx, collectionID: xxx }
Expand Down
Loading