Skip to content

Commit

Permalink
Updates uses of AWS SDK for JS v2 to v3, default to Node 18 (#562)
Browse files Browse the repository at this point in the history
* remove elasticsearch support

* remove aws connection support

* update docs on fine-grained access control

* add USGS Astrogeology api

* upgrade to AWS SDK for JS v3 and Node 18 runtime

* use 127.0.0.1 instead of localhost to avoid connecting to the IPv6 loopback

* add migration

* upgrade packages versions

* update pl

* upgrade more dep versions, update default OpenSearch version to 2.9

* fix diff

* fix merge error in readme

* fixes

* fix merge
  • Loading branch information
Phil Varner authored Nov 9, 2023
1 parent 39a4e1e commit 51880d8
Show file tree
Hide file tree
Showing 20 changed files with 14,477 additions and 26,493 deletions.
4 changes: 4 additions & 0 deletions .npm-upgrade.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"@types/node": {
"versions": "20",
"reason": ""
},
"typescript": {
"versions": "5.2.2",
"reason": "conflict with other dependency"
}
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased] - TBD

### Changed

- Use AWS SDK for JavaScript v3 instead of v2
- Use Node 18 by default (with AWS SDK v3 preinstalled, instead of v2)

## [2.4.0] - 2023-11-08

### Changed
Expand Down Expand Up @@ -67,6 +74,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Removed

- Elasticsearch is no longer supported as a backend. Only OpenSearch is now supported.
- Only fine-grained access control is supported for connecting to OpenSearch.
"AWS Connection" mode is no longer supported.

### Removed

- Elasticsearch is no longer supported as a backend. Only OpenSearch is now supported.
- Only fine-grained access control is supported for connecting to OpenSearch.
"AWS Connection" mode is no longer supported.
Expand Down Expand Up @@ -361,7 +374,7 @@ Initial release, forked from [sat-api](https://github.com/sat-utils/sat-api/tree

Compliant with STAC 0.9.0

<!-- [Unreleased]: https://github.com/stac-utils/stac-api/compare/v2.3.0...main -->
[Unreleased]: https://github.com/stac-utils/stac-api/compare/v2.4.0...main
[2.4.0]: https://github.com/stac-utils/stac-api/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/stac-utils/stac-api/compare/v2.2.3...v2.3.0
[2.2.3]: https://github.com/stac-utils/stac-api/compare/v2.2.2...v2.2.3
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- [Overview](#overview)
- [Architecture](#architecture)
- [Migration](#migration)
- [Unreleased](#unreleased)
- [Node 18 update](#node-18-update)
- [2.4.0](#240)
- [OpenSearch Version 2.9](#opensearch-version-29)
- [2.3.0](#230)
Expand Down Expand Up @@ -133,6 +135,18 @@ apiLambda --> opensearch

## Migration

### Unreleased

#### Node 18 update

The default Lambda deployment environment is now Node 18. The major difference between
the Node 16 and Node 18 Lambda environment is that the Node 16 env includes AWS SDK
for JS v2, and Node 18 includes v3. This code has been updated to use v3, so the
Node 18 environment must be used, or the build must be modified to install the v3 libraries.

To update the deployment to use Node 18, modify the serverless config file value
`provider.runtime` to be `nodejs18.x` and the application re-deployed.

### 2.4.0

#### OpenSearch Version 2.9
Expand Down
2 changes: 1 addition & 1 deletion bin/system-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export REQUEST_LOGGING_ENABLED=false

echo "Running tests"
set +e
npx ava "./tests/system/${TEST_PATTERN}" --serial
npx ava "./tests/system/${TEST_PATTERN}" --serial --verbose
TEST_RESULT="$?"
set -e

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
volumes:
- ./opensearch/config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
localstack:
image: localstack/localstack
image: localstack/localstack:2.1.0
ports:
- "127.0.0.1:4566:4566"
environment:
Expand Down
Loading

0 comments on commit 51880d8

Please sign in to comment.