Skip to content

api: compare the ABI against the last release - #711

Open
maxime-leroy wants to merge 1 commit into
DPDK:mainfrom
maxime-leroy:abi_check_last_version
Open

api: compare the ABI against the last release#711
maxime-leroy wants to merge 1 commit into
DPDK:mainfrom
maxime-leroy:abi_check_last_version

Conversation

@maxime-leroy

Copy link
Copy Markdown
Collaborator

The check compared the API headers with the parent commit, which required a GR_API_VERSION bump from every commit changing a type, including a commit changing a type another commit of the same series had just introduced. Nothing outside the series ever saw that intermediate layout, and bumping for it puts clients and daemons in lockstep for something which never shipped.

GR_API_VERSION is negotiated in the hello handshake between two binaries, so what it has to describe is the compatibility of released versions. Compare against the last release tag instead, which needs one bump per release cycle at most and leaves the commit layout of a series free.

What this gives up is the mixing of binaries built from two different commits of the same cycle: they announce the same version while the API has changed in between. PREV_REVISION is still honoured for anyone wanting the previous behaviour.

The check compared the API headers with the parent commit, which required
a GR_API_VERSION bump from every commit changing a type, including a
commit changing a type another commit of the same series had just
introduced. Nothing outside the series ever saw that intermediate layout,
and bumping for it puts clients and daemons in lockstep for something
which never shipped.

GR_API_VERSION is negotiated in the hello handshake between two binaries,
so what it has to describe is the compatibility of released versions.
Compare against the last release tag instead, which needs one bump per
release cycle at most and leaves the commit layout of a series free.

What this gives up is the mixing of binaries built from two different
commits of the same cycle: they announce the same version while the API
has changed in between. PREV_REVISION is still honoured for anyone wanting
the previous behaviour.

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rjarry

rjarry commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

The point of GR_API_VERSION is twofold:

  1. It prevents incompatible client/servers from attempting to communicate.
  2. It makes every ABI breaking change obvious since the check-api.sh script fails if GR_API_VERSION was not updated.

I understand your point about pointless enforcing for things that will never be shipped. But think about the following issues with your approach:

  • If we want to backport an ABI breaking change to a maintenance release, having the GR_API_VERSION bump self contained makes it easier to spot breaking changes. If we decouple GR_API_VERSION update from the commits that introduce breaking changes, there is a good chance we will forget to advertise them.
  • If we run pre-release or mid-release clients against an incompatible server (or vice-versa), the ABI incompatibility will be silent and cause mayhem.

I would prefer keeping the current per-commit ABI compatibility check.

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.

2 participants