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

Support parallelism #13

Merged
merged 11 commits into from
Apr 7, 2022
Merged

Support parallelism #13

merged 11 commits into from
Apr 7, 2022

Conversation

aripalo
Copy link
Owner

@aripalo aripalo commented Apr 7, 2022

Tools such as Terraform (via parallelism=n – which defaults to 10) can invoke the vegas-credentials credential process concurrently, leading into problematic situations where multiple vegas-credentials processes are and/or:

  1. prompting the user for MFA
  2. accessing the filesystem cache which results into error as:

    Badger obtains a lock on the directories so multiple processes cannot open the same database at the same time

To circumvent this, we use alexflint/go-filemutex to assign a lock to a specific lock-control directory at the beginning of the command and unlocking the directly once the main command (getCredentials function) has been executed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 7, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@aripalo
Copy link
Owner Author

aripalo commented Apr 7, 2022

Quality gate issues will be fixed later with a refactor prepping for v1 release.

@aripalo aripalo merged commit de78855 into main Apr 7, 2022
@aripalo aripalo deleted the feature/support-parallelism branch April 7, 2022 15:08
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.

1 participant