Skip to content

ci: check exported API compatibility against the latest release - #553

Merged
tomasaschan merged 1 commit into
spf13:masterfrom
Rajatendu1:ci/api-compatibility
Nov 20, 2026
Merged

tomasaschan merged 1 commit into
spf13:masterfrom
Rajatendu1:ci/api-compatibility

Conversation

@Rajatendu1

Copy link
Copy Markdown

Fixes #552.

Add a separate API compatibility job to the existing push/pull-request workflow. It installs a pinned gorelease version and compares the root v1 module with its latest release. Compatible additions pass; incompatible API changes fail.

The job reuses the existing SHA-pinned checkout/setup-go actions, read-only permissions and 20-minute timeout. Its modern Go toolchain is separate from the unchanged Go 1.12 library test matrix. It does not test behavior compatibility or the in-development v2 module.

Validation on Linux amd64 with Go 1.26.6:

  • The exact pinned tool installs, and gorelease -base=latest passes on a clean local snapshot containing this workflow, resolving the base to v1.1.0.
  • The unchanged historical v1.0.8 checkout versus v1.0.7 fails and identifies both removed ParseErrorsWhitelist exports.
  • Private controls reject an exported-method rename while allowing an exported addition and private helper.
  • go test -race -count=1 ./..., go vet ./..., YAML parsing and git diff --check pass.

The hosted GitHub Actions job and older-Go matrix have not been run locally. The checker is experimental, so its module version is pinned rather than tracking latest.

@CLAassistant

CLAassistant commented Nov 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@tomasaschan
tomasaschan merged commit 7b3c6eb into spf13:master Nov 20, 2026
9 checks passed
@tomasaschan

Copy link
Copy Markdown
Collaborator

Thanks!

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.

Add an exported-API compatibility check to CI

3 participants