This is an automated email from the ASF dual-hosted git repository.

jrgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age.git


The following commit(s) were added to refs/heads/master by this push:
     new c1617a26 ci: pin Build/Regression runner to ubuntu-24.04 and guard 
Bison version for GLR grammar (#2445)
c1617a26 is described below

commit c1617a2628eedbfe10c3332791bc7dde2f3cba44
Author: Greg Felice <[email protected]>
AuthorDate: Thu Jul 2 13:02:07 2026 -0400

    ci: pin Build/Regression runner to ubuntu-24.04 and guard Bison version for 
GLR grammar (#2445)
    
    * ci: pin runner to ubuntu-24.04 + guard Bison version for GLR grammar
    
    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.
    
    * ci: make Bison version parse robust (awk + explicit empty guard)
    
    Address Copilot review on #2445: the previous grep-based parse could
    silently yield an empty version and fail with a confusing
    'Bison  != 3.8.x' message. Parse the version field with awk and error
    explicitly when it can't be determined.
---
 .github/workflows/installcheck.yaml | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/installcheck.yaml 
b/.github/workflows/installcheck.yaml
index 886dc08f..aa30ef3d 100644
--- a/.github/workflows/installcheck.yaml
+++ b/.github/workflows/installcheck.yaml
@@ -9,7 +9,12 @@ on:
 
 jobs:
   build:
-    runs-on: ubuntu-latest
+    # Pinned (not ubuntu-latest) so the Bison version stays fixed at 3.8.x.
+    # The Cypher GLR grammar pins exact conflict counts via %expect / 
%expect-rr
+    # in src/backend/parser/cypher_gram.y, and Bison treats %expect as 
exact-match:
+    # a different Bison version can report different counts and break the 
build.
+    # Freezing the runner image freezes Bison; bump both together, 
intentionally.
+    runs-on: ubuntu-24.04
 
     steps:
       - name: Get latest commit id of PostgreSQL 18
@@ -28,6 +33,27 @@ jobs:
           sudo apt-get update
           sudo apt-get install -y build-essential libreadline-dev zlib1g-dev 
flex bison
 
+      - name: Verify Bison version (grammar conflict counts are pinned)
+        run: |
+          ver=$(bison --version | awk 'NR==1 {print $NF}')
+          if [ -z "$ver" ]; then
+            echo "::error::Could not determine Bison version from 'bison 
--version'."
+            echo "::error::Expected the first line to end with a version (e.g. 
'... 3.8.2')."
+            exit 1
+          fi
+          echo "bison $ver"
+          case "$ver" in
+            3.8.*) ;;
+            *)
+              echo "::error::Bison $ver != 3.8.x. The Cypher GLR grammar pins 
exact"
+              echo "::error::%expect / %expect-rr conflict counts in 
src/backend/parser/cypher_gram.y."
+              echo "::error::A new Bison version may report different counts. 
Re-run bison locally,"
+              echo "::error::update the %expect/%expect-rr numbers (and the 
comment block), then bump"
+              echo "::error::the pinned runner image and this guard together."
+              exit 1
+              ;;
+          esac
+
       - name: Install PostgreSQL 18 and some extensions
         if: steps.pg18cache.outputs.cache-hit != 'true'
         run: |

Reply via email to