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

Duplicate labels can arise if commands run in parallel #362

Open
jonc125 opened this issue Sep 7, 2017 · 1 comment
Open

Duplicate labels can arise if commands run in parallel #362

jonc125 opened this issue Sep 7, 2017 · 1 comment
Labels
Milestone

Comments

@jonc125
Copy link

jonc125 commented Sep 7, 2017

Probably a somewhat unlikely occurrence in normal practice, but doing smt run --executable date & ; smt run --executable date results in two records with the same label; subsequent commands like smt comment then fall over when given this label!

@apdavison apdavison modified the milestone: 0.8 Sep 10, 2017
@apdavison apdavison added the smt label Sep 10, 2017
@apdavison apdavison modified the milestones: future, 0.8 Sep 10, 2017
@apdavison
Copy link
Contributor

This happens because the default label generator uses a timestamp accurate to one second.

There are three workarounds for this:

  1. add sleep 1 between each smt run
  2. set your own label explicitly for each run with smt run --label ...
  3. change the label generator to create uuids, with smt configure --labelgenerator=uuid

We should definitely add a check for duplicate labels, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants