fix(lint): use repo-root-relative path in git restore call in container_configs#4301
Open
Copilot wants to merge 7 commits into
Open
fix(lint): use repo-root-relative path in git restore call in container_configs#4301Copilot wants to merge 7 commits into
git restore call in container_configs#4301Copilot wants to merge 7 commits into
Conversation
…figs.py Agent-Logs-Url: https://github.com/nf-core/tools/sessions/1d9f4c7e-f5d1-42ae-9baa-8e581e139ebb Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jpfeuffer
May 26, 2026 14:41
View session
jpfeuffer
approved these changes
May 26, 2026
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
|
@copilot resolve the merge conflicts in this pull request |
…configs-bug # Conflicts: # nf_core/pipelines/lint/container_configs.py Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Author
mashehu
reviewed
May 26, 2026
Contributor
mashehu
left a comment
There was a problem hiding this comment.
please add a test to tests/pipelines/lint/test_container_configs.py to test this scenario.
…configs lint The old approach used repo.index.diff(None) to detect stale configs, which compared the working tree against HEAD. This caused false 'out of date' failures when configs were already regenerated (e.g. by modules update) but not yet committed. The new approach: 1. Snapshots file content on disk before generation 2. Generates new configs 3. Compares new content to the snapshot 4. If unchanged → pass; if different → fail This makes the lint correct regardless of the git commit state. The restore logic now simply writes back the saved content instead of using git restore, which also fixes the original repo-root-relative path bug. Also adds two new tests: - test_container_configs_uncommitted_but_correct_passes: verifies that uncommitted but correct configs don't produce false failures - test_container_configs_working_tree_restored_after_lint: verifies the working tree is properly restored after lint Agent-Logs-Url: https://github.com/nf-core/tools/sessions/e3bf8950-f65b-4a3d-9b94-e3a275b359eb Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nf-core/tools/sessions/e3bf8950-f65b-4a3d-9b94-e3a275b359eb Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agent-Logs-Url: https://github.com/nf-core/tools/sessions/f898f098-3f2a-4e3f-8bbd-2fe45e5fed00 Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agent-Logs-Url: https://github.com/nf-core/tools/sessions/0c47257c-1ebc-4639-95c8-377dc2159244 Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nf-core/tools/sessions/660f217b-3360-4cc5-8f61-35616aadd65e Co-authored-by: jpfeuffer <8102638+jpfeuffer@users.noreply.github.com>
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.
Completed Fixes for container_configs lint
Fixes Implemented
I think this is the right thing to do, even if you do not need testing of older releases. It just did not come up because your container configs were always update during checkout already and modules update did not change anything.
git restorewith relative pathsTests Added
test_container_configs_uncommitted_but_correct_passes: Key scenario where modules update regenerated configs without committingtest_container_configs_working_tree_restored_after_lint: Verifies working tree restorationtest_container_configs_restore_with_relative_wf_path: Verifies relative path handlingPR Status
copilot/fix-container-configs-buggit restorecall incontainer_configs#4301