Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Jan 7, 2025
2 parents 2faeba4 + d5ce56f commit 63e4de3
Show file tree
Hide file tree
Showing 3,539 changed files with 101,438 additions and 8,135 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .buildkite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.8
ARG PYTHON_VERSION=3.13
FROM python:${PYTHON_VERSION}

# Default UID/GID to 1000
Expand Down
26 changes: 26 additions & 0 deletions .buildkite/certs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CI certificates

This directory contains certificates that can be used to test against Elasticsearch in CI

## Generating new certificates using the Certificate Authority cert and key

Before adding support for Python 3.13, we generated certificates with
[`elasticsearch-certutil`](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html).
However, those certificates are not compliant with RFC 5280, and Python now
enforces compliance by enabling the VERIFY_X509_STRICT flag by default.

If you need to generate new certificates, you can do so with
[trustme](https://trustme.readthedocs.io/en/latest/) as follows:

```
```bash
pip install trustme
python -m trustme --identities instance
# Use the filenames expected by our tests
mv client.pem ca.crt
mv server.pem testnode.crt
mv server.key testnode.key
```

For more control over the generated certificates, trustme also offers a Python
API, but we have not needed it so far.
28 changes: 10 additions & 18 deletions .buildkite/certs/ca.crt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
-----BEGIN CERTIFICATE-----
MIIDSTCCAjGgAwIBAgIUHTeTPPuZIX3wdyudMsllXa9yZ1kwDQYJKoZIhvcNAQEL
BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
cmF0ZWQgQ0EwHhcNMjMwODIxMTcyNTMyWhcNMjYwODIwMTcyNTMyWjA0MTIwMAYD
VQQDEylFbGFzdGljIENlcnRpZmljYXRlIFRvb2wgQXV0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DAwMTAxMDAwMDAwWhgPMzAwMDAxMDEwMDAw
MDBaMEAxFzAVBgNVBAoMDnRydXN0bWUgdjEuMi4wMSUwIwYDVQQLDBxUZXN0aW5n
IENBICNiaXcxV2MxMGxwcUNGUUw1MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE
SN7++A76LmOR0tKKra1M6VVzGUljjL9fVPxOEIblOOJJhA7mKLQguNzEHjucNV23
LcDzMX/M/oUBGdYZBbAv4qNFMEMwHQYDVR0OBBYEFCrGGcO9v0UAWSsD93P/x2MT
NiJbMBIGA1UdEwEB/wQIMAYBAf8CAQkwDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49
BAMCA0gAMEUCIQDGyO21zIAwmARtoc2atVmmqZdPVkegHkCKCFY4P+KeEAIgKMCz
aU8LPCVyA+ZF9K+tcqkNK5h/5s7wlQ5DSeKSuE8=
-----END CERTIFICATE-----
20 changes: 0 additions & 20 deletions .buildkite/certs/ca.pem

This file was deleted.

30 changes: 12 additions & 18 deletions .buildkite/certs/testnode.crt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
-----BEGIN CERTIFICATE-----
MIIDODCCAiCgAwIBAgIVAKLWEcNzTd4B0NqnrJL0xAKaS8DWMA0GCSqGSIb3DQEB
CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
ZXJhdGVkIENBMB4XDTIzMDgyMTE3MjcwMloXDTI2MDgyMDE3MjcwMlowEzERMA8G
A1UEAxMIaW5zdGFuY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8
eLXL3ZX5v8JlHcfg+96Bpq24EeiqV+7RPPKbcH80ODjkETqYUpam+TcOl2gt23p/
rpiPSSpOX8pFdmY78wTmxo2GCQZ/db2h0gZOOYpb8HQku+hJ4bAmtzizrqWW76Wz
csen3DSUkT0bKkJTjUMmwVhRaMpfv8EIcUbrHAwc3VCj7grnFL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mHGPOJ0HAy9F2E
Y+rJ1zDUnfB5msowei/iuoaMo4GlMIGiMB0GA1UdDgQWBBSP5z3h8b13ul407YOd
kyjKNcf/vTAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFCrGGcO9v0UAWSsD93P/
x2MTNiJbMBYGA1UdEQEB/wQMMAqCCGluc3RhbmNlMA4GA1UdDwEB/wQEAwIFoDAq
BgNVHSUBAf8EIDAeBggrBgEFBQcDAgYIKwYBBQUHAwEGCCsGAQUFBwMDMAoGCCqG
SM49BAMCA0cAMEQCIHPP7chQolK+N+GZ+rJ49euoTSzb2YIU5vnCY/bFEWO+AiBC
OTFYhR9Mw/e+WdJVZO78XZYKy5uA28JwsZuu7E0kZA==
-----END CERTIFICATE-----
32 changes: 5 additions & 27 deletions .buildkite/certs/testnode.key
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvHi1y92V+b/CZR3H4PvegaatuBHoqlfu0Tzym3B/NDg45BE6
mFKWpvk3DpdoLdt6f66Yj0kqTl/KRXZmO/ME5saNhgkGf3W9odIGTjmKW/B0JLvo
SeGwJrc4s66llu+ls3LHp9w0lJE9GypCU41DJsFYUWjKX7/BCHFG6xwMHN1Qo+4K
5xS9JHQLkGuosgR+CJU1GDiDlchCfM2e0eASTt0FPk0biefsP0ImTHg6sba3Qy9+
72EBz1uy/1yEggjjKbAN2r8xaYaEFwUPJo3QfE8ZHeLB+5iU6p0aeSC4Uc1aXDz4
EGBXiAeeuwfpBXkmrmiSZnNBFYDnCuWkjLTh9wIDAQABAoIBAAU0iEDTI9s78pB8
XBLYofKOuemFhRl/SDc7KbAlUT4N93RFDYs7bLG73Eto3xW1JBL2rXv3l1WGy71T
YctyEMaW4T28bhODGvOnK0lpyWp0n6CMGARCWW0YTlaYEjay866bEuyN5l3cDQX9
Csvn8NzXJitJa51tXFVxW3YO1j7Nyc/M59oyBZ1ARYYmQqFYLEu6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cCAQEEIN+K8+F47YchiH+7gA8KBG8u35PWcOJN+Fszv8TPEEpdoAoGCCqGSM49
AwEHoUQDQgAEqelGnUWdGT9xdinhJCFDn9AfBjk1+eQfdUTvzy1EG9usGXFphxjz
idBwMvRdhGPqydcw1J3weZrKMHov4rqGjA==
-----END EC PRIVATE KEY-----
18 changes: 15 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
steps:
- label: ":elasticsearch: :python: ES Python ({{ matrix.python }})"
- label: ":elasticsearch: :python: ES Python {{ matrix.python }} {{ matrix.nox_session }} ({{ matrix.connection }})"
agents:
provider: "gcp"
env:
PYTHON_VERSION: "{{ matrix.python }}"
TEST_SUITE: "platinum"
STACK_VERSION: "8.11.0-SNAPSHOT"
STACK_VERSION: "8.16.0-SNAPSHOT"
PYTHON_CONNECTION_CLASS: "{{ matrix.connection }}"
NOX_SESSION: "{{ matrix.nox_session }}"
matrix:
setup:
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
connection:
- "urllib3"
- "requests"
nox_session:
- "test"
adjustments:
- with:
python: "3.8"
connection: "urllib3"
nox_session: "test_otel"
- with:
python: "3.13"
connection: "urllib3"
nox_session: "test_otel"
command: ./.buildkite/run-tests
4 changes: 3 additions & 1 deletion .buildkite/run-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ echo -e "\033[34;1mINFO:\033[0m URL ${ELASTICSEARCH_URL}\033[0m"
echo -e "\033[34;1mINFO:\033[0m VERSION ${ELASTICSEARCH_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m CONTAINER ${ELASTICSEARCH_CONTAINER}\033[0m"
echo -e "\033[34;1mINFO:\033[0m TEST_SUITE ${TEST_SUITE}\033[0m"
echo -e "\033[34;1mINFO:\033[0m NOX_SESSION ${NOX_SESSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m PYTHON_VERSION ${PYTHON_VERSION}\033[0m"
echo -e "\033[34;1mINFO:\033[0m PYTHON_CONNECTION_CLASS ${PYTHON_CONNECTION_CLASS}\033[0m"

Expand All @@ -42,7 +43,8 @@ docker run \
--env "TEST_SUITE=${TEST_SUITE}" \
--env "PYTHON_CONNECTION_CLASS=${PYTHON_CONNECTION_CLASS}" \
--env "TEST_TYPE=server" \
--env "FORCE_COLOR=1" \
--name elasticsearch-py \
--rm \
elastic/elasticsearch-py \
nox -s test-${PYTHON_VERSION}
nox -s ${NOX_SESSION}-${PYTHON_VERSION}
4 changes: 2 additions & 2 deletions .buildkite/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Default environment variables
export STACK_VERSION="${STACK_VERSION:=8.0.0-SNAPSHOT}"
export TEST_SUITE="${TEST_SUITE:=platinum}"
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
export PYTHON_VERSION="${PYTHON_VERSION:=3.13}"
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}"

script_path=$(dirname $(realpath -s $0))
Expand All @@ -18,7 +18,7 @@ echo "--- :elasticsearch: Starting Elasticsearch"
DETACH=true bash $script_path/run-elasticsearch.sh

if [[ -n "$RUNSCRIPTS" ]]; then
for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
for RUNSCRIPT in ${RUNSCRIPTS//,/ }; do
echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
CONTAINER_NAME=${RUNSCRIPT} \
DETACH=true \
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.x"
- name: Install dependencies
run: |
python3 -m pip install nox
- name: Lint the code
run: nox -s lint

package:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python3 -m pip install build
- name: Build dists
run: python utils/build-dists.py

test-linux:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
nox-session: [""]
runs-on: ["ubuntu-latest"]

Expand All @@ -32,9 +47,9 @@ jobs:
continue-on-error: false
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set Up Python - ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
node_modules

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
5 changes: 3 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ build:
# to set AIOHTTP_NO_EXTENSIONS to 1 but it has to be done in
# https://readthedocs.org/dashboard/elasticsearch-py/environmentvariables/
# because of https://github.com/readthedocs/readthedocs.org/issues/6311
python: "3.12"
python: "3"

python:
install:
- requirements: dev-requirements.txt
- path: .
extra_requirements:
- "docs"
14 changes: 0 additions & 14 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit 63e4de3

Please sign in to comment.