Fix upgrade test: build default install SQL from HEAD, not initial commit#2397
Merged
MuhammadTahaNaveed merged 1 commit intoapache:masterfrom Apr 16, 2026
Merged
Conversation
…mmit The upgrade test previously built age--<CURR>.sql from the initial version-bump commit, meaning CREATE EXTENSION installed 'day-one' SQL. This caused all 31 non-upgrade regression tests to run WITHOUT SQL functions added after the version bump (e.g., age_invalidate_graph_cache, age_prepare_pg_upgrade, age_vertex_stats, etc.). These functions were never registered in pg_proc, so features depending on them (like VLE cache invalidation triggers) were silently disabled during testing. Fix by inverting the upgrade test direction: Before (installs incomplete SQL, upgrades to complete): age--1.7.0.sql built from version-bump commit (incomplete) age--1.7.0_upgrade_test.sql built from HEAD (complete) age--1.7.0--1.7.0_upgrade_test.sql stamped from template Test: CREATE EXTENSION age -> data -> ALTER EXTENSION UPDATE TO '1.7.0_upgrade_test' After (installs complete SQL, upgrades from synthetic initial): age--1.7.0.sql built from HEAD (complete) age--1.7.0_initial.sql built from version-bump commit (synthetic) age--1.7.0_initial--1.7.0.sql stamped from template Test: CREATE EXTENSION age VERSION '1.7.0_initial' -> data -> ALTER EXTENSION UPDATE TO '1.7.0' This ensures: - All 31 non-upgrade tests run with every SQL function registered - The upgrade template is still validated (initial -> current) - The test ends at the default version (clean state for drop test) - Tarball builds (no git) work identically (cat sql/sql_files) - All synthetic files are cleaned up after the test Makefile changes: - age_sql rule: cat current HEAD sql/sql_files (was: git show from commit) - New age_init_sql rule: git show from version-bump commit - age_upgrade_test_sql: stamps template as INIT->CURR (was CURR->NEXT) - EXTRA_CLEAN, _install_upgrade_test_files: updated filenames - Removed AGE_NEXT_VER, age_next_sql; added AGE_INIT_VER, age_init_sql Test SQL changes: - Step 3: CREATE EXTENSION age VERSION '<init>' (was: CREATE EXTENSION age) - Step 6: ALTER EXTENSION age UPDATE TO default_version (was: LIKE '%_upgrade_test') - Step 7: Check installed = default (was: installed <> default) - Comments updated throughout to reflect inverted direction All 32 regression tests pass. modified: Makefile modified: regress/expected/age_upgrade.out modified: regress/sql/age_upgrade.sql
MuhammadTahaNaveed
approved these changes
Apr 16, 2026
Member
MuhammadTahaNaveed
left a comment
There was a problem hiding this comment.
Verified. Fixes the new functions missing in age-x.x.x.sql file.
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.
…mmit
The upgrade test previously built age--.sql from the initial version-bump commit, meaning CREATE EXTENSION installed 'day-one' SQL. This caused all 31 non-upgrade regression tests to run WITHOUT SQL functions added after the version bump (e.g., age_invalidate_graph_cache, age_prepare_pg_upgrade, age_vertex_stats, etc.). These functions were never registered in pg_proc, so features depending on them (like VLE cache invalidation triggers) were silently disabled during testing.
Fix by inverting the upgrade test direction:
Before (installs incomplete SQL, upgrades to complete):
age--1.7.0.sql built from version-bump commit (incomplete)
age--1.7.0_upgrade_test.sql built from HEAD (complete)
age--1.7.0--1.7.0_upgrade_test.sql stamped from template
Test: CREATE EXTENSION age -> data -> ALTER EXTENSION UPDATE TO '1.7.0_upgrade_test'
After (installs complete SQL, upgrades from synthetic initial):
age--1.7.0.sql built from HEAD (complete)
age--1.7.0_initial.sql built from version-bump commit (synthetic)
age--1.7.0_initial--1.7.0.sql stamped from template
Test: CREATE EXTENSION age VERSION '1.7.0_initial' -> data -> ALTER EXTENSION UPDATE TO '1.7.0'
This ensures:
Makefile changes:
Test SQL changes:
All 32 regression tests pass.
modified: Makefile
modified: regress/expected/age_upgrade.out
modified: regress/sql/age_upgrade.sql