Skip to content

Add apx client verify SDK-build gate to publish-on-change - #9

Merged
daniel-garcia merged 1 commit into
mainfrom
client-verify-gate
Jul 18, 2026
Merged

daniel-garcia merged 1 commit into
mainfrom
client-verify-gate

Conversation

@daniel-garcia

Copy link
Copy Markdown
Contributor

What

Wires the apx client verify generate-and-compile gate (infobloxopen/apx#42) into the reusable publish-on-change pipeline. For each converted OpenAPI v3 module, the engine now generates a client and compiles it, catching specs that pass lint/breaking but produce a non-building SDK — e.g. a path parameter named url that shadows the net/url import, or redundant limit/offset params that collide with _limit/_offset on one Go field.

How

  • scripts/apx-publish.sh: after the breaking check, run apx client verify --input <converted-spec> --generator <gens> per module; a run-level gate then acts on the result. Adds an sdk column to the summary table and a collapsible build report for any failure.
  • .github/workflows/apx-publish.yml: new verify-clients input, threaded to the script.
  • docs/apx-publish.md: documents the gate.

verify-clients input

value behavior
fail (default) generate + compile every module's client; fail the run (check and publish, before any publish PR opens) if one does not build
warn run and report, never fail
off skip

Generators default to go; override per repo via verify_clients.generators in .apx-publish.yaml.

⚠️ Hard prerequisite (by design)

The default is fail, and there is intentionally no "skip if the subcommand is missing" fallback. So the prebuilt ghcr.io/infobloxopen/apx-toolchain image (the :v1 tag consuming repos pin) must provide apx client verify. A stale image without it will fail publishes — this is the intended behavior; the gate is meant to break, not degrade.

Before this reaches consumers: rebuild the apx-toolchain image from an apx that includes apx#42 (i.e. bump the apx pin in the Dockerfile and republish the image), so apx client verify is present on the :v1 tag.

Validation

actionlint clean; bash -n clean; shellcheck clean for all added code (the only findings are pre-existing SC2004/SC2295 style on untouched lines). No PR CI / branch protection configured on this repo.

For each converted OpenAPI v3 module, generate a client and compile it, so a
spec that passes lint/breaking but produces a non-building SDK is caught before
publish (e.g. a path param named url shadowing net/url, or redundant
limit/offset params colliding with _limit/_offset on one Go field).

Adds a 'verify-clients' input: fail (default) | warn | off. 'fail' stops the
run — in check and publish — before any publish PR is opened; 'warn' reports;
'off' skips. Generators default to go; override per repo via
verify_clients.generators in .apx-publish.yaml.

Because the default is fail, the apx-toolchain image must provide
'apx client verify' (infobloxopen/apx#42); a stale image without it will fail
publishes, by design.
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