Skip to content

Commit 51be886

Browse files
committed
Merge remote-tracking branch 'origin/dev' into CLIENT-2790-deprecate-value_byte_size
2 parents f4b0e6b + 428047e commit 51be886

File tree

220 files changed

+10446
-4112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+10446
-4112
lines changed

.build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: aerospike-client-python
22

33
container:
44
- base:
5-
- docker.qe.aerospike.com/build/aerospike-client-python:manylinux2014
6-
- docker.qe.aerospike.com/build/aerospike-client-python:arm-manylinux2014
5+
- docker.qe.aerospike.com/build/aerospike-client-python:manylinux_2_28
6+
- docker.qe.aerospike.com/build/aerospike-client-python:arm-manylinux_2_28
77

88
build:
99
- name: build
1010
environment:
11-
PYTHONS: /opt/python/cp38-cp38/bin,/opt/python/cp39-cp39/bin,/opt/python/cp310-cp310/bin,/opt/python/cp311-cp311/bin,/opt/python/cp312-cp312/bin,/opt/python/cp313-cp313/bin
11+
PYTHONS: /opt/python/cp310-cp310/bin,/opt/python/cp311-cp311/bin,/opt/python/cp312-cp312/bin,/opt/python/cp313-cp313/bin,/opt/python/cp314-cp314/bin
1212
script:
13-
- scripts/manylinux2014build.sh
13+
- scripts/manylinux2_28_build.sh
1414
artifact:
1515
- /work/wheels/*.whl

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ max-line-length = 120
44
extend-ignore = E203
55
filename =
66
./aerospike_helpers/**/*.py,
7-
./test/**/*.py
7+
./test/new_tests/**/*.py
8+
./test/standalone/**/*.py

.github/actions/get-artifact-for-stage-tests/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runs:
4949
run: echo "GITHUB_ARTIFACT_NAME=${{ env.PYTHON_TAG }}-${{ inputs.wheel_os }}_${{ inputs.wheel_cpu_arch }}.build" >> $GITHUB_ENV
5050
shell: bash
5151

52-
- uses: actions/download-artifact@v4
52+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
5353
if: ${{ inputs.get_from_jfrog == 'false' }}
5454
with:
5555
name: ${{ env.GITHUB_ARTIFACT_NAME }}
@@ -70,7 +70,7 @@ runs:
7070
# End codepath that downloads artifacts from Github
7171
# Begin codepath that downloads from JFrog
7272

73-
- uses: jfrog/setup-jfrog-cli@v4
73+
- uses: jfrog/setup-jfrog-cli@5b06f730cc5a6f55d78b30753f8583454b08c0aa # v4.8.1
7474
if: ${{ inputs.get_from_jfrog == 'true' }}
7575
env:
7676
JF_URL: ${{ inputs.JFROG_PLATFORM_URL }}

.github/actions/run-ee-server/action.yml

Lines changed: 46 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,88 +4,73 @@ description: 'Run EE server. Returns once server is ready. Only tested on Linux
44
# since it's using the default admin / admin credentials
55
inputs:
66
# All inputs in composite actions are strings
7-
use-server-rc:
8-
required: true
9-
description: Deploy server release candidate?
10-
default: 'false'
11-
server-tag:
12-
required: true
13-
description: Specify Docker tag
14-
default: 'latest'
7+
registry-name:
8+
description: Registry name
9+
required: false
10+
default: docker.io
11+
registry-username:
12+
description: Required for using release candidates
13+
required: false
1514
# Github Composite Actions can't access secrets
1615
# so we need to pass them in as inputs
17-
docker-hub-username:
16+
registry-password:
1817
description: Required for using release candidates
1918
required: false
20-
docker-hub-password:
21-
description: Required for using release candidates
19+
image-name:
2220
required: false
21+
description: aerospike/aerospike-server-enterprise
22+
default: 'aerospike/aerospike-server-enterprise'
23+
server-tag:
24+
required: true
25+
description: Specify Docker tag
26+
default: 'latest'
2327
where-is-client-connecting-from:
2428
required: false
2529
description: 'docker-host, separate-docker-container, "remote-connection" via DOCKER_HOST'
2630
default: 'docker-host'
31+
env-vars:
32+
required: false
33+
description: Used to disable server features
34+
default: 'STRONG_CONSISTENCY=1 SECURITY=1 MUTUAL_TLS=1'
2735

2836
runs:
2937
using: "composite"
3038
steps:
3139
# Start up server
3240

33-
- name: Log into Docker Hub to get server RC
34-
if: ${{ inputs.use-server-rc == 'true' }}
35-
run: docker login --username ${{ inputs.docker-hub-username }} --password ${{ inputs.docker-hub-password }}
36-
shell: bash
37-
38-
- run: echo IMAGE_NAME=aerospike/aerospike-server-enterprise${{ inputs.use-server-rc == 'true' && '-rc' || '' }}:${{ inputs.server-tag }} >> $GITHUB_ENV
39-
shell: bash
41+
- name: Log into registry to get non-public server RCs
42+
# We can still pull public images while logged in, so just do this all the time to make things simple
43+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
44+
with:
45+
registry: ${{ inputs.registry-name }}
46+
username: ${{ inputs.registry-username }}
47+
password: ${{ inputs.registry-password }}
4048

41-
- run: echo NEW_IMAGE_NAME=${{ env.IMAGE_NAME }}-python-client-testing >> $GITHUB_ENV
49+
- run: echo IMAGE_FULL_NAME=${{ inputs.registry-name }}/${{ inputs.image-name }}:${{ inputs.server-tag }} >> $GITHUB_ENV
4250
shell: bash
4351

44-
# macOS Github runners and Windows self-hosted runners don't have buildx installed by default
45-
- if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }}
46-
uses: docker/setup-buildx-action@v3
47-
4852
- run: echo CA_CERT_FILE_NAME="ca.cer" >> $GITHUB_ENV
4953
shell: bash
5054

5155
- run: echo TLS_PORT="4333" >> $GITHUB_ENV
5256
shell: bash
5357

54-
- name: Build Aerospike server Docker image for testing
55-
# We enable TLS standard authentication to verify that the OpenSSL library bundled with the wheel works
56-
# You can manually verify this by enabling debug logging in the client and checking that the server certificate was verified
57-
uses: docker/build-push-action@v6
58-
with:
59-
# Don't want to use default Git context or else it will clone the whole Python client repo again
60-
context: .github/workflows/docker-build-context
61-
build-args: |
62-
SERVER_IMAGE=${{ env.IMAGE_NAME }}
63-
TLS_PORT=${{ env.TLS_PORT }}
64-
tags: ${{ env.NEW_IMAGE_NAME }}
65-
# setup-buildx-action configures Docker to use the docker-container build driver
66-
# This driver doesn't publish an image locally by default
67-
# so we have to manually enable it
68-
load: true
69-
70-
- run: echo SERVER_CONTAINER_NAME="aerospike" >> $GITHUB_ENV
71-
shell: bash
72-
73-
- run: docker run -d --name ${{ env.SERVER_CONTAINER_NAME }} -p 3000:3000 -p ${{ env.TLS_PORT }}:${{ env.TLS_PORT }} ${{ env.NEW_IMAGE_NAME }}
74-
shell: bash
75-
7658
- name: 'macOS: install timeout command'
7759
if: ${{ runner.os == 'macOS' }}
7860
run: brew install coreutils
7961
shell: bash
8062

81-
- name: Wait for container to be healthy
82-
run: |
83-
timeout 30s bash -c 'until [[ "$(docker inspect -f {{.State.Health.Status}} ${{ env.SERVER_CONTAINER_NAME }})" == "healthy" ]]; do sleep 0.1; done'
63+
# Github composite actions don't support env variables for the whole composite action,
64+
# so this is a workaround
65+
- id: get-container-name
66+
run: echo container-name=aerospike >> $GITHUB_OUTPUT
8467
shell: bash
8568

86-
# For debugging
87-
- run: docker logs ${{ env.SERVER_CONTAINER_NAME }}
69+
- run: ${{ inputs.env-vars }} bash ./run-ee-server.bash
70+
working-directory: .github/workflows/docker-setup
8871
shell: bash
72+
env:
73+
CONTAINER_NAME: ${{ steps.get-container-name.outputs.container-name }}
8974

9075
# Configure tests
9176

@@ -113,7 +98,10 @@ runs:
11398
crudini --existing=param --set config.conf enterprise-edition password ${{ env.SUPERUSER_NAME_AND_PASSWORD }}
11499
crudini --set config.conf tls enable true
115100
# Cannot use abs path because config.conf is copied into Docker container during cibuildwheel tests
116-
crudini --set config.conf tls cafile ../.github/workflows/docker-build-context/${{ env.CA_CERT_FILE_NAME }}
101+
crudini --set config.conf tls cafile ../.github/workflows/docker-setup/${{ env.CA_CERT_FILE_NAME }}
102+
crudini --set config.conf tls keyfile ../.github/workflows/docker-setup/client.pem
103+
crudini --set config.conf tls certfile ../.github/workflows/docker-setup/client.cer
104+
117105
working-directory: test
118106
shell: bash
119107

@@ -133,19 +121,19 @@ runs:
133121

134122
- name: Set IP address to Docker container for the server
135123
if: ${{ inputs.where-is-client-connecting-from == 'separate-docker-container' }}
136-
run: echo SERVER_IP=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' ${{ env.SERVER_CONTAINER_NAME }}) >> $GITHUB_ENV
124+
run: echo SERVER_IP=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' ${{ steps.get-container-name.outputs.container-name }}) >> $GITHUB_ENV
137125
shell: bash
138126

139127
- name: Invalid input
140128
if: ${{ env.SERVER_IP == '' }}
141129
run: exit 1
142130
shell: bash
143131

144-
- name: Get cluster name
145-
run: echo CLUSTER_NAME=$(docker exec ${{ env.SERVER_CONTAINER_NAME }} asinfo -v "get-config:context=service" -l | grep -i cluster-name | cut -d = -f 2) >> $GITHUB_ENV
146-
shell: bash
147-
148-
- name: Set EE server's IP address
149-
run: crudini --existing=param --set config.conf enterprise-edition hosts "${{ env.SERVER_IP }}:${{ env.TLS_PORT }}|${{ env.CLUSTER_NAME }}"
132+
# Here we just assume that TLS is enabled. Whenever the dev tests are run with run-ee-server.yml, TLS is enabled anyways.
133+
# TODO: but this needs to be fixed eventually for other clients that disable TLS for their tests.
134+
- name: Set EE server's IP address and TLS name for test config
135+
run: |
136+
cluster_name=$(docker run --rm --network host aerospike/aerospike-tools asinfo -U admin -P admin -v "get-config:context=service" -l | grep -i cluster-name | cut -d = -f 2)
137+
crudini --existing=param --set config.conf enterprise-edition hosts "${{ env.SERVER_IP }}:${{ env.TLS_PORT }}|${cluster_name}"
150138
working-directory: test
151139
shell: bash

.github/actions/wait-for-ce-server-to-start/action.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ runs:
1212
- run: echo WAIT_SCRIPT_FILE_NAME=wait-for-as-server-to-start.bash >> $GITHUB_ENV
1313
shell: bash
1414

15-
- name: Copy wait script in server Docker container
16-
run: docker cp $WAIT_SCRIPT_FILE_NAME ${{ inputs.container-name }}:/
17-
working-directory: .github/workflows/docker-build-context
18-
shell: bash
19-
2015
# There is no healthcheck by default in the server CE Docker image.
2116
# We can just reuse our wait script. because the CE server should be ready after it finishes.
2217
- name: Wait for EE server to start
2318
# Composite actions doesn't support step-level timeout-minutes, so we use timeout command.
2419
# Call bash shell explicitly since timeout uses "sh" shell by default, for some reason
25-
run: docker exec ${{ inputs.container-name }} timeout 30s bash /$WAIT_SCRIPT_FILE_NAME
20+
run: timeout 30s bash $WAIT_SCRIPT_FILE_NAME
2621
shell: bash
22+
working-directory: .github/workflows/docker-setup

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ updates:
99
# Check for updates to GitHub Actions every weekday
1010
interval: "daily"
1111
target-branch: "dev"
12+
- package-ecosystem: "pip"
13+
directories:
14+
- "**/*"
15+
schedule:
16+
interval: "daily"
17+
target-branch: "dev"

.github/workflows/build-and-run-stage-tests.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
name: Build artifacts and run stage tests
2-
run-name: Build artifacts and run stage tests (use-server-rc=${{ inputs.use-server-rc }}, server-tag=${{ inputs.server-tag }}, test-macos-x86=${{ inputs.test-macos-x86 }})
2+
run-name: Build artifacts and run stage tests (registry-name=${{ inputs.registry-name }}, server-tag=${{ inputs.server-tag }}, test-macos-x86=${{ inputs.test-macos-x86 }})
33

44
on:
55
workflow_dispatch:
66
inputs:
7-
use-server-rc:
8-
type: boolean
9-
required: true
10-
default: false
11-
description: 'Test against server release candidate?'
7+
registry-name:
8+
type: string
9+
required: false
10+
description: Registry name
11+
default: 'docker.io'
12+
image-name:
13+
type: string
14+
required: false
15+
description: Image name
16+
default: 'aerospike/aerospike-server-enterprise'
1217
server-tag:
1318
type: string
1419
required: true
@@ -27,7 +32,10 @@ jobs:
2732
platform-tag: [
2833
"manylinux_x86_64",
2934
"manylinux_aarch64",
30-
"macosx_x86_64"
35+
# For macos 15
36+
"macosx_x86_64",
37+
# For macos 26
38+
"macosx_arm64"
3139
]
3240
# Need all the artifacts to run all the stage tests, so fail fast
3341
uses: ./.github/workflows/build-wheels.yml
@@ -50,6 +58,7 @@ jobs:
5058
secrets: inherit
5159
with:
5260
use_jfrog_builds: false
53-
use-server-rc: ${{ inputs.use-server-rc }}
61+
registry-name: ${{ inputs.registry-name }}
62+
image-name: ${{ inputs.image-name }}
5463
server-tag: ${{ inputs.server-tag }}
5564
test-macos-x86: ${{ inputs.test-macos-x86 }}

.github/workflows/build-artifacts.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Build artifacts
2-
run-name: Build artifacts (run_tests=${{ inputs.run_tests }}, use-server-rc=${{ inputs.use-server-rc }}, server-tag=${{ inputs.server-tag }})
2+
run-name: Build artifacts (run_tests=${{ inputs.run_tests }}, registry-name=${{ inputs.registry-name }}, server-tag=${{ inputs.server-tag }})
33

44
# Builds manylinux wheels and source distribution
55
# Optionally run tests on manylinux wheels
@@ -24,11 +24,16 @@ on:
2424
required: true
2525
type: boolean
2626
default: false
27-
use-server-rc:
28-
type: boolean
27+
registry-name:
28+
type: string
2929
required: true
30-
default: false
31-
description: 'Test against server release candidate? (e.g to test new server features)'
30+
description: Registry name
31+
default: 'docker.io'
32+
image-name:
33+
type: string
34+
required: true
35+
description: Image name
36+
default: 'aerospike/aerospike-server-enterprise'
3237
server-tag:
3338
type: string
3439
required: true
@@ -68,10 +73,14 @@ on:
6873
type: boolean
6974
required: false
7075
default: false
71-
use-server-rc:
76+
registry-name:
77+
type: string
7278
required: false
73-
default: false
74-
type: boolean
79+
default: 'docker.io'
80+
image-name:
81+
type: string
82+
required: false
83+
default: 'aerospike/aerospike-server-enterprise'
7584
server-tag:
7685
type: string
7786
required: false
@@ -112,8 +121,9 @@ jobs:
112121
sha-to-build-and-test: ${{ inputs.is_workflow_call == true && inputs.sha-to-build-and-test || github.sha }}
113122
unoptimized: ${{ inputs.unoptimized }}
114123
include-debug-info-for-macos: ${{ inputs.include-debug-info-for-macos }}
124+
registry-name: ${{ inputs.registry-name }}
125+
image-name: ${{ inputs.image-name }}
115126
run_tests: ${{ inputs.run_tests }}
116-
use-server-rc: ${{ inputs.use-server-rc }}
117127
server-tag: ${{ inputs.server-tag }}
118128
test-file: ${{ inputs.test-file }}
119129
secrets: inherit

.github/workflows/build-sdist.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@ jobs:
1919
name: Build source distribution
2020
runs-on: ubuntu-22.04
2121
steps:
22+
- name: Harden the runner (Audit all outbound calls)
23+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
24+
with:
25+
egress-policy: audit
26+
2227
- name: Show job status for commit
2328
# Commit status will already be shown by the calling workflow for push and pull request events, but not
2429
# for any other event like workflow_dispatch. so we have to do it manually
2530
# If workflow_call triggered this job, github.event_name will inherit the event of the calling workflow
2631
# The calling workflow can be triggered by push or pull request events, so there's that
2732
# https://github.com/actions/runner/issues/3146#issuecomment-2000017097
2833
if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }}
29-
uses: myrotvorets/[email protected].0
34+
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
3035
with:
3136
sha: ${{ env.COMMIT_SHA_TO_BUILD }}
3237
context: ${{ env.STATUS_CHECK_MESSAGE }}
3338

34-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3540
with:
3641
submodules: recursive
3742
ref: ${{ env.COMMIT_SHA_TO_BUILD }}
@@ -44,13 +49,13 @@ jobs:
4449
run: python3 -m build --sdist
4550

4651
- name: Upload source distribution to GitHub
47-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4853
with:
4954
path: ./dist/*.tar.gz
5055
name: sdist.build
5156

5257
- name: Set final commit status
53-
uses: myrotvorets/[email protected].0
58+
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1
5459
# Always run even if job failed or is cancelled
5560
# But we don't want to show anything if the calling workflow was triggered by these events
5661
if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)