Repository navigation
Add apx client verify SDK-build gate to publish-on-change - #9
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wires the
apx client verifygenerate-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 passlint/breakingbut produce a non-building SDK — e.g. a path parameter namedurlthat shadows thenet/urlimport, or redundantlimit/offsetparams that collide with_limit/_offseton one Go field.How
scripts/apx-publish.sh: after the breaking check, runapx client verify --input <converted-spec> --generator <gens>per module; a run-level gate then acts on the result. Adds ansdkcolumn to the summary table and a collapsible build report for any failure..github/workflows/apx-publish.yml: newverify-clientsinput, threaded to the script.docs/apx-publish.md: documents the gate.verify-clientsinputfail(default)warnoffGenerators default to
go; override per repo viaverify_clients.generatorsin.apx-publish.yaml.The default is
fail, and there is intentionally no "skip if the subcommand is missing" fallback. So the prebuiltghcr.io/infobloxopen/apx-toolchainimage (the:v1tag consuming repos pin) must provideapx 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-toolchainimage from an apx that includes apx#42 (i.e. bump the apx pin in theDockerfileand republish the image), soapx client verifyis present on the:v1tag.Validation
actionlintclean;bash -nclean;shellcheckclean for all added code (the only findings are pre-existingSC2004/SC2295style on untouched lines). No PR CI / branch protection configured on this repo.