-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add a helper for nonconflicting, multihost-safe filenames #2424
Conversation
6c3e6f1
to
585e588
Compare
585e588
to
d553a7a
Compare
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.
Thanks for the cleanup! @happz, anything else from the check list you still keep as a todo item or everything done?
d553a7a
to
01c5631
Compare
Not really, no. Rebased, fixed the conflict, and we're good to go. I believe we will cover this once we start moving tmt-generated files - test wrapper, AVC logs, guest logs, etc. - into a directory as we discussed recently, that will offer plenty of opportunities to verify all files are named correctly. |
Since we entered the realms of multihost and parallel executions of phases, we need filenames that, when used by a phase on multiple guests or by one plugin executed multiple times, would allow for now race conditions. We cannot afford a phase overwriting a script wrapper or guest topology. There are already two places where such files are constructed, two more are in pending pull requests, one is clearly missing, and more will be needed when we start exposing guest facts to guest-setup playbooks. Or to `prepare/feature` plugin. So, to avoid confusion about how such a file should be called, there's a helper function. If we ever get Pyright, together with a `NewType` we might be able to prevent using non-unique filenames where safe ones are needed. Patch requires a bit of refactoring of guest topology saving, but nothing serious.
01c5631
to
8d7c415
Compare
Since we entered the realms of multihost and parallel executions of phases, we need filenames that, when used by a phase on multiple guests or by one plugin executed multiple times, would allow for now race conditions. We cannot afford a phase overwriting a script wrapper or guest topology.
There are already two places where such files are constructed, two more are in pending pull requests, one is clearly missing, and more will be needed when we start exposing guest facts to guest-setup playbooks. Or to
prepare/feature
plugin.So, to avoid confusion about how such a file should be called, there's a helper function. If we ever get Pyright, together with a
NewType
we might be able to prevent using non-unique filenames where safe ones are needed.Patch requires a bit of refactoring of guest topology saving, but nothing serious.
Pull Request Checklist