Repository navigation
Fixed start_stop.py clean --dry-run expiring settings - #778
Merged
Merged
Conversation
A dry run only took the reporting branch when the settings' scripts directory existed. Old settings without a scripts directory fell through to the real cleanup branch and were marked as expired in redis. A dry run now never modifies settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 42407393049Coverage increased (+0.001%) to 99.296%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
Proposed Changes
python start_stop.py clean --dry-runis documented as listing what would be cleaned up without removing anything. Butclean()combined the two conditions asif dry_run and os.path.isdir(dir_path): <report> else: <expire>. In a dry run, old settings whose scripts directory (<workspace>/scripts/<settings_id>) doesn't exist fell through to the real cleanup branch. Their settings were marked as expired in redis, so later test runs failed with "the settings for this test have expired, please re-upload the settings". Nothing was printed for them either. (The directory deletion was guarded, so no files were removed.)The scripts directory can be missing if it was deleted by hand, the workspace was moved or rebuilt while redis kept its data, or environment setup failed before the directory was created.
clean()now checksdry_runfirst, so a dry run never modifies settings. Its output is unchanged: it still lists only existing scripts directories. A real run behaves exactly as before.Tests: removed the
xfailmarker fromtest_dry_run_without_scripts_dir(added in #775), which now also checks that nothing is printed for such settings. It fails without the fix and passes with it.🤖 Generated with Claude Code