Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT-3121] Support multi-record transactions #674

Merged
merged 288 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
8ad9d1f
Fix stub
juliannguyen4 Sep 19, 2024
d9688d8
Fix
juliannguyen4 Sep 19, 2024
379bdbe
Fully test API
juliannguyen4 Sep 19, 2024
e31148f
Fully test API
juliannguyen4 Sep 19, 2024
2517772
return type
juliannguyen4 Sep 19, 2024
b4a1cd5
Cast
juliannguyen4 Sep 19, 2024
c72e020
Fix test
juliannguyen4 Sep 19, 2024
bfbfa9a
final
juliannguyen4 Sep 19, 2024
3e7112c
api tests dont need server
juliannguyen4 Sep 19, 2024
be67efb
Fix seg fault and allow init more than once
juliannguyen4 Sep 19, 2024
e94b962
fix
juliannguyen4 Sep 19, 2024
221bb5f
fix test
juliannguyen4 Sep 19, 2024
10c9930
oop
juliannguyen4 Sep 19, 2024
edf84d9
fix
juliannguyen4 Sep 19, 2024
20bc078
Fix test
juliannguyen4 Sep 19, 2024
4dc3406
fix test
juliannguyen4 Sep 20, 2024
0d317ea
update c client
juliannguyen4 Sep 23, 2024
17c3385
MRT tests require EE
juliannguyen4 Sep 23, 2024
524d909
(temp) remove version check
juliannguyen4 Sep 23, 2024
06313c7
Finish basic usage test
juliannguyen4 Sep 23, 2024
959d6db
Add back version check
juliannguyen4 Sep 24, 2024
4802a70
add cleanup code
juliannguyen4 Sep 24, 2024
d392545
add server tag opt
juliannguyen4 Sep 24, 2024
6f45223
Logs
juliannguyen4 Sep 24, 2024
6dd9c5e
run mrts in ee job
juliannguyen4 Sep 25, 2024
bf75415
Merge remote-tracking branch 'origin/dev' into CLIENT-3121-mrt
juliannguyen4 Sep 25, 2024
b90afb6
add more tests
juliannguyen4 Sep 26, 2024
b1f2ce7
add missing fixture
juliannguyen4 Sep 26, 2024
c32a15b
update docs, fix tests
juliannguyen4 Sep 27, 2024
85ddbda
Add missing folder
juliannguyen4 Sep 27, 2024
04a8028
wip
juliannguyen4 Sep 27, 2024
cc1b7c8
Just get rid of overview
juliannguyen4 Sep 27, 2024
05e7b55
fix
juliannguyen4 Sep 27, 2024
ba646e7
Check 32 bit bound
juliannguyen4 Sep 27, 2024
3ebb6d6
fix
juliannguyen4 Sep 27, 2024
0f8bb23
add reinit test
juliannguyen4 Sep 27, 2024
cd69e33
cleanup
juliannguyen4 Sep 30, 2024
3f360ff
Dont need to teardown
juliannguyen4 Sep 30, 2024
9ed0000
Finish testing
juliannguyen4 Sep 30, 2024
9ed5191
Increase codecov
juliannguyen4 Sep 30, 2024
4944201
Increase codecov
juliannguyen4 Sep 30, 2024
4bee06d
increase codecov
juliannguyen4 Sep 30, 2024
aa3fb59
Fix
juliannguyen4 Sep 30, 2024
19d599a
Fix
juliannguyen4 Sep 30, 2024
4d61455
F
juliannguyen4 Sep 30, 2024
e343c29
Add to rest of policies
juliannguyen4 Sep 30, 2024
cf34c88
Fix
juliannguyen4 Sep 30, 2024
b40e685
Fix
juliannguyen4 Sep 30, 2024
12344a6
Add comment
juliannguyen4 Sep 30, 2024
fa1ccf8
Fix
juliannguyen4 Oct 1, 2024
d2abffa
Add option to run wheel test against select file
juliannguyen4 Oct 1, 2024
00a35a0
wip enable sc
juliannguyen4 Oct 1, 2024
826170f
add
juliannguyen4 Oct 1, 2024
f25b725
add
juliannguyen4 Oct 1, 2024
d384e7d
add support for new arg
juliannguyen4 Oct 2, 2024
eee22d2
try running without features conf
juliannguyen4 Oct 2, 2024
8c46fb8
checkout
juliannguyen4 Oct 2, 2024
236b8e6
Don't auth when not needed
juliannguyen4 Oct 2, 2024
c5c3f22
fix
juliannguyen4 Oct 2, 2024
16eed43
Run tests
juliannguyen4 Oct 2, 2024
1f8b605
fix
juliannguyen4 Oct 2, 2024
fee1b12
run with pytest
juliannguyen4 Oct 2, 2024
434e4ea
Fix
juliannguyen4 Oct 2, 2024
f1b91eb
use classic
juliannguyen4 Oct 2, 2024
1be9e9d
Get roster
juliannguyen4 Oct 2, 2024
6facf2c
dont include quotes
juliannguyen4 Oct 2, 2024
53f041d
use asadm
juliannguyen4 Oct 2, 2024
a33aa9e
fix
juliannguyen4 Oct 2, 2024
2ff84fd
make optional
juliannguyen4 Oct 2, 2024
8960f09
only run if needed
juliannguyen4 Oct 2, 2024
515c763
test
juliannguyen4 Oct 2, 2024
691c4c4
fix test
juliannguyen4 Oct 2, 2024
cf6d798
fix
juliannguyen4 Oct 2, 2024
5c32e94
check intermed get
juliannguyen4 Oct 2, 2024
c0a62cf
Fix
juliannguyen4 Oct 2, 2024
a40849a
check that fixture worked
juliannguyen4 Oct 2, 2024
25fe63f
test
juliannguyen4 Oct 2, 2024
4c1831b
unpack
juliannguyen4 Oct 2, 2024
5c259cd
add roster.smd
juliannguyen4 Oct 2, 2024
786c00d
f
juliannguyen4 Oct 2, 2024
4d5a53f
fix
juliannguyen4 Oct 2, 2024
2697caa
fix
juliannguyen4 Oct 2, 2024
bb31e3a
Replace once
juliannguyen4 Oct 2, 2024
232869d
Fix roster.smd
juliannguyen4 Oct 2, 2024
33024e3
rm
juliannguyen4 Oct 2, 2024
9f88981
Fix
juliannguyen4 Oct 2, 2024
a2e8027
Set up roster on startup for now
juliannguyen4 Oct 2, 2024
8dbbfb0
ignore migrations
juliannguyen4 Oct 2, 2024
0480140
k
juliannguyen4 Oct 2, 2024
1f97007
debug
juliannguyen4 Oct 2, 2024
9e39bbf
f
juliannguyen4 Oct 2, 2024
70e50e0
Merge remote-tracking branch 'origin/dev' into CLIENT-3121-mrt
juliannguyen4 Oct 2, 2024
f897422
fix test
juliannguyen4 Oct 2, 2024
fa3f36a
cleanup
juliannguyen4 Oct 2, 2024
a7ea95e
fix test
juliannguyen4 Oct 2, 2024
adb55b8
try regular ee server
juliannguyen4 Oct 2, 2024
e60d647
Revert "try regular ee server"
juliannguyen4 Oct 3, 2024
f7f68b1
Revert "Set up roster on startup for now"
juliannguyen4 Oct 3, 2024
2be8448
Cleanup
juliannguyen4 Oct 3, 2024
d06760c
recluster
juliannguyen4 Oct 3, 2024
9e393c2
Add constants
juliannguyen4 Oct 3, 2024
0957bee
lint update
juliannguyen4 Oct 3, 2024
0e28d71
add stubs
juliannguyen4 Oct 3, 2024
3768610
fix
juliannguyen4 Oct 3, 2024
bff166e
only run for sc
juliannguyen4 Oct 4, 2024
b5a83b5
fix script
juliannguyen4 Oct 4, 2024
1f27396
dont need features conf
juliannguyen4 Oct 4, 2024
be3b8a6
fix
juliannguyen4 Oct 4, 2024
60c82d6
fix docs
juliannguyen4 Oct 4, 2024
8aba5a9
Create sep folder for build context
juliannguyen4 Oct 4, 2024
adeb4a5
todo
juliannguyen4 Oct 4, 2024
d639328
fix docs
juliannguyen4 Oct 4, 2024
49a6384
Add mrt functionality tests to main test suite
juliannguyen4 Oct 4, 2024
e8c6559
fix test
juliannguyen4 Oct 4, 2024
c4f902f
fix
juliannguyen4 Oct 4, 2024
f7080e2
debug
juliannguyen4 Oct 4, 2024
8f9ea08
deb
juliannguyen4 Oct 4, 2024
1d6b5e1
Fix
juliannguyen4 Oct 4, 2024
81c859a
Fix
juliannguyen4 Oct 4, 2024
4e70016
Fix
juliannguyen4 Oct 4, 2024
9414dba
valid
juliannguyen4 Oct 4, 2024
d98b163
only check sc if ee
juliannguyen4 Oct 4, 2024
1da6e96
always enable sc for ee server
juliannguyen4 Oct 4, 2024
05002ee
from
juliannguyen4 Oct 4, 2024
3633c4b
fix
juliannguyen4 Oct 4, 2024
e088e69
y
juliannguyen4 Oct 4, 2024
c94520b
just combine mrt and admin tests together
juliannguyen4 Oct 4, 2024
bb09adb
add
juliannguyen4 Oct 4, 2024
d302e70
Show detailed errors
juliannguyen4 Oct 4, 2024
16a2bd3
allow non durable dels
juliannguyen4 Oct 4, 2024
d4972da
Fix test for windows
juliannguyen4 Oct 7, 2024
b7a76f4
test
juliannguyen4 Oct 7, 2024
dae8c4c
fix syntax
juliannguyen4 Oct 7, 2024
bf620c0
Dont need to set inputs for sc and security mode
juliannguyen4 Oct 7, 2024
b5e0d6f
Fix test in sc server
juliannguyen4 Oct 7, 2024
cd2d547
fix
juliannguyen4 Oct 7, 2024
61e0464
Fix regression
juliannguyen4 Oct 7, 2024
2c08b66
make sure workflow call doesn't regress
juliannguyen4 Oct 7, 2024
07e46b6
Dynamically fetch node id
juliannguyen4 Oct 7, 2024
2a43a66
clear up
juliannguyen4 Oct 7, 2024
e3f3110
add explanation for commands and transactions
juliannguyen4 Oct 7, 2024
23a1a0f
fix
juliannguyen4 Oct 7, 2024
3fd7666
cleanup
juliannguyen4 Oct 7, 2024
59f2413
Fix outdated docs
juliannguyen4 Oct 7, 2024
2726b97
Try
juliannguyen4 Oct 7, 2024
e2c7396
not opt
juliannguyen4 Oct 7, 2024
22bfe9e
t
juliannguyen4 Oct 7, 2024
dd00817
Document retval
juliannguyen4 Oct 7, 2024
318ad8a
document more clearly
juliannguyen4 Oct 7, 2024
0ab5761
use command substitution inside RUN cmd
juliannguyen4 Oct 7, 2024
fd20434
dont run with sudo
juliannguyen4 Oct 8, 2024
375745a
apt update for some reason
juliannguyen4 Oct 8, 2024
573601b
rm var
juliannguyen4 Oct 8, 2024
51e05de
use multi stage
juliannguyen4 Oct 8, 2024
9966bc1
copy to cwd
juliannguyen4 Oct 8, 2024
888c270
entrypoint
juliannguyen4 Oct 8, 2024
ec69ebd
yes
juliannguyen4 Oct 8, 2024
574bbea
c
juliannguyen4 Oct 8, 2024
1e9cb09
a
juliannguyen4 Oct 8, 2024
376430f
dont need
juliannguyen4 Oct 8, 2024
f0e655f
dont set these at runtime
juliannguyen4 Oct 8, 2024
86cc062
dont need to cp from another stage
juliannguyen4 Oct 8, 2024
dccb9d6
try overriding entrypoint
juliannguyen4 Oct 8, 2024
bb1cb16
try importing busybox
juliannguyen4 Oct 8, 2024
638853b
exec
juliannguyen4 Oct 8, 2024
a1f3639
ref
juliannguyen4 Oct 8, 2024
b1e32c4
declare at top
juliannguyen4 Oct 8, 2024
fc3adc7
src path is preserved
juliannguyen4 Oct 8, 2024
4580add
copy to root
juliannguyen4 Oct 8, 2024
af652c8
copy jq into busybox
juliannguyen4 Oct 8, 2024
49d6948
sh format
juliannguyen4 Oct 8, 2024
aac7f8e
need to include right before?
juliannguyen4 Oct 8, 2024
d9e6ab5
do same
juliannguyen4 Oct 8, 2024
939385c
configure global arg vars properly
juliannguyen4 Oct 8, 2024
ab63dc1
c
juliannguyen4 Oct 8, 2024
b359559
prevent undefined behavior
juliannguyen4 Oct 8, 2024
2e082ae
refactor
juliannguyen4 Oct 8, 2024
4bec99a
make better
juliannguyen4 Oct 8, 2024
88b98d3
cleanup
juliannguyen4 Oct 8, 2024
5c40d07
cleanup
juliannguyen4 Oct 8, 2024
84ee7ef
test neg commit case, cleanup
juliannguyen4 Oct 8, 2024
1efbd53
Fix test
juliannguyen4 Oct 8, 2024
4be89b5
cleanup
juliannguyen4 Oct 9, 2024
938a4c6
Add missing docs
juliannguyen4 Oct 9, 2024
ec2495c
f
juliannguyen4 Oct 9, 2024
31e0df0
fix?
juliannguyen4 Oct 9, 2024
6dbd273
m
juliannguyen4 Oct 9, 2024
a908337
fix
juliannguyen4 Oct 9, 2024
23852ef
rm?
juliannguyen4 Oct 9, 2024
71559ee
b
juliannguyen4 Oct 9, 2024
6f516c7
Add new page
juliannguyen4 Oct 9, 2024
5af94d0
Revert "Add new page"
juliannguyen4 Oct 9, 2024
d3bd605
fix
juliannguyen4 Oct 9, 2024
93c4350
rm dead code
juliannguyen4 Oct 9, 2024
cdb4f47
Set default image in dockerfile, cleanup
juliannguyen4 Oct 9, 2024
226f260
run mrt tests first
juliannguyen4 Oct 9, 2024
282f7a9
fix spellcheck errors
juliannguyen4 Oct 9, 2024
3830ad4
fix spelling errors
juliannguyen4 Oct 9, 2024
adec836
oop
juliannguyen4 Oct 9, 2024
5cc0b6c
Just use docker for node close test
juliannguyen4 Oct 9, 2024
b196553
fix
juliannguyen4 Oct 9, 2024
70e77bf
fix stub
juliannguyen4 Oct 11, 2024
3b91291
update c client to be safe
juliannguyen4 Oct 14, 2024
457463a
Merge branch 'dev' into CLIENT-3121-mrt
juliannguyen4 Oct 23, 2024
153e6b2
Update doc/transaction.rst
juliannguyen4 Oct 29, 2024
be84e7e
Update C client
juliannguyen4 Oct 29, 2024
565f9bf
Update src/main/policy.c
juliannguyen4 Oct 29, 2024
047cea5
Fix incorrect type stubs
juliannguyen4 Oct 29, 2024
d6879e2
fix docs
juliannguyen4 Oct 29, 2024
f3c8069
finish txn new attrs
juliannguyen4 Oct 30, 2024
05db5b9
add id getter
juliannguyen4 Oct 30, 2024
3d87e56
fix
juliannguyen4 Oct 30, 2024
c4caa6a
fix
juliannguyen4 Oct 30, 2024
500544d
return 0 on success
juliannguyen4 Oct 30, 2024
ca9229a
check attrs
juliannguyen4 Oct 30, 2024
419f08a
add test to set timeout
juliannguyen4 Oct 30, 2024
0c61d10
always return status. user can ignore if they dont care
juliannguyen4 Oct 30, 2024
86575c5
update type stubs
juliannguyen4 Oct 30, 2024
0d60932
add attrs to stubs
juliannguyen4 Oct 30, 2024
6b7bb46
add constants for txn state
juliannguyen4 Oct 30, 2024
a19dcbf
Update C client to CLIENT–2294 branch
juliannguyen4 Oct 30, 2024
071f353
add
juliannguyen4 Oct 30, 2024
ada837e
updatedocs
juliannguyen4 Oct 31, 2024
fe06fec
Update C client to fix seg fault
juliannguyen4 Oct 31, 2024
ee5bbf0
Update C client to fix 2 failing batch test cases
juliannguyen4 Nov 1, 2024
c0553ee
revert type stub
juliannguyen4 Nov 4, 2024
675a5e3
not sure if thats how final works
juliannguyen4 Nov 4, 2024
9aa71d4
update docs
juliannguyen4 Nov 4, 2024
61d3780
Fix typo
juliannguyen4 Nov 4, 2024
9c75ccb
space out
juliannguyen4 Nov 4, 2024
4343c70
Fix documentation
juliannguyen4 Nov 4, 2024
f78e027
fix
juliannguyen4 Nov 4, 2024
ed8d181
document
juliannguyen4 Nov 4, 2024
ad82dc1
clear up
juliannguyen4 Nov 4, 2024
f405fa3
dont need sep var for pointer
juliannguyen4 Nov 4, 2024
7d44d1b
rm comment
juliannguyen4 Nov 4, 2024
468d7c7
combine
juliannguyen4 Nov 4, 2024
3a72f43
increase codecov
juliannguyen4 Nov 4, 2024
ec5edbb
allow one parameter to be omitted in txn
juliannguyen4 Nov 4, 2024
6605d41
add space
juliannguyen4 Nov 4, 2024
098003d
Fix
juliannguyen4 Nov 4, 2024
76baa4d
try increasing timeout
juliannguyen4 Nov 4, 2024
87348f0
run another command
juliannguyen4 Nov 4, 2024
bfedfbf
get exact error
juliannguyen4 Nov 4, 2024
9d62c24
add back
juliannguyen4 Nov 4, 2024
304f9c6
reset
juliannguyen4 Nov 4, 2024
50642e5
Fix
juliannguyen4 Nov 4, 2024
616e81b
naming is kinda confusing
juliannguyen4 Nov 5, 2024
c444005
for
juliannguyen4 Nov 5, 2024
666a3c6
Update docs
juliannguyen4 Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 38 additions & 11 deletions .github/actions/run-ee-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ inputs:
# All inputs in composite actions are strings
use-server-rc:
required: true
default: false
description: Deploy server release candidate?
default: 'false'
server-tag:
required: true
description: Specify Docker tag
default: 'latest'
# Github Composite Actions can't access secrets
# so we need to pass them in as inputs
docker-hub-username:
description: Required for using release candidates
required: false
docker-hub-password:
description: Required for using release candidates
required: false

runs:
Expand All @@ -35,13 +39,17 @@ runs:
run: |
crudini --existing=param --set config.conf enterprise-edition hosts ''
crudini --existing=param --set config.conf enterprise-edition hosts 127.0.0.1:3000
crudini --existing=param --set config.conf enterprise-edition user superuser
crudini --existing=param --set config.conf enterprise-edition password superuser
working-directory: test
shell: bash

- name: Create config folder to store configs in
run: mkdir configs
- run: echo SUPERUSER_NAME_AND_PASSWORD="superuser" >> $GITHUB_ENV
shell: bash

- name: Set credentials in config file
run: |
crudini --existing=param --set config.conf enterprise-edition user ${{ env.SUPERUSER_NAME_AND_PASSWORD }}
crudini --existing=param --set config.conf enterprise-edition password ${{ env.SUPERUSER_NAME_AND_PASSWORD }}
working-directory: test
shell: bash

- name: Log into Docker Hub to get server RC
Expand All @@ -52,7 +60,7 @@ runs:
- run: echo IMAGE_NAME=aerospike/aerospike-server-enterprise${{ inputs.use-server-rc == 'true' && '-rc' || '' }}:${{ inputs.server-tag }} >> $GITHUB_ENV
shell: bash

- run: echo SECURITY_IMAGE_NAME=${{ env.IMAGE_NAME }}-security >> $GITHUB_ENV
- run: echo NEW_IMAGE_NAME=${{ env.IMAGE_NAME }}-security-and-sc >> $GITHUB_ENV
shell: bash

# macOS Github runners and Windows self-hosted runners don't have buildx installed by default
Expand All @@ -63,19 +71,38 @@ runs:
uses: docker/build-push-action@v6
with:
# Don't want to use default Git context or else it will clone the whole Python client repo again
context: .github/workflows
context: .github/workflows/docker-build-context
build-args: |
image=${{ env.IMAGE_NAME }}
tags: ${{ env.SECURITY_IMAGE_NAME }}
server_image=${{ env.IMAGE_NAME }}
tags: ${{ env.NEW_IMAGE_NAME }}
# setup-buildx-action configures Docker to use the docker-container build driver
# This driver doesn't publish an image locally by default
# so we have to manually enable it
load: true

- run: docker run -d --name aerospike -p 3000:3000 -e DEFAULT_TTL=2592000 ${{ env.SECURITY_IMAGE_NAME }}
- run: echo SERVER_CONTAINER_NAME="aerospike" >> $GITHUB_ENV
shell: bash

- run: docker run -d --name ${{ env.SERVER_CONTAINER_NAME }} -e DEFAULT_TTL=2592000 -p 3000:3000 ${{ env.NEW_IMAGE_NAME }}
shell: bash

- uses: ./.github/actions/wait-for-as-server-to-start
with:
container-name: aerospike
container-name: ${{ env.SERVER_CONTAINER_NAME }}
is-security-enabled: true
is-strong-consistency-enabled: true

- run: echo ASADM_AUTH_FLAGS="--user=${{ env.SUPERUSER_NAME_AND_PASSWORD }} --password=${{ env.SUPERUSER_NAME_AND_PASSWORD }}" >> $GITHUB_ENV
shell: bash

# All the partitions are assumed to be dead when reusing a roster file
- run: docker exec ${{ env.SERVER_CONTAINER_NAME }} asadm $ASADM_AUTH_FLAGS --enable --execute "manage revive ns test"
shell: bash

# Apply changes
- run: docker exec ${{ env.SERVER_CONTAINER_NAME }} asadm $ASADM_AUTH_FLAGS --enable --execute "manage recluster"
shell: bash

# For debugging
- run: docker logs aerospike
shell: bash
5 changes: 4 additions & 1 deletion .github/actions/wait-for-as-server-to-start/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ inputs:
is-security-enabled:
required: false
default: 'false'
is-strong-consistency-enabled:
required: false
default: 'false'

runs:
using: "composite"
Expand All @@ -21,5 +24,5 @@ runs:
# Also, we don't want to fail if we timeout in case the server *did* finish starting up but the script couldn't detect it due to a bug
# Effectively, this composite action is like calling "sleep" that is optimized to exit early when it detects an ok from the server
- name: Wait for EE server to start
run: timeout 30 bash ./.github/workflows/wait-for-as-server-to-start.bash ${{ inputs.container-name }} ${{ inputs.is-security-enabled }} || true
run: timeout 30 bash ./.github/workflows/wait-for-as-server-to-start.bash ${{ inputs.container-name }} ${{ inputs.is-security-enabled }} ${{ inputs.is-strong-consistency-enabled }} || true
shell: bash
10 changes: 0 additions & 10 deletions .github/workflows/Dockerfile

This file was deleted.

12 changes: 10 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ on:
required: true
default: 'latest'
description: 'Server docker image tag'
test-file:
required: false
default: ''
description: 'new_tests/<value>'

workflow_call:
inputs:
Expand Down Expand Up @@ -106,6 +110,10 @@ on:
type: string
default: 'latest'
description: 'Server docker image tag'
test-file:
required: false
type: string
default: ''
secrets:
# Just make all the secrets required to make things simpler...
DOCKER_HUB_BOT_USERNAME:
Expand Down Expand Up @@ -226,7 +234,7 @@ jobs:

- name: Otherwise, enable integration tests
if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }}
run: echo "TEST_COMMAND=cd {project}/test/ && pip install -r requirements.txt && python -m pytest new_tests/" >> $GITHUB_ENV
run: echo "TEST_COMMAND=cd {project}/test/ && pip install -r requirements.txt && python -m pytest -vv new_tests/${{ inputs.test-file }}" >> $GITHUB_ENV
shell: bash

- name: Set unoptimize flag
Expand Down Expand Up @@ -340,7 +348,7 @@ jobs:
working-directory: test
shell: bash

- run: python3 -m pytest new_tests/
- run: python3 -m pytest -vv new_tests/${{ inputs.test-file }}
working-directory: test
shell: bash

Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/docker-build-context/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG server_image=aerospike/aerospike-server-enterprise
ARG ROSTER_FILE_NAME=roster.smd
# Temp file for passing node id from one build stage to another
# Docker doesn't support command substitution for setting values for ARG variables, so we have to do this
ARG NODE_ID_FILE_NAME=node_id

FROM $server_image as configure-server

WORKDIR /opt/aerospike/smd

# Enable authentication

ARG AEROSPIKE_CONF_TEMPLATE_PATH=/etc/aerospike/aerospike.template.conf

# Not using asconfig to edit config because we are working with a template file, which may not have valid values yet
RUN echo -e "security {\n\tenable-quotas true\n}\n" >> $AEROSPIKE_CONF_TEMPLATE_PATH
# security.smd was generated manually by
# 1. Starting a new Aerospike EE server using Docker
# 2. Creating the superuser user
# 3. Copying /opt/aerospike/smd/security.smd from the container and committing it to this repo
# This file should always work
# TODO: generate this automatically, somehow.
COPY security.smd .

# Enable strong consistency
RUN sed -i "s/\(namespace.*{\)/\1\n\tstrong-consistency true/" $AEROSPIKE_CONF_TEMPLATE_PATH
RUN sed -i "s/\(namespace.*{\)/\1\n\tstrong-consistency-allow-expunge true/" $AEROSPIKE_CONF_TEMPLATE_PATH
ARG ROSTER_FILE_NAME
COPY $ROSTER_FILE_NAME .

# Fetch node id from roster.smd

# There's no tag for the latest major version to prevent breaking changes in jq
# This is the next best thing
FROM ghcr.io/jqlang/jq:1.7 as get-jq
# jq docker image doesn't have a shell
# We need a shell to fetch and pass the node id to the next build stage
FROM busybox as get-node-id
COPY --from=get-jq /jq /bin/
ARG ROSTER_FILE_NAME
COPY $ROSTER_FILE_NAME .
ARG NODE_ID_FILE_NAME
RUN jq --raw-output '.[1].value' $ROSTER_FILE_NAME > $NODE_ID_FILE_NAME

FROM configure-server as set-node-id
ARG NODE_ID_FILE_NAME
COPY --from=get-node-id $NODE_ID_FILE_NAME .
RUN sed -i "s/\(^service {\)/\1\n\tnode-id $(cat $NODE_ID_FILE_NAME)/" $AEROSPIKE_CONF_TEMPLATE_PATH
RUN rm $NODE_ID_FILE_NAME
12 changes: 12 additions & 0 deletions .github/workflows/docker-build-context/roster.smd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
[
97107025374203,
1
],
{
"key": "test",
"value": "a1",
"generation": 1,
"timestamp": 465602976982
}
]
36 changes: 11 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jobs:
mkdir -p nullobject/src/main/nullobject
mkdir -p query/src/main/query
mkdir -p scan/src/main/scan
mkdir -p transaction/src/main/transaction

cd ../../../../
cp src/main/*.c build/temp*/src/main/src/main
Expand All @@ -138,6 +139,7 @@ jobs:
cp src/main/nullobject/*.c build/temp*/src/main/nullobject/src/main/nullobject/
cp src/main/query/*.c build/temp*/src/main/query/src/main/query/
cp src/main/scan/*.c build/temp*/src/main/scan/src/main/scan/
cp src/main/transaction/*.c build/temp*/src/main/transaction/src/main/transaction/

- name: Generate coverage report for all object files
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -372,7 +374,7 @@ jobs:
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}

- name: Run tests
run: python -m pytest ./new_tests/test_admin_*.py
run: python -m pytest ./new_tests/test_{mrt_functionality,admin_*}.py
working-directory: test

- name: Show logs if failed
Expand Down Expand Up @@ -412,30 +414,14 @@ jobs:
run: sphinx-build -b linkcheck . links
working-directory: doc

test-metrics-node-close-listener:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }}
architecture: 'x64'
- name: Download aerolab
run: wget https://github.com/aerospike/aerolab/releases/download/7.5.2/aerolab-linux-amd64-7.5.2.deb
- name: Install aerolab
run: sudo dpkg -i *.deb
- name: Tell aerolab to use Docker
run: aerolab config backend -t docker
- uses: actions/download-artifact@v3
with:
name: wheel-${{ env.LOWEST_SUPPORTED_PY_VERSION }}
- run: python3 -m pip install *.whl
- run: python3 test_node_close_listener.py
working-directory: test/metrics

test-metrics-cluster-name:
test-metrics:
needs: build
strategy:
matrix:
suffix:
- node_close_listener
- cluster_name
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -449,5 +435,5 @@ jobs:
- run: python3 -m pip install *.whl
- run: python3 -m pip install -r requirements.txt
working-directory: test/metrics
- run: python3 test_cluster_name.py
- run: python3 test_${{ matrix.suffix }}.py
working-directory: test/metrics
4 changes: 4 additions & 0 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
description: 'Use server release candidate?'
required: true
default: false
server-tag:
required: false
default: latest
massif:
type: boolean
description: 'Use massif for testing memory usage'
Expand Down Expand Up @@ -57,6 +60,7 @@ jobs:
uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/wait-for-as-server-to-start.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -o pipefail

container_name=$1
is_security_enabled=$2
is_strong_consistency_enabled=$3

if [[ $is_security_enabled == true ]]; then
# We need to pass credentials to asinfo if server requires it
Expand Down Expand Up @@ -38,7 +39,14 @@ done
while true; do
echo "Waiting for server to stabilize (i.e return a cluster key)..."
# We assume that when an ERROR is returned, the cluster is not stable yet (i.e not fully initialized)
if docker exec "$container_name" asinfo $user_credentials -v cluster-stable 2>&1 | (! grep -qE "^ERROR"); then
cluster_stable_info_cmd="cluster-stable"
if [[ $is_strong_consistency_enabled == true ]]; then
# The Dockerfile uses a roster from a previously running Aerospike server in a Docker container
# When we reuse this roster, the server assumes all of its partitions are dead because it's running on a new
# storage device.
cluster_stable_info_cmd="$cluster_stable_info_cmd:ignore-migrations=true"
fi
if docker exec "$container_name" asinfo $user_credentials -v $cluster_stable_info_cmd 2>&1 | (! grep -qE "^ERROR"); then
echo "Server is in a stable state."
break
fi
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
path = aerospike-client-c
# url = git@github.com:aerospike/aerospike-client-c.git
url = https://github.com/aerospike/aerospike-client-c.git
branch = stage
branch = CLIENT-2294
dwelch-spike marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion aerospike-client-c
Submodule aerospike-client-c updated 87 files
+3 −0 Makefile
+1 −0 examples/async_examples/Makefile
+3 −3 examples/async_examples/async_batch_get/src/main/example.c
+2 −2 examples/async_examples/async_delay_queue/src/main/example.c
+4 −0 examples/async_examples/async_transaction/Makefile
+329 −0 examples/async_examples/async_transaction/src/main/example.c
+1 −0 examples/basic_examples/Makefile
+2 −2 examples/basic_examples/append/src/main/example.c
+1 −1 examples/basic_examples/incr/src/main/example.c
+4 −0 examples/basic_examples/transaction/Makefile
+144 −0 examples/basic_examples/transaction/src/main/example.c
+2 −2 examples/batch_examples/get/src/main/example.c
+ project/aerospike_logo.png
+12 −12 project/doxyfile
+116 −0 project/doxygen-awesome-sidebar-only.css
+2,681 −0 project/doxygen-awesome.css
+84 −0 project/header.html
+0 −0 project/layout.xml
+2 −0 project/test.mk
+0 −14 src/apidocs/footer.html
+0 −47 src/apidocs/header.html
+0 −716 src/apidocs/html/aerospike.css
+0 −563 src/apidocs/html/style.css
+0 −1,204 src/apidocs/old.css
+6 −6 src/include/aerospike/aerospike.h
+70 −30 src/include/aerospike/aerospike_batch.h
+93 −6 src/include/aerospike/aerospike_key.h
+6 −6 src/include/aerospike/aerospike_stats.h
+227 −0 src/include/aerospike/aerospike_txn.h
+3 −3 src/include/aerospike/as_admin.h
+21 −8 src/include/aerospike/as_async.h
+1 −1 src/include/aerospike/as_batch.h
+23 −12 src/include/aerospike/as_cluster.h
+124 −21 src/include/aerospike/as_command.h
+5 −5 src/include/aerospike/as_config.h
+2 −2 src/include/aerospike/as_error.h
+21 −16 src/include/aerospike/as_event.h
+27 −2 src/include/aerospike/as_event_internal.h
+3 −3 src/include/aerospike/as_exp.h
+1 −1 src/include/aerospike/as_latency.h
+11 −11 src/include/aerospike/as_node.h
+1 −1 src/include/aerospike/as_operations.h
+184 −45 src/include/aerospike/as_policy.h
+3 −3 src/include/aerospike/as_proto.h
+7 −1 src/include/aerospike/as_query.h
+2 −2 src/include/aerospike/as_record.h
+2 −2 src/include/aerospike/as_socket.h
+33 −2 src/include/aerospike/as_status.h
+287 −0 src/include/aerospike/as_txn.h
+95 −0 src/include/aerospike/as_txn_monitor.h
+1 −1 src/include/aerospike/version.h
+1,463 −304 src/main/aerospike/aerospike_batch.c
+1,093 −258 src/main/aerospike/aerospike_key.c
+13 −5 src/main/aerospike/aerospike_query.c
+7 −4 src/main/aerospike/aerospike_scan.c
+729 −0 src/main/aerospike/aerospike_txn.c
+1 −1 src/main/aerospike/as_cluster.c
+200 −31 src/main/aerospike/as_command.c
+6 −0 src/main/aerospike/as_error.c
+176 −16 src/main/aerospike/as_event.c
+1 −1 src/main/aerospike/as_event_uv.c
+2 −2 src/main/aerospike/as_metrics_writer.c
+3 −3 src/main/aerospike/as_node.c
+8 −4 src/main/aerospike/as_policy.c
+401 −0 src/main/aerospike/as_txn.c
+358 −0 src/main/aerospike/as_txn_monitor.c
+1 −1 src/main/aerospike/version.c
+2 −0 src/test/aerospike_test.c
+918 −0 src/test/transaction.c
+1,151 −0 src/test/transaction_async.c
+1 −1 vs/aerospike-client-c-libevent.nuspec
+1 −1 vs/aerospike-client-c-libuv.nuspec
+1 −1 vs/aerospike-client-c.nuspec
+2 −0 vs/aerospike-test/aerospike-test.vcxproj
+6 −0 vs/aerospike-test/aerospike-test.vcxproj.filters
+54 −0 vs/aerospike.sln
+6 −0 vs/aerospike/aerospike.vcxproj
+18 −0 vs/aerospike/aerospike.vcxproj.filters
+248 −0 vs/examples/async-transaction/async-transaction.vcxproj
+33 −0 vs/examples/async-transaction/async-transaction.vcxproj.filters
+4 −0 vs/examples/async-transaction/packages.config
+4 −0 vs/examples/transaction/packages.config
+248 −0 vs/examples/transaction/transaction.vcxproj
+33 −0 vs/examples/transaction/transaction.vcxproj.filters
+8 −0 xcode/aerospike-test.xcodeproj/project.pbxproj
+24 −0 xcode/aerospike.xcodeproj/project.pbxproj
+24 −0 xcode/examples.xcodeproj/project.pbxproj
Loading
Loading