Skip to content
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

[WIP] Remove deletion of data/git_repos for EmbeddedAnsible tests #22960

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

agrare
Copy link
Member

@agrare agrare commented Mar 27, 2024

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

$ git status

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	deleted:    data/git_repos/locks/.gitkeep

@kbrock
Copy link
Member

kbrock commented Mar 28, 2024

I'm very happy for this change.
This frustrated me but I hadn't tracked it down.

Do we need to clean these up in another way? Like deleting all files underneath that directory (may cause issues for local development though)

@agrare
Copy link
Member Author

agrare commented Mar 28, 2024

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.

@agrare
Copy link
Member Author

agrare commented Mar 28, 2024

Okay it looks like leftover locks are from these two spec files (not surprisingly), spec/models/git_repository_spec.rb and spec/models/manageiq/providers/embedded_ansible/automation_manager/configuration_script_source_spec.rb.

@agrare
Copy link
Member Author

agrare commented Mar 28, 2024

Does anything ever delete these git_repository lockfiles at runtime?

@agrare agrare force-pushed the fix_data_git_repos_locks_deleted branch from fafbe9f to 6fa3221 Compare March 28, 2024 19:08
@miq-bot
Copy link
Member

miq-bot commented Mar 28, 2024

Checked commits agrare/manageiq@379aebe~...6fa3221 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. 👍

@agrare agrare changed the title Remove deletion of data/git_repos for EmbeddedAnsible tests [WIP] Remove deletion of data/git_repos for EmbeddedAnsible tests Apr 5, 2024
@agrare
Copy link
Member Author

agrare commented Apr 5, 2024

WIP until I cover the other specs that leave these lockfiles around

@miq-bot miq-bot added the wip label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants