Skip to content

Commit 34c93b6

Browse files
committed
Merge remote-tracking branch 'origin/stage' into CLIENT-2158-move-base64-methods
# Conflicts: # src/main/aerospike.c # test/new_tests/test_get_cdtctx_base64.py # test/new_tests/test_query.py
2 parents 18badef + 7a9311d commit 34c93b6

526 files changed

Lines changed: 40685 additions & 36405 deletions

File tree

Some content is hidden

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

.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/cp37-cp37m/bin,/opt/python/cp38-cp38/bin,/opt/python/cp39-cp39/bin,/opt/python/cp310-cp310/bin,/opt/python/cp311-cp311/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
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: 'Run server and configure tests'
2+
description: 'Run server in a Docker container. Also configure python client integration tests'
3+
# NOTE: do not share this server container with others
4+
# since it's using the default admin / admin credentials
5+
outputs:
6+
container-network:
7+
description: Forwards the container's network name from setup-as-server
8+
value: ${{ steps.setup-as-server.outputs.network-name }}
9+
container-name:
10+
description: Forwards the container name from setup-as-server
11+
value: ${{ steps.setup-as-server.outputs.container-names }}
12+
inputs:
13+
# All inputs in composite actions are strings
14+
oidc-provider-name:
15+
description: For pulling server images from JFrog
16+
required: true
17+
oidc-audience:
18+
description: For pulling server images from JFrog
19+
required: true
20+
server-edition:
21+
required: true
22+
description: 'community or enterprise'
23+
features-content:
24+
description: Only used if server edition is enterprise. For enabling strong consistency
25+
required: true
26+
server-tag:
27+
required: true
28+
description: Specify Docker tag
29+
where-is-client-connecting-from:
30+
required: false
31+
description: 'docker-host, separate-docker-container, "remote-connection" via DOCKER_HOST'
32+
default: 'docker-host'
33+
34+
runs:
35+
using: "composite"
36+
steps:
37+
# Start up server
38+
- uses: aerospike/shared-workflows/.github/actions/setup-aerospike-server@bd168dedaa4fc0b17a560541779d815540eded2d # v3.7.0
39+
id: setup-as-server
40+
with:
41+
server-container-repo: database-docker-virtual/aerospike-server${{ inputs.server-edition == 'enterprise' && '-enterprise' || '' }}
42+
enable-security: ${{ inputs.server-edition == 'enterprise' }}
43+
enable-tls: ${{ inputs.server-edition == 'enterprise' }}
44+
enable-strong-consistency: ${{ inputs.server-edition == 'enterprise' }}
45+
features-content: ${{ inputs.features-content }}
46+
num-nodes: 1
47+
oidc-provider: ${{ inputs.oidc-provider-name }}
48+
oidc-audience: ${{ inputs.oidc-audience }}
49+
server-tag: ${{ inputs.server-tag }}
50+
tools-tag: 13.0.2_1
51+
# This way doesn't work, so pass a custom server config for now with this setting enabled
52+
# Problem is the shared action is overriding the entrypoint script that parses this env var
53+
# env-vars: DEFAULT_TTL=2592000;
54+
config-file: ./.github/workflows/aerospike${{ inputs.server-edition == 'community' && '-ce' || '' }}.conf
55+
enable-bash-trace-mode: "true"
56+
57+
- name: Get config.conf
58+
run: |
59+
CONFIG_CONF=config.conf
60+
echo "CONFIG_CONF=$CONFIG_CONF" >> "$GITHUB_ENV"
61+
cp config.conf.template "$CONFIG_CONF"
62+
working-directory: test
63+
shell: bash -ex {0}
64+
65+
- if: ${{ inputs.server-edition == 'enterprise' }}
66+
run: |
67+
call_from_tools_container() {
68+
# See comment in run-ee-server.bash's call_from_tools_container() for why we surround $@ with double quotes
69+
docker run --rm --network host aerospike/aerospike-tools "$@"
70+
}
71+
72+
SUPERUSER_NAME_AND_PASSWORD="superuser"
73+
call_from_tools_container asadm -U admin -P admin --enable --execute "manage acl \
74+
create user "$SUPERUSER_NAME_AND_PASSWORD" password "$SUPERUSER_NAME_AND_PASSWORD" \
75+
roles read-write-udf, sys-admin, user-admin, data-admin"
76+
77+
# Install crudini to manipulate config.conf
78+
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
79+
80+
# Disable community edition connection
81+
crudini --existing=param --set "$CONFIG_CONF" community-edition hosts ''
82+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition user "$SUPERUSER_NAME_AND_PASSWORD"
83+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition password "$SUPERUSER_NAME_AND_PASSWORD"
84+
crudini --set "$CONFIG_CONF" tls enable true
85+
86+
tls_cert_dir=${{ steps.setup-as-server.outputs.tls-cert-dir }}
87+
if [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "separate-docker-container" ]]; then
88+
tls_cert_dir="/host${tls_cert_dir}"
89+
fi
90+
91+
crudini --set "$CONFIG_CONF" tls cafile $tls_cert_dir/ca.crt
92+
crudini --set "$CONFIG_CONF" tls keyfile $tls_cert_dir/client.key
93+
crudini --set "$CONFIG_CONF" tls certfile $tls_cert_dir/client.crt
94+
95+
if [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "docker-host" ]]; then
96+
SERVER_IP=127.0.0.1
97+
elif [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "remote-connection" ]]; then
98+
# Set IP address to remote machine running the Docker daemon
99+
SERVER_IP=${DOCKER_HOST/tcp:\/\//}
100+
SERVER_IP=${SERVER_IP/:2375/}
101+
elif [[ "$WHERE_IS_CLIENT_CONNECTING_FROM" == "separate-docker-container" ]]; then
102+
SERVER_IP="$SERVER_CONTAINER_NAME"
103+
else
104+
# Invalid input
105+
exit 1
106+
fi
107+
108+
# Set EE server's IP address and TLS name for test config
109+
cluster_name=$(call_from_tools_container asinfo -U admin -P admin -v "get-config:context=service" -l | grep -i cluster-name | cut -d = -f 2)
110+
crudini --existing=param --set "$CONFIG_CONF" enterprise-edition hosts "${SERVER_IP}:${TLS_PORT}|${cluster_name}"
111+
working-directory: test
112+
shell: bash -ex {0}
113+
env:
114+
WHERE_IS_CLIENT_CONNECTING_FROM: "${{ inputs.where-is-client-connecting-from }}"
115+
TLS_PORT: ${{ steps.setup-as-server.outputs.tls-service-ports }}
116+
SERVER_CONTAINER_NAME: ${{ steps.setup-as-server.outputs.container-names }}

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every weekday
10+
interval: "daily"
11+
target-branch: "stage"
12+
13+
- package-ecosystem: pip
14+
directory: /.github/workflows
15+
schedule:
16+
interval: daily
17+
target-branch: "stage"
18+
19+
- package-ecosystem: pip
20+
directory: /doc
21+
schedule:
22+
interval: daily
23+
target-branch: "stage"
24+
25+
- package-ecosystem: pip
26+
directory: /
27+
schedule:
28+
interval: daily
29+
target-branch: "stage"
30+
31+
- package-ecosystem: pip
32+
directory: /test
33+
schedule:
34+
interval: daily
35+
target-branch: "stage"
36+
37+
- package-ecosystem: pip
38+
directory: /test/standalone
39+
schedule:
40+
interval: daily
41+
target-branch: "stage"
42+
43+
- package-ecosystem: gitsubmodule
44+
directory: /
45+
schedule:
46+
interval: daily
47+
target-branch: "stage"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
service {
2+
cluster-name docker
3+
proto-fd-max 15000
4+
}
5+
6+
logging {
7+
console {
8+
context any debug
9+
}
10+
}
11+
12+
network {
13+
service {
14+
address any
15+
port 3000
16+
}
17+
heartbeat {
18+
mode mesh
19+
port 3002
20+
}
21+
fabric {
22+
port 3001
23+
}
24+
}
25+
26+
namespace test {
27+
replication-factor 1
28+
default-ttl 30d
29+
allow-ttl-without-nsup true
30+
storage-engine device {
31+
file /opt/aerospike/data/test.dat
32+
filesize 4G
33+
}
34+
}

.github/workflows/aerospike.conf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
service {
2+
feature-key-file /etc/aerospike/features.conf
3+
cluster-name docker
4+
proto-fd-max 15000
5+
}
6+
7+
security {
8+
enable-quotas true
9+
}
10+
11+
logging {
12+
console {
13+
context any debug
14+
}
15+
}
16+
17+
network {
18+
tls aerospike-tls {
19+
cert-file /etc/aerospike/tls/server.crt
20+
key-file /etc/aerospike/tls/server.key
21+
ca-file /etc/aerospike/tls/ca.crt
22+
}
23+
service {
24+
address any
25+
port 3000
26+
tls-port 4333
27+
tls-authenticate-client false
28+
tls-name aerospike-tls
29+
}
30+
heartbeat {
31+
mode mesh
32+
port 3002
33+
}
34+
fabric {
35+
port 3001
36+
}
37+
}
38+
39+
namespace test {
40+
replication-factor 1
41+
strong-consistency true
42+
strong-consistency-allow-expunge true
43+
default-ttl 30d
44+
allow-ttl-without-nsup true
45+
storage-engine device {
46+
file /opt/aerospike/data/test.dat
47+
filesize 4G
48+
}
49+
}

0 commit comments

Comments
 (0)