-
Notifications
You must be signed in to change notification settings - Fork 39
Allow when on all variable types
#1034
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
Merged
rfbgo
merged 12 commits into
GoogleCloudPlatform:develop
from
douglasjacobsen:when-variables
May 21, 2025
Merged
Allow when on all variable types
#1034
rfbgo
merged 12 commits into
GoogleCloudPlatform:develop
from
douglasjacobsen:when-variables
May 21, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit allows directives in objects to define the init value used when adding attributes to the base objects.
This commit allows the modifier_variable directive to accept a `when` clause. Additionally, a base `variable` directive is added, which generically can define variables on any object type.
This commit enables the `package_manager_variable` directive to support the `when` clause.
This commit adds support to the `workflow_manager_variable` directive for the `when` clause.
This commit updates the non-application variable directives to have a common interface, but also call down into the shared language variable directive instead of replicating that logic.
This commit updates non-application objects to have a standard interface for extracting variables based on variant criteria. This is in preparation for addign the same logic to the application class.
This commit allows workload variables to be controlled with `when` clauses. `when` cannot be used to filter by workload with these definitions though.
This commit enables support for having workload variables redefined with different when clauses. This also fixes the tests that break as a result of making this change.
This commit adds a test that exercises the `variable` directive with a when condition using `workload_name`.
This commit fixes the construction of the `application_name` variant to include application names from base classes.
dapomeroy
reviewed
May 16, 2025
Collaborator
dapomeroy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from nits
rfbgo
reviewed
May 20, 2025
22ab794 to
9b91458
Compare
dapomeroy
approved these changes
May 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This merge enables support for
whenconditions on all variable types (modifier_variable,package_manager_variable,workflow_manager_variable, andworkload_variable). Additionally, it introduces a new shared_language directive calledvariablethat can define generic variables for each object type.The variable definitions using the object specific interface for modifiers, package managers, and workflow managers simply wraps the generic variable directive. Workload variables are handled a little differently, as they still need to be connected nicely to workload groups.
There are additional variants defined for
application_nameandworkload_name.