-
Notifications
You must be signed in to change notification settings - Fork 667
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
[BUG] Broken concurrency: one cannot run few molecule processes in parallel #1573
Comments
It looks like a work-around for this is in a0627fd, right? |
Ran into this a while back like lwm pointed out. There is probably a much better way to solve it though. |
@lwm yea, kinda. |
@lwm thanks, feel free to fork from that branch (master...webknjaz:feature/molecule-parallelism) or cherry-pick it if you need this done fast because I'm not going to have time for it during the next few weeks. It seems fine but I don't like that it's a bit sketchy (and I'd normally add docstrings before merging such thing). In general, it's more about seeking the design feedback: is it fine to add such random thing to identifier names? what else would this affect? I checked with docker but what about other providers? do existing users rely on having the same instance name across subsequent re-runs (current patch would break this expectation because the random thing would be different every time)? what else did I miss? any UX problems? |
It is interesting, and way cleaner that I've done on hugoShaka@b335b09 which was provider-specific 👏 I don't know what to think about the UUID thing. I guess it's the best solution if you need to run the same scenario in parallel on the same machine/cluster (I'm not sure about the use-case, maybe if you add some random and want to do stats). If you don't need to run the same scenario in parallel maybe using the scenario name as a prefix makes more sense for debugging purposes. |
Right, good points. I think molecule users are expecting their instances to be named the way they see them in the |
Just my 2cts
This way:
Regards, |
Summary update: I think that using a state file suggested by @decentral1se is a way to go: #1702 (comment) |
Issue Type
Molecule and Ansible details
Molecule installation method (one of):
N/A
Ansible installation method (one of):
N/A
Detail any linters or test runners used:
docker driver
Desired Behavior
Molecule should create resources (test envs) with names unique to test run.
I want to be able to run concurrently the test of Molecule itself.
Actual Behaviour
Molecule's default docker image instance name defaults to the driver name, that's it. So when you run multiple processes they mess with the same resource breaking each other in unpredictable ways.
The text was updated successfully, but these errors were encountered: