-
-
Notifications
You must be signed in to change notification settings - Fork 353
Refine complex_graph regex_matches
partial suppressions
#1719
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
Byron
merged 1 commit into
GitoxideLabs:main
from
EliahKagan:run-ci/complex-graph-no-baseline
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,11 +95,19 @@ mod find_youngest_matching_commit { | |
fn regex_matches() { | ||
let repo = repo("complex_graph").unwrap(); | ||
|
||
// On the full linux CI `test` workflow, archived baseline aren't used - instead fixtures will be re-evaluated. | ||
// As of Git 2.47, its behaviour changed which makes the following assertion fail. | ||
// We decided to just ignore it until it's clear that this isn't a bug - obviously the traversal order changed. | ||
let is_in_test_ci_workflow = is_ci::cached() && std::env::var_os("GIX_TEST_IGNORE_ARCHIVES").is_some(); | ||
if is_in_test_ci_workflow { | ||
// The full Linux CI `test` job regenerates baselines instead of taking them from archives. | ||
// In Git 2.47.0 (and 2.47.1), the traversal order differs, so some `parse_spec` assertions | ||
// fail. This is a Git bug with a forthcoming fix. For now, we use `parse_spec_no_baseline` | ||
// for them when tests are run that way with known-affected Git versions. For details, see: | ||
// | ||
// - https://lore.kernel.org/git/[email protected]/T/ | ||
// - https://lore.kernel.org/git/[email protected]/T/ | ||
// - https://github.com/GitoxideLabs/gitoxide/issues/1622#issuecomment-2529580735 | ||
let skip_some_baselines = is_ci::cached() | ||
&& std::env::var_os("GIX_TEST_IGNORE_ARCHIVES").is_some() | ||
&& ((2, 47, 0)..(2, 47, 2)).contains(&gix_testtools::GIT_VERSION); | ||
Byron marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if skip_some_baselines { | ||
assert_eq!( | ||
parse_spec_no_baseline(":/mes.age", &repo).unwrap(), | ||
Spec::from_id(hex_to_id("ef80b4b77b167f326351c93284dc0eb00dd54ff4").attach(&repo)) | ||
|
@@ -116,7 +124,7 @@ mod find_youngest_matching_commit { | |
"None of 10 commits reached from all references matched regex \"not there\"" | ||
); | ||
|
||
if is_in_test_ci_workflow { | ||
if skip_some_baselines { | ||
assert_eq!( | ||
parse_spec_no_baseline(":/!-message", &repo).unwrap(), | ||
Spec::from_id(hex_to_id("55e825ebe8fd2ff78cad3826afb696b96b576a7e").attach(&repo)) | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.