Skip to content

Fixed start_stop.py clean --dry-run expiring settings - #778

Merged
david-yz-liu merged 2 commits into
masterfrom
fix-clean-dry-run
Nov 7, 2026
Merged

david-yz-liu merged 2 commits into
masterfrom
fix-clean-dry-run

Conversation

@david-yz-liu

Copy link
Copy Markdown
Contributor

Proposed Changes

python start_stop.py clean --dry-run is documented as listing what would be cleaned up without removing anything. But clean() combined the two conditions as if 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 checks dry_run first, 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 xfail marker from test_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

david-yz-liu and others added 2 commits November 7, 2026 14:40
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>
@coveralls

coveralls commented Nov 7, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 42407393049

Coverage increased (+0.001%) to 99.296%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: 4 of 4 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1136
Covered Lines: 1128
Line Coverage: 99.3%
Coverage Strength: 0.99 hits per line

💛 - Coveralls

@david-yz-liu
david-yz-liu merged commit c2bb951 into master Nov 7, 2026
15 checks passed
@david-yz-liu
david-yz-liu deleted the fix-clean-dry-run branch November 7, 2026 19:46
@david-yz-liu david-yz-liu added this to the v2.10.5 milestone Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants