Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/actions/get-artifact-for-stage-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ runs:
# End codepath that downloads artifacts from Github
# Begin codepath that downloads from JFrog

- uses: jfrog/setup-jfrog-cli@5b06f730cc5a6f55d78b30753f8583454b08c0aa # v4.8.1
- uses: step-security/setup-jfrog-cli@a6b41f8338bea0983ddff6bd4ede7d2dcd81e1fa # v4.8.1
if: ${{ inputs.get_from_jfrog == 'true' }}
env:
JF_URL: ${{ inputs.JFROG_PLATFORM_URL }}
Expand Down
32 changes: 28 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,33 @@ updates:
# Check for updates to GitHub Actions every weekday
interval: "daily"
target-branch: "dev"
- package-ecosystem: "pip"
directories:
- "**/*"

- package-ecosystem: pip
directory: /.github/workflows
schedule:
interval: "daily"
interval: daily
target-branch: "dev"

- package-ecosystem: pip
directory: /doc
schedule:
interval: daily
target-branch: "dev"

- package-ecosystem: pip
directory: /
schedule:
interval: daily
target-branch: "dev"

- package-ecosystem: pip
directory: /test
schedule:
interval: daily
target-branch: "dev"

- package-ecosystem: pip
directory: /test/standalone
schedule:
interval: daily
target-branch: "dev"
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
working-directory: test

- name: Run tests
# We need to disable capturing output or else we cannot see memory errors reported by
# We need to disable capturing output or else we cannot see memory errors reported by
# libasan during the test run
run: python -m pytest ./new_tests -vvs
working-directory: test
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -40,3 +41,7 @@ repos:
# Running on all files causes this issue:
# scripts/manylinux2014build.sh: scripts/manylinux2014build.sh: openBinaryFile: does not exist (No such file or directory)
files: ".github/workflows/docker-setup/"
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ python3 -m build

If you are building on a non-tagged commit, or there are uncommitted changes to the repository, a local version
identifier will be added to the version. The formatting of the local version identifier can be found [here](https://github.com/jwodder/versioningit/tree/v3.1.0?tab=readme-ov-file#example-configurations) under the versioneer
section.
section.

The local version identifier will appear in:
- The package version in the wheel name
Expand Down
2 changes: 1 addition & 1 deletion doc/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
overflow: visible !important;
}
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/batch_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
br.Remove(
key = keyTuples[0],
),
# Modify Daniel's ID and balance
# Modify Daniel's ID and balance
br.Write(
key = keyTuples[1],
ops = [
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/keyordereddict.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
my_dict2 = {'d': 4, 'e': 5, 'f': 6}
my_dict3 = {'g': 7, 'h': 8, 'i': 9}

ops = [
ops = [
lop.list_append_items('map_list', [my_dict1, my_dict2, my_dict3]),
mop.map_set_policy('map_list', map_policy, [map_ctx1]),
mop.map_set_policy('map_list', map_policy, [map_ctx2]),
Expand All @@ -32,7 +32,7 @@

element = KeyOrderedDict({'f': 6, 'e': 5, 'd': 4}) # this will match my_dict2 because it will be converted to key ordered.

ops = [
ops = [
lop.list_get_by_value('map_list', element, aerospike.LIST_RETURN_COUNT)
]
_, _, res = client.operate(key, ops)
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/change_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,28 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
user = "foo-example"
password = "foobar"
try:
try:
client_new = aerospike.client(config).connect(user, "bar")
except ClientError:
print("User might not be created or node may be down. In case of non-existent user run create_user.py first")
client.close()
sys.exit()
status = client_new.admin_change_password(user, password)
client_new.close()

print("Status of changing password is: %d" % status)
print("OK, password changed for 1 user")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/create_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
role = "example_foo"
privileges = [{"code": aerospike.PRIV_READ}, {"code": aerospike.PRIV_USER_ADMIN}]

client.admin_create_role(role, privileges, policy)

print("OK, 1 new role created")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,23 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
user = "foo-example"
password = "bar"
roles = ["read-write", "read"]
roles_size = len(roles)

client.admin_create_user(user, password, roles, policy)

print("OK, 1 new user created")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/drop_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
role = "example_foo"

client.admin_drop_role(role, policy)

print("OK, 1 role dropped")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/drop_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
user = "foo-example"

client.admin_drop_user(user, policy)

print("OK, 1 user dropped")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/grant_privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
role = "example_foo"
privileges = [{"code": aerospike.PRIV_SYS_ADMIN}]

client.admin_grant_privileges(role, privileges)

print("OK, new privileges granted to 1 role")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
print("In case of invalid role first create role by running create_role.py")
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions examples/admin/grant_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
Expand All @@ -103,7 +103,7 @@
print("error: {0}".format(e), file=sys.stderr)
print("In case of invalid user first create user by running create_user.py")
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/query_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
role = "example_foo"

privileges = client.admin_query_role(role, policy)

print(privileges)
print("---")
print("OK, Privileges retrieved for one role")
Expand All @@ -103,7 +103,7 @@
print("error: {0}".format(e), file=sys.stderr)
print("In case of invalid role, first create role using create_role.py")
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/query_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}

roles = client.admin_query_roles(policy)
print(roles)
print("---")
print("---")
print("OK, All roles retrieved")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/admin/query_user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
try:

policy = {}

roles = client.admin_query_user_info(options.username, policy)

print(roles)
Expand Down
8 changes: 4 additions & 4 deletions examples/admin/revoke_privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@
# ----------------------------------------------------------------------------
# Perform Operation
# ----------------------------------------------------------------------------

try:

policy = {}
role = "example_foo"
privileges = [{"code": aerospike.PRIV_SYS_ADMIN}]

client.admin_revoke_privileges(role, privileges, policy)

print("OK, privileges revoked from 1 role")

except Exception as e:
print("error: {0}".format(e), file=sys.stderr)
print("In case of invalid role first create roles using create_role.py")
exitCode = 2

# ----------------------------------------------------------------------------
# Close Connection to Cluster
# ----------------------------------------------------------------------------
Expand Down
Loading
Loading