Skip to content

ci(sdk): gate client API compatibility - #2060

Merged
mchmarny merged 2 commits into
NVIDIA:mainfrom
tjrasche:sdk-api-diff-gate
Aug 7, 2026
Merged

mchmarny merged 2 commits into
NVIDIA:mainfrom
tjrasche:sdk-api-diff-gate

Conversation

@tjrasche

@tjrasche tjrasche commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a release-baseline API compatibility gate for pkg/client/v1 to local
qualification and CI, with fail-closed acknowledgements for intentional breaks.

Motivation / Context

The public SDK facade is consumed by out-of-tree Go callers, but the existing
hand-maintained stability test cannot reliably detect every removed export or
incompatible signature change. This adds a mechanical comparison against the
latest stable release.

Fixes: #2018
Related: #1891, #2016, #2019

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: SDK compatibility CI and developer tooling

Implementation Notes

  • Pins and verifies apidiff, then compares pkg/client/v1 with the latest
    reachable stable tag in a temporary detached worktree.
  • Reports compatible additions and blocks incompatible changes unless exactly
    acknowledged for the active baseline. Malformed, duplicate, mismatched, and
    stale acknowledgements fail closed.
  • Keeps the reusable go-test action backward-compatible by making the API-diff
    input optional; AICR qualification always supplies the pin and runs the gate.
  • Documents the transparent-alias limitation and manual review requirement
    tracked by sdk: reconcile facade alias state and semver contract language #2019.

Testing

unset GITLAB_TOKEN
make qualify

Passed. This includes race-enabled tests, coverage, lint, e2e, vulnerability
scan, license checks, and the new API-diff decision and tool-version tests.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: Contributors should rerun make tools-setup and use a clone
with full tag history. Existing cross-repository go-test consumers remain
compatible.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@coderabbitai

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

mchmarny

This comment was marked as resolved.

njhensley

This comment was marked as resolved.

yuanchen8911

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Compare pkg/client/v1 with the latest stable release, require baseline-scoped acknowledgements for intentional breaks, and run the gate in local qualification and CI. Pin and verify apidiff, cover the decision paths with shell tests, and document the compatibility workflow and alias limitation.

Signed-off-by: Tjark Gunnar Rasche <[email protected]>

@mchmarny mchmarny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 875d31f: prior feedback is addressed, all review threads are resolved, focused API-diff decision/version/setup tests pass, and current CI is fully green (28 pass, 0 fail, 0 pending). No blockers found.

@tjrasche
tjrasche force-pushed the sdk-api-diff-gate branch from 875d31f to 5aeb56c Compare August 7, 2026 13:44
@mchmarny
mchmarny enabled auto-merge (squash) August 7, 2026 13:45
@mchmarny
mchmarny requested a review from yuanchen8911 August 7, 2026 13:52
@mchmarny mchmarny modified the milestone: v1 Aug 7, 2026
@mchmarny
mchmarny merged commit 1acf128 into NVIDIA:main Aug 7, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdk: add a mechanical API-diff gate for pkg/client/v1

4 participants