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

Use a lockfile to serialize blessclient invocations #84

Merged
merged 8 commits into from Nov 20, 2018

Conversation

edulop91
Copy link
Contributor

When integrated with tools like terraform or ansible, multiple concurrent runs of blessclient resulted in unnecessary work. Instead, serialize blessclient commands.

@edulop91 edulop91 requested a review from a team as a code owner November 20, 2018 17:38
)

// GetConfigPath gets the config path from a cobra cmd
func GetConfigPath(cmd *cobra.Command) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably fine for now but we should maybe consider using viper for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i have another pr locally where i'm doing this

pkg/util/pid_lock.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 20, 2018

Codecov Report

Merging #84 into master will increase coverage by 5.24%.
The diff coverage is 82.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   35.77%   41.02%   +5.24%     
==========================================
  Files          10       12       +2     
  Lines         601      646      +45     
==========================================
+ Hits          215      265      +50     
+ Misses        358      350       -8     
- Partials       28       31       +3
Impacted Files Coverage Δ
cmd/import-config.go 2.34% <ø> (-0.76%) ⬇️
cmd/run.go 1.81% <0%> (-0.82%) ⬇️
pkg/util/cobra.go 100% <100%> (ø)
cmd/root.go 80.95% <73.33%> (+64.28%) ⬆️
pkg/util/pid_lock.go 87.87% <87.87%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b4e23b...57a69d6. Read the comment docs.

@czimergebot czimergebot merged commit 9a6eedc into master Nov 20, 2018
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.

None yet

3 participants