This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
Fix issue where you can't disable Project polling #2673
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently with
waypoint project apply
, users need to provide several flags in order to enable git or app status polling. Two flags are problematic (flagPoll
andflagAppStatusPoll
) because they are declared asbool
values, and our flag parsing package cannot discern between afalse
boolean value supplied versus the zero valuefalse
if either flag is simply omitted. That, coupled with a logical truthy check, currently prevent users from turning either polling or app status polling off with the CLI once they are enabled (users can still disable git polling from the UI).This PR adds a new flag value
BoolPtrVar
, for boolean values that need to discern betweentrue
,false
, and omitted.BoolPtrVar
is a*bool
value which contains a pointer totrue
,false
, ornil
. There is no default value (or you could saynil
is the default). This enables users to omit the flag and not have that be interpreted as supplyingfalse
.Fixes #2037
Supersedes #2610