-
Notifications
You must be signed in to change notification settings - Fork 898
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
Remove deletion of data/git_repos for EmbeddedAnsible tests #22960
Remove deletion of data/git_repos for EmbeddedAnsible tests #22960
Conversation
I'm very happy for this change. Do we need to clean these up in another way? Like deleting all files underneath that directory (may cause issues for local development though) |
Yeah I thought I'd have to delete all dirs+files under this directory, but after removing this line and running this spec file I didn't see any files in this directory left over, and and I don't see anything in the embedded_ansible seed that does anything with git_repos. If I run the full suite I do see leftover locks, so I think other specs need to clean up their own locks and this was hiding that. |
Okay it looks like leftover locks are from these two spec files (not surprisingly), |
Does anything ever delete these git_repository lockfiles at runtime? |
fafbe9f
to
6fa3221
Compare
WIP until I cover the other specs that leave these lockfiles around |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
dff35d3
to
01fcc7b
Compare
01fcc7b
to
4bedce6
Compare
Checked commit agrare@4bedce6 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
@@ -26,6 +27,7 @@ | |||
|
|||
GitRepository | |||
stub_const("GitRepository::GIT_REPO_DIRECTORY", repo_dir) | |||
stub_const("GitRepository::LOCKFILE_DIR", locks_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE unlike the git_repository_spec there isn't always a repos instance available (this also tests creating via the create_in_provider_queue method for example), since this already stubs the GIT_REPO_DIRECTORY so that it can be cleaned up later this felt like another case of the same issue.
After running the full suite no lockfiles are left over:
|
@Fryguy rebased and taken out of WIP, PTAL |
@kbrock fyi another fix_auth sporadic failure
|
The data/git_repos directory doesn't appear to be used but it does leave local git changes when running the embedded_ansible_spec.rb