Skip to content

[DO NOT MERGE] Establish core-v2-maintenance branch for QA testing of rust-core v2#71

Draft
paul-brackin wants to merge 12 commits into
mainfrom
core-v2-maintenance
Draft

[DO NOT MERGE] Establish core-v2-maintenance branch for QA testing of rust-core v2#71
paul-brackin wants to merge 12 commits into
mainfrom
core-v2-maintenance

Conversation

@paul-brackin

@paul-brackin paul-brackin commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DO NOT MERGE. This PR exists for review and discussion only. The
core-v2-maintenance branch is intended to be a long-lived parallel
maintenance line
, not a feature branch. Merging it into main would
regress the v3 cutover. Once review feedback (if any) is incorporated, this
PR should be closed without merging.

Why this branch exists

Our QA team uses PAC as the test harness for the Rust client core. Rust-core
v2 is the released version in the field, but PAC's main was migrated to
v3 (afcb863 "Core v3 cutover (#63)") in late April. That cutover added
hard dependencies on v3-only APIs (Txn, ReadModeAP/SC, use_compression,
operations::path), so QA can no longer point PAC at the released v2 core
without it failing to compile.

Symptom QA hit when trying:

error: failed to select a version for `rustls`.
... required by package `aerospike-core v2.1.0 (https://github.com/aerospike/aerospike-client-rust?branch=v2#86224f4)`
... versions that meet the requirements `^0.23.40` are: 0.23.40
... previously selected package `rustls v0.23.37`

That specific error is a stale-Cargo.lock artifact (v2 bumped rustls in
commit acb3cae). The deeper problem is API divergence: even with the lock
refreshed, src/policies.rs, src/lib.rs, etc. on main reference v3-only
symbols.

What this PR does

Creates core-v2-maintenance, branched from fec5d1a (the commit
immediately before the v3 cutover, version 0.3.0-alpha.14, already
pointing at aerospike-core branch = "v2"). Then forward-ports the
non-feature work that landed on main after the cutover.

Cherry-picked from main (post-cutover)

Original SHA Subject Notes
753293b Release tooling (#65) clean
93e1b06 ci: tighten build-test.yml triggers (#66) clean
257396e Harden release.yml: deprecation notice + strict branch gate (#67) clean
59f0f5d [StepSecurity] Apply security best practices clean
b5a95ff ci: publish-rtd skeleton (Gate 4 RTD) clean
3ba612e Rename PyPI dist to aerospike-async; bump to 0.3.0-alpha.17 trivial Cargo.{toml,lock} version conflict — accepted incoming
7605ba7 release: fix MATURIN_REPOSITORY_URL routing; bump to 0.3.0-alpha.18 clean
d202855 Add PyPI project metadata; bump to 0.4.0-alpha.1 clean

Intentionally NOT cherry-picked

  • b8c192a CLIENT-4701 "Unified flag input handling..." — too tangled
    with v3 cutover for a clean port. The diff registers v3-only PyO3 classes
    (TxnState, Txn, ReadModeAP/SC, SelectFlags, ModifyFlags),
    modifies the v3-only path-expression test files, and adds v3 MRT result
    codes. Backportable in principle by manually extracting just the generic
    flag-input plumbing (List/Map/Exp flags accepting either int or enum),
    but that's a 30–60 minute focused port, not a cherry-pick. Tracked as
    follow-up if QA reports needing it.

New maintenance-branch commits

  • caf07ae — Branding + dist split:
    • README banner clearly labels this as the v2 maintenance branch and lists
      which features (MRTs, path expressions, compression, SC read modes) are
      absent.
    • pyproject.toml: dist renamed aerospike_asyncaerospike-async-core-v2
      so it can coexist with the v3 aerospike-async distribution. Python
      import path stays aerospike_async
      so QA tests don't need to change —
      only the install name differs.
  • 1a99448 — Refresh Cargo.lock against rust-core v2 tip (86224f4e).
    This is the fix for QA's rustls error.

Validation

$ cargo check                                   # default features
   Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.87s
$ cargo build --no-default-features --features tls --lib
   Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 46s

Both green. Resolved against aerospike-core v2.1.0 (sha 86224f4e) and
rustls v0.23.40 — exactly the combo QA was trying to build.

Decisions still open (defer to maintainer)

  1. Version scheme. Currently 0.4.0-alpha.1 (inherited from d202855).
    Likely wants its own line — e.g. 0.3.5a1 — before the first publish.
  2. Pinning policy. aerospike-core is currently branch = "v2" (floats
    with the v2 tip). If you want deterministic builds across QA machines,
    change to rev = "86224f4" (or any future v2 tag).
  3. CI on this branch. The cherry-picked workflows still target the same
    triggers as main. May want to scope them to core-v2-maintenance or
    give them their own job names to keep PR-CI clean.
  4. b8c192a CLIENT-4701 trimmed-down backport. Worth doing only if QA
    says they need the unified flag-input handling on v2 testing.
  5. Lifecycle. Stated to be indefinite. Flagging only because most
    teams sunset maintenance branches when the supported core is EOL'd.

How QA uses this

# install for testing rust-core v2 (released version)
pip install aerospike-async-core-v2

# OR, cloning + building locally:
git clone -b core-v2-maintenance git@github.com:aerospike/aerospike-client-python-async.git
cd aerospike-client-python-async
maturin develop  # or pip install .

Their import path stays the same: import aerospike_async.

paul-brackin and others added 11 commits April 30, 2026 15:58
(cherry picked from commit 753293b)
- Add top-of-file deprecation comment pointing to the new pipeline.
- Replace permissive 'pre-release from any branch' rule with a strict
  3-way gate: alpha/beta -> dev, rc -> stage, stable -> main.

(cherry picked from commit 257396e)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
(cherry picked from commit 59f0f5d)
workflow_dispatch-only ReadTheDocs trigger. Single job that POSTs to
the RTD v3 builds endpoint for the given version slug.

- Inputs: version (e.g. v0.1.0-alpha.1, latest, stable), dry-run
  (default true).
- Skips with a log line if vars.RTD_PROJECT is unset (skeleton phase).
- Warns and continues if secrets.RTD_TOKEN is unset, so the workflow
  parses and dispatches even before the RTD token is wired.

PyPI publishing is not handled here. citrusleaf/artifact-publisher
already supports Python and is auto-triggered by a JFrog webhook on
PROD-tier bundle landing, so no per-repo publish-pypi.yml is needed.
RTD is not centralized through artifact-publisher, so this workflow
stays per-repo.

Mirrors the equivalent skeleton in aerospike-client-python-sdk.

Out-of-band setup (one-time, when ready to enable):
  - Register Trusted Publisher on pypi.org for
    aerospike-client-python-async pointing at
    citrusleaf/artifact-publisher / publish-artifact.yaml / pypi.
  - Add aerospike-py-build as collaborator on the PyPI project.
  - Pre-create the ReadTheDocs project and set vars.RTD_PROJECT
    + secrets.RTD_TOKEN in repo settings.

(cherry picked from commit b5a95ff)
Aligns the PyPI distribution name with the existing crate name
(aerospike_async) and Python import name (aerospike_async), matching
the convention already used by the legacy sync client (aerospike) and
PSDK (aerospike-sdk). The GitHub repo name is unchanged.

* pyproject.toml: name aerospike_client_python_async -> aerospike_async
* Cargo.toml/Cargo.lock: 0.3.0-alpha.16 -> 0.3.0-alpha.17 (required for
  a fresh PyPI publish under the new dist name)
* python/aerospike_async/__init__.py: importlib.metadata lookup name
* .github/workflows/build-test.yml: pip install dist-name in matrix

(cherry picked from commit 3ba612e)
The publish step selected the right token (PYPI_API_TOKEN vs
TEST_PYPI_API_TOKEN) based on the publish_pypi input, but never told
maturin which repository to upload to. maturin upload defaults to
production PyPI, so a TestPyPI run uploaded to pypi.org with a TestPyPI
token and got 403.

Adds MATURIN_REPOSITORY_URL to the publish step env, mirroring the same
selector as MATURIN_PYPI_TOKEN.

The v0.3.0-alpha.17 tag and GitHub release were created by the previous
run before the publish step failed; both have been deleted. Bumping to
alpha.18 so the validate job's tag-does-not-exist check passes.

Made-with: Cursor
(cherry picked from commit 7605ba7)
Adds the PEP 621 fields PyPI needs to render the project page:

  description = "Aerospike Python Async Client - async I/O over the Aerospike Rust client core (PyO3)"
  readme      = "README.md"

Bumps Cargo.toml + Cargo.lock to 0.4.0-alpha.1. The previous
0.3.0-alpha.18 release was internal-only and will be deleted from PyPI
post-publish, making 0.4.0-alpha.1 the first public version of the
aerospike-async distribution.

(cherry picked from commit d202855)
- README: prominent banner explaining this branch tracks the released
  rust-core v2 line and is intended for QA testing of v2 in the field;
  notes which v3-only features are absent (MRTs, path expressions,
  compression, strong-consistency read modes).
- pyproject.toml: rename PyPI distribution to `aerospike-async-core-v2`
  so it can coexist with the v3 `aerospike-async` distribution. Python
  import path remains `aerospike_async` so QA tests do not need to
  change; only the install name differs.

Version scheme is intentionally unchanged from the inherited
`0.4.0-alpha.1` baseline; release tooling/version line for this
maintenance branch can be set when first publishing.

Made-with: Cursor
Regenerate Cargo.lock so it resolves against `aerospike-core` v2.1.0
(branch v2, sha 86224f4e). The previously-pinned rustls 0.23.37 in the
inherited lockfile was incompatible with v2.1.0's new requirement of
rustls >=0.23.40 and was the source of the build failure QA hit when
they tried to point their local PAC at v2.

Verified with `cargo check` (default features) and
`cargo build --no-default-features --features tls --lib`: both green.

Made-with: Cursor
@paul-brackin paul-brackin changed the title [REVIEW ONLY — DO NOT MERGE] Establish core-v2-maintenance branch for QA testing of rust-core v2 [DO NOT MERGE] Establish core-v2-maintenance branch for QA testing of rust-core v2 Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant