Restore shared HTTP grants after extension lifecycle tests - #388
Open
RKS (rksharma-owg) wants to merge 1 commit into
Open
Restore shared HTTP grants after extension lifecycle tests#388RKS (rksharma-owg) wants to merge 1 commit into
RKS (rksharma-owg) wants to merge 1 commit into
Conversation
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.
12_extension_lifecycle.sqlcan pass while leavingdf_e2e_userunable to use HTTP. The shared setup grants HTTP access, but the lifecycle test drops/recreates the extension and restores privileges with the defaultinclude_http => false. A later HTTP test then depends on whether setup has run again.Restore the same HTTP access as
00_setup_playground.sqlin the final re-grant. Add end-of-test assertions for bothdf.http()anddf.http_multipart()privileges. The existing checks that administrative helpers remain inaccessible still run.Related to #381. This addresses one reproduced instance of shared state leakage; it does not provide general per-test database isolation.
Validation
Tested in disposable Docker containers on Linux arm64, using source-built pg_durable v0.2.8 with
http-allow-test-domains:00_setup_playground.sqland01_core_primitives.sql12_extension_lifecycle.sql, twice in the same databasedf.http()constructor after each lifecycle run, without repairing grantsSQL files were run with
docker exec "$container" psql -X -U postgres -v ON_ERROR_STOP=1 -f /repo/tests/e2e/sql/<file>. The constructor probe usedSET SESSION AUTHORIZATION df_e2e_user; SELECT df.http('https://httpbingo.org/get', 'GET');in a separate connection; it makes no network request.cargo fmt -p pg_durable -- --checkandgit diff --checkpassed. This changes only the E2E SQL file; the full suite was not run. The local Docker builds used two Cargo jobs, thin LTO, and eight release codegen units.AI assistance: implemented and validated with Codex.