-
-
Notifications
You must be signed in to change notification settings - Fork 297
Fixes to cargo pgrx regress
#2062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eeeebbbbrrrr
merged 6 commits into
pgcentralfoundation:develop
from
eeeebbbbrrrr:regress-fixes
May 9, 2025
Merged
Fixes to cargo pgrx regress
#2062
eeeebbbbrrrr
merged 6 commits into
pgcentralfoundation:develop
from
eeeebbbbrrrr:regress-fixes
May 9, 2025
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
…hat to the user cleanup output
…** when it needs to, which is... - when the database is being (re)created - when its timestamp is different from an existing `setup.out` - when `setup.sql` exists but `setup.out` doesn't - make sure the database is (re)created when `setup.sql` has changed This allows its output to be automatically accepted on a test failure when `--auto` is used
…s so we can present the output consistently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements fixes and improvements to the cargo pgrx regress process by addressing issues with test output promotion, setup file handling, and log formatting. Key changes include:
- Introducing a new helper function to determine if setup.sql is newer than its expected output.
- Refactoring test file listings and output processing functions to conditionally include the setup file.
- Updating log output formatting and adjusting git-add behavior for output files.
Comments suppressed due to low confidence (1)
cargo-pgrx/src/command/regress.rs:265
- [nitpick] Consider clarifying the naming and purpose of the 'include_setup' parameter, as its semantic linkage with 'created_db' might be unclear to future maintainers.
include_setup: bool,
…now if they're being run via a regression test
eeeebbbbrrrr
added a commit
that referenced
this pull request
May 9, 2025
Welcome to pgrx v0.14.3. This point release fixes some issues discovered with the new `cargo pgrx regress` command. Additionally, bindings have been regenerated against the latest Postgres point releases that dropped on May 8th, 2025, though no new headers have been included. As always, please update with `cargo install cargo-pgrx --version 0.14.3 --locked` and update your extension `Cargo.toml` files with `cargo pgrx upgrade`. ## What's Changed * Fixes to `cargo pgrx regress` by @eeeebbbbrrrr in #2062 1) Pressing `<ENTER>` to "Accept[Y, n]?" a test no longer panics 2) While we still `git add <new expected/test_name.out>` files, we no longer do it to the expected files that we promote in the face of a test failure 3) Fix a bug where we'd think there's a `test_name.out` file to copy to `expected/` when that's not actually true 4) The `setup.sql` test is now treated as a normal test, and the only special handling around is that we'll only run it if we detect we need to 5) Cleanup test run output to be consistent between Postgres versions 6) Set `PGRX_REGRESS_TESTING=1` so an extension running under the regression test suite can detect it **Full Changelog**: v0.14.2...v0.14.3
KenjiBrown
pushed a commit
to SoftwareLibreMx/pgrx
that referenced
this pull request
May 27, 2025
This fixes a few issues with `cargo pgrx regress` that were found after its initial release. 1) Pressing `<ENTER>` to "Accept[Y, n]?" a test no longer panics 2) While we still `git add <new expected/test_name.out>` files, we no longer do it to the expected files that we promote in the face of a test failure 3) Fix a bug where we'd think there's a `test_name.out` file to copy to `expected/` when that's not actually true 4) The `setup.sql` test is now treated as a normal test, and the only special handling around is that we'll only run it if we detect we need to 5) Cleanup test run output to be consistent between Postgres versions 6) Set `PGRX_REGRESS_TESTING=1` so an extension running under the regression test suite can detect it
KenjiBrown
pushed a commit
to SoftwareLibreMx/pgrx
that referenced
this pull request
May 27, 2025
Welcome to pgrx v0.14.3. This point release fixes some issues discovered with the new `cargo pgrx regress` command. Additionally, bindings have been regenerated against the latest Postgres point releases that dropped on May 8th, 2025, though no new headers have been included. As always, please update with `cargo install cargo-pgrx --version 0.14.3 --locked` and update your extension `Cargo.toml` files with `cargo pgrx upgrade`. ## What's Changed * Fixes to `cargo pgrx regress` by @eeeebbbbrrrr in pgcentralfoundation#2062 1) Pressing `<ENTER>` to "Accept[Y, n]?" a test no longer panics 2) While we still `git add <new expected/test_name.out>` files, we no longer do it to the expected files that we promote in the face of a test failure 3) Fix a bug where we'd think there's a `test_name.out` file to copy to `expected/` when that's not actually true 4) The `setup.sql` test is now treated as a normal test, and the only special handling around is that we'll only run it if we detect we need to 5) Cleanup test run output to be consistent between Postgres versions 6) Set `PGRX_REGRESS_TESTING=1` so an extension running under the regression test suite can detect it **Full Changelog**: pgcentralfoundation/pgrx@v0.14.2...v0.14.3
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.
This fixes a few issues with
cargo pgrx regressthat were found after its initial release.<ENTER>to "Accept[Y, n]?" a test no longer panicsgit add <new expected/test_name.out>files, we no longer do it to the expected files that we promote in the face of a test failuretest_name.outfile to copy toexpected/when that's not actually truesetup.sqltest is now treated as a normal test, and the only special handling around is that we'll only run it if we detect we need toPGRX_REGRESS_TESTING=1so an extension running under the regression test suite can detect it