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

fix: idempotent component install update #1599

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

jon-stewart
Copy link
Contributor

@jon-stewart jon-stewart commented Mar 22, 2024

Summary

We shouldn't return an error when a user runs component install on an already installed component. Context https://lacework.slack.com/archives/C04974WUG0K/p1711013967046719.

The prototype component install will reinstall an installed component. This PR changes the behaviour of the v1 CDK code to do nothing and just return success when a user attempts to install an already installed component.

Same goes for component update.

How did you test this change?

bin/lacework component install iac
Component iac is already installed. To upgrade run 'lacework component update iac'
> echo $?
0
> bin/lacework component update iac
 [✓] Component iac found
Component iac is version 0.6.22.
> echo $?
0

@jon-stewart jon-stewart self-assigned this Mar 22, 2024
@jon-stewart jon-stewart requested a review from a team as a code owner March 22, 2024 10:47
@jon-stewart jon-stewart changed the title fix: idempotent component install fix: idempotent component install update Mar 22, 2024
@jon-stewart jon-stewart merged commit 8fe68d3 into main Mar 22, 2024
11 checks passed
@jon-stewart jon-stewart deleted the jon-stewart/idempotent-component-install branch March 22, 2024 17:25
This was referenced Mar 22, 2024
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