Skip to content

Commit

Permalink
CUMULUS-3840:Fixed @cumulus/api/bin/serve to correctly use EsClient (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyhliu authored Aug 21, 2024
1 parent 6a49b16 commit 807bb20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ degraded execution table operations.
deletion to validate parent-child relationships
- **CUMULUS-3818**
- Fixes default value (updated to tag 52) for async-operation-image in tf-modules/cumulus.
- **CUMULUS-3840**
- Fixed `@cumulus/api/bin/serve` to correctly use EsClient.

## [v18.3.3] 2024-08-09

Expand Down
2 changes: 1 addition & 1 deletion packages/api/bin/local-test-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const getESClientAndIndex = async (stackName = localStackName) => {
setLocalEsVariables(stackName);
const client = await getEsClient(process.env.ES_HOST);
const index = process.env.ES_INDEX;
return { client: client.client, index };
return { client, index };
};

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/bin/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function checkEnvVariablesAreSet(moreRequiredEnvVars) {
*/
async function eraseElasticsearchIndices(esClient, esIndex) {
try {
await esClient.indices.delete({ index: esIndex });
await esClient.client.indices.delete({ index: esIndex });
} catch (error) {
if (error.message !== 'index_not_found_exception') throw error;
}
Expand Down

0 comments on commit 807bb20

Please sign in to comment.