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

v2/pkg/stratus/runner: Allow concurrent NewRunner() #395

Closed
wants to merge 1 commit into from
Closed

v2/pkg/stratus/runner: Allow concurrent NewRunner() #395

wants to merge 1 commit into from

Conversation

evanj
Copy link

@evanj evanj commented Aug 8, 2023

What does this PR do?

The tests in github.com/datadog/threatest failed when I ran them on my machine, because they call NewRunner() from multiple goroutines at the same time. If you have never run them before, they will attempt to create the directories at the same time, causing all but one to panic(). This adds a test to reproduce this, and fixes it by ignoring the "already exists" errors.

Motivation

I am attempting to do some internal upgrades to code that transitively depends on this and discovered the failing tests.

The tests in github.com/datadog/threatest failed when I ran them on
my machine, because they call NewRunner() from multiple goroutines at
the same time. If you have never run them before, they will attempt
to create the directories at the same time, causing all but one to
panic(). This adds a test to reproduce this, and fixes it by ignoring
the "already exists" errors.
@evanj
Copy link
Author

evanj commented Aug 8, 2023

Hmm... looks like I may need to figure out how to fake terraform for this test; one moment

@christophetd
Copy link
Contributor

Closing as discussed in PM, feel free to reopen if needed

@evanj evanj deleted the evan.jones/runner-parallel branch August 9, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants