ci: pin runner to ubuntu-24.04 and guard Bison version for GLR grammar#2445
Open
gregfelice wants to merge 1 commit into
Open
ci: pin runner to ubuntu-24.04 and guard Bison version for GLR grammar#2445gregfelice wants to merge 1 commit into
gregfelice wants to merge 1 commit into
Conversation
The Cypher GLR grammar pins exact shift/reduce and reduce/reduce conflict counts via %expect / %expect-rr in cypher_gram.y, and Bison treats %expect as exact-match: a different Bison version can report different counts and break the build. ubuntu-latest floats to new Ubuntu releases (and new Bison versions), which would silently shift those counts. Pin runs-on to ubuntu-24.04 to freeze Bison at 3.8.x, and add a guard step that fails loudly with a pointer to cypher_gram.y if Bison ever drifts off 3.8.x. Reproducibility comes from pinning the variable rather than widening the conflict-count tolerance, keeping the exact-match alarm for genuinely new grammar conflicts intact.
There was a problem hiding this comment.
Pull request overview
This PR makes the CI environment more reproducible for the Cypher GLR grammar by pinning the GitHub Actions runner image and adding an explicit guard that fails early if the Bison version drifts from the expected 3.8.x series (which would change %expect/%expect-rr conflict counts and break grammar generation).
Changes:
- Pin the workflow runner from
ubuntu-latesttoubuntu-24.04to avoid unexpected toolchain drift. - Add a “Verify Bison version” step that errors with an actionable message when Bison is not 3.8.x.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+38
to
+40
| ver=$(bison --version | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | ||
| echo "bison $ver" | ||
| case "$ver" in |
Contributor
|
@gregfelice Please see Copilot review above. |
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
Pin the CI runner image and guard the Bison version for the Cypher GLR grammar.
runs-on: ubuntu-latest→ubuntu-24.04Why
src/backend/parser/cypher_gram.ypins exact conflict counts via%expect 7/%expect-rr 3, and Bison treats%expectas exact-match (not a ceiling) — any deviation fails the build.ubuntu-latestfloats to new Ubuntu releases, which can ship a different Bison version that reports different conflict counts, breaking the build with a cryptic grammar-generation error unrelated to the actual change.Freezing the runner image freezes Bison at 3.8.x, so the pinned
%expectcounts stay reproducible. The version guard turns a future drift into an explicit, self-explanatory failure ("re-run bison, update%expect, and bump the pinned runner together") instead of a confusing one.Reproducibility comes from pinning the variable rather than widening the conflict-count tolerance, keeping the exact-match alarm for genuinely new grammar conflicts intact. This mirrors PostgreSQL's own
gram.y, which keeps an exact%expectand updates it on intentional changes.Testing
CI config only; no source or test changes. The existing
Build / Regressionworkflow runs unchanged on the pinned image.