Repository navigation
Conversation
This branch has not been deployed
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.
Problem
tests/test_agent/test_swe_workspace_diff.py::test_patch_uses_actual_image_baseline_without_changing_git_indexis flaky on CI. Example: https://github.com/THUDM/slime/actions/runs/38288879812 (jobagent-test (0, test_agent/test_swe_workspace_diff.py)):The runner has git 2.55. After the test's
git commit, git starts auto-maintenance in the background, which creates and then deletes.git/objects/maintenance.lock. The next line,shutil.copytree(repo, fresh), sometimes lists the lock file and then fails because it's gone before the copy reaches it.Fix
Turn off auto-maintenance and auto-gc in the temporary test repo (
maintenance.auto=false,gc.auto=0) right aftergit init. The test only uses this repo as a fixture, so nothing it checks depends on maintenance.Testing
Ran
pytest tests/test_agent/test_swe_workspace_diff.pylocally 3 times with the CI agent-test dependency set on Python 3.10; 3/3 passed each run.