mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-27 16:12:56 +00:00
## Problem The regression test on extensions relied on the admin API to set the default endpoint settings, which is not stable and requires admin privileges. Specifically: - The workflow was using `default_endpoint_settings` to configure necessary PostgreSQL settings like `DateStyle`, `TimeZone`, and `neon.allow_unstable_extensions` - This approach was failing because the API endpoint for setting `default_endpoint_settings` was changed (referenced in a comment as issue #27108) - The admin API requires special privileges. ## Summary of changes We get rid of the admin API dependency and use ALTER DATABASE statements instead: **Removed the default_endpoint_settings mechanism:** - Removed the default_endpoint_settings input parameter from the neon-project-create action - Removed the API call that was attempting to set these settings at the project level - Completely removed the default_endpoint_settings configuration from the cloud-extensions workflow **Added database-level settings:** - Created a new `alter_db.sh` script that applies the same settings directly to each test database - Modified all extension test scripts to call this script after database creation
26 lines
845 B
Makefile
26 lines
845 B
Makefile
EXTENSION = pgx_ulid
|
|
|
|
PGFILEDESC = "pgx_ulid - ULID type for PostgreSQL"
|
|
|
|
PG_CONFIG ?= pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
PG_REGRESS = $(dir $(PGXS))/../../src/test/regress/pg_regress
|
|
PG_MAJOR_VERSION := $(word 2, $(subst ., , $(shell $(PG_CONFIG) --version)))
|
|
ifeq ($(shell test $(PG_MAJOR_VERSION) -lt 17; echo $$?),0)
|
|
REGRESS = 00_ulid_generation 01_ulid_conversions 03_ulid_errors
|
|
EXTNAME = ulid
|
|
else
|
|
REGRESS = 00_ulid_generation 01_ulid_conversions 02_ulid_conversions 03_ulid_errors
|
|
EXTNAME = pgx_ulid
|
|
endif
|
|
|
|
.PHONY: installcheck
|
|
installcheck: regression-test
|
|
|
|
regression-test:
|
|
dropdb --if-exists contrib_regression
|
|
createdb contrib_regression
|
|
../alter_db.sh
|
|
psql -d contrib_regression -c "CREATE EXTENSION $(EXTNAME)"
|
|
$(PG_REGRESS) --inputdir=. --outputdir=. --use-existing --dbname=contrib_regression $(REGRESS)
|