Skip to content

Commit 02fdce8

Browse files
jonhealy1Copilot
andauthored
Update Elasticsearch version in cicd, elasticsearch[async] python library (#688)
**Related Issue(s):** - None **Description:** This PR updates the project’s Elasticsearch runtime version used in local dev and CI, loosens the Python Elasticsearch client constraint, and simplifies the CI workflow setup to use direct `pip` + `pytest` instead of `pipenv`. **Changes:** - Bump Elasticsearch Docker image version (Compose + GitHub Actions service) to `9.3.2`. - Update Python dependency constraint for `elasticsearch[async]` to allow a wider range (`>=8.19.1,<9.4.0`). - Simplify `.github/workflows/cicd.yml` by removing `pipenv` and streamlining install/test steps. **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog --------- Co-authored-by: Copilot <[email protected]>
1 parent c0e0a52 commit 02fdce8

5 files changed

Lines changed: 22 additions & 30 deletions

File tree

.github/workflows/cicd.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
timeout-minutes: 20
1616

1717
services:
18-
elasticsearch_8_svc:
19-
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.5
18+
elasticsearch_9_3:
19+
image: docker.elastic.co/elasticsearch/elasticsearch:9.3.2
2020
env:
2121
cluster.name: stac-cluster
2222
node.name: es01
@@ -69,7 +69,12 @@ jobs:
6969
strategy:
7070
matrix:
7171
python-version: [ "3.12", "3.13", "3.14"]
72-
backend: [ "elasticsearch8", "opensearch"]
72+
backend: [ "elasticsearch", "opensearch"]
73+
include:
74+
- backend: "elasticsearch"
75+
port: "9200"
76+
- backend: "opensearch"
77+
port: "9202"
7378

7479
name: Python ${{ matrix.python-version }} testing with ${{ matrix.backend }}
7580

@@ -83,49 +88,33 @@ jobs:
8388
python-version: ${{ matrix.python-version }}
8489
cache: 'pip'
8590
cache-dependency-path: |
86-
**/setup.py
91+
**/pyproject.toml
8792
8893
- name: Lint code
89-
if: ${{ matrix.python-version == 3.11 }}
94+
if: ${{ matrix.python-version == '3.12' }}
9095
run: |
9196
python -m pip install pre-commit
9297
pre-commit run --all-files
9398
94-
- name: Install pipenv
95-
run: |
96-
python -m pip install --upgrade pipenv wheel
97-
98-
- name: Install core library stac-fastapi
99+
- name: Install dependencies
99100
run: |
101+
python -m pip install --upgrade pip wheel pytest-timeout
100102
pip install ./stac_fastapi/core[catalogs]
101-
102-
- name: Install helpers library stac-fastapi
103-
run: |
104103
pip install ./stac_fastapi/sfeos_helpers
105-
106-
- name: Install elasticsearch stac-fastapi
107-
run: |
108104
pip install ./stac_fastapi/elasticsearch[dev,server]
109-
110-
- name: Install opensearch stac-fastapi
111-
run: |
112105
pip install ./stac_fastapi/opensearch[dev,server]
113106
114-
- name: Install pytest-timeout
115-
run: |
116-
pip install pytest-timeout
117-
118107
- name: Run test suite
119108
run: |
120-
pipenv run pytest -svvv --timeout=300
109+
pytest -svvv --timeout=300
121110
env:
122111
ENVIRONMENT: testing
123-
ES_PORT: ${{ matrix.backend == 'elasticsearch8' && '9200' || '9202' }}
112+
ES_PORT: ${{ matrix.port }}
124113
ES_HOST: 172.17.0.1
125114
ES_USE_SSL: false
126115
DATABASE_REFRESH: true
127116
ES_VERIFY_CERTS: false
128117
REDIS_ENABLE: true
129118
REDIS_HOST: localhost
130119
REDIS_PORT: 6379
131-
BACKEND: ${{ matrix.backend == 'elasticsearch8' && 'elasticsearch' || 'opensearch' }}
120+
BACKEND: ${{ matrix.backend }}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2323

2424
### Updated
2525

26+
- Updated Elasticsearch version in CI/CD compose.yml to 9.3.2 from 8.19.5 [#688](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/688)
27+
- Updated `elasticsearch[async]` Python dependency from ~=8.19.1 to >=8.19.1,<9.4.0 [#688](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/688)
28+
- Simplified, cleaned up CI/CD GitHub workflow in `cicd.yml` [#688](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/688)
2629
- Updated, loosened fastapi, uvicorn and starlette libraries and moved shared deps to core. [#687](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/687)
2730

2831
## [v6.15.0] - 2026-04-04

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ There are two main ways to run the API locally:
669669

670670
- **Configuration**: By default, Docker Compose uses Elasticsearch 8.x and OpenSearch 3.5.0. To use different versions, create a `.env` file:
671671
```shell
672-
ELASTICSEARCH_VERSION=8.11.0
672+
ELASTICSEARCH_VERSION=9.3.2
673673
OPENSEARCH_VERSION=3.5.0
674674
ENABLE_DIRECT_RESPONSE=false
675675
```
@@ -704,7 +704,7 @@ You can customize additional settings in your `.env` file:
704704
| `ES_API_KEY` | API Key for external Elasticsearch/OpenSearch. | N/A | Optional |
705705
| `ES_TIMEOUT` | Client timeout for Elasticsearch/OpenSearch. | DB client default | Optional |
706706
| `BACKEND` | Tests-related variable | `elasticsearch` or `opensearch` based on the backend | Optional |
707-
| `ELASTICSEARCH_VERSION` | Version of Elasticsearch to use. | `8.11.0` | Optional |
707+
| `ELASTICSEARCH_VERSION` | Version of Elasticsearch to use. | `9.3.2` | Optional |
708708
| `OPENSEARCH_VERSION` | OpenSearch version | `3.5.0` | Optional |
709709
| `RETRY_MAX_ATTEMPTS_CONNECTION_ERROR` | Specifies the maximum number of retry attempts for connection errors (ConnectionError, ConnectionTimeout) before giving up. | `5` | Optional |
710710
| `RETRY_MAX_ATTEMPTS_NOT_FOUND_ERROR` | Specifies the maximum number of retry attempts for `IndexNotFoundException` error before giving up. This is particularly useful for datetime-based index searches where indices may need to be refreshed. | `3` | Optional |

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282

8383
elasticsearch:
8484
container_name: es-container
85-
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.19.5}
85+
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-9.3.2}
8686
hostname: elasticsearch
8787
environment:
8888
ES_JAVA_OPTS: -Xms512m -Xmx1g

stac_fastapi/elasticsearch/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dynamic = ["version"]
3030
dependencies = [
3131
"stac-fastapi-core==6.15.0",
3232
"sfeos-helpers==6.15.0",
33-
"elasticsearch[async]~=8.19.1",
33+
"elasticsearch[async]>=8.19.1,<9.4.0",
3434
]
3535

3636
[project.urls]

0 commit comments

Comments
 (0)