Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

core/cli: Update profile set to use defaults on init only #3854

Merged
merged 6 commits into from
Oct 3, 2022

Conversation

demophoon
Copy link
Contributor

This commit modifies runner profile set to use profile defaults only when setting up an initial profile instead of resetting the profile to defaults when updating an existing profile.

Fixes #3853

Before this commit when updating a runner profile with waypoint runner
profile set, the command would reset all unset configs to their
defaults. This commit checks first if the flag exists before setting it
to the value in the flag, otherwise we prefer the already set
configuration.
@paladin-devops
Copy link
Contributor

Just pulled this branch and have been trying it out locally, it's beautiful ✨

Copy link
Contributor

@izaaklauer izaaklauer left a comment

Choose a reason for hiding this comment

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

I tested this myself, and it works great!

@@ -44,5 +44,6 @@ lifecycle operation.
- `-default` - Indicates that this remote runner profile should be the default for any project that doesn't otherwise specify its own remote runner.
- `-target-runner-id=<string>` - ID of the runner to target for this remote runner profile.
- `-target-runner-label=<key=value>` - Labels on the runner to target for this remote runner profile. e.g. `-target-runner-label=k=v`. Can be specified multiple times.
- `-target-runner-any` - Set profile to target any available runner.
Copy link
Contributor

Choose a reason for hiding this comment

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

very good catch

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

Successfully merging this pull request may close these issues.

Waypoint runner profile set shouldn't reset the profile for settings not given
3 participants