⚠️ Bastion is enabled by default if specified #1990
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.
Bastion.Enabled is a wart. Ideally it would not be required, but because of limitations in how we delete the bastion we require an intermediate 'disabled' step before removal. Ultimately we intend to remove this limitation.
Eventually we would like to be able to ignore enabled entirely. e.g. To create a Bastion just specify it:
and to delete it just remove the bastion field.
Right now with enabled defaulting to
false
, doing the above will not result in the creation of a bastion, because enabled must be explicitly set to true.Paving the way for the eventual deprecation of Bastion.Enabled, we change the default value of enabled to be true so the above does today what we eventually want it to do. This is also generally more intuitive: why would you include a bastion and a spec if you didn't want to create a bastion? Having to also set enabled to true is currently a trip hazard.
Until we resolve the limitations of bastion deletion, though, we still need to be able to disable the bastion. For this case enabled can be explicitly set to false.
In the future when we remove the requirement to disable the bastion before deletion the user can simply ignore Bastion.Enabled, which will continue to work but without the limitations.
/hold