Remove AllowCaseFunction feature flag#4316
Merged
ericsciple merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
The case() expression function is now unconditionally available. Remove all gating logic, the feature flag constant, and related test scaffolding across both SDK copies and the Runner layer.
rentziass
approved these changes
Mar 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the AllowCaseFunction feature-flag gating so the case() expression function is always available across the Runner and both SDK/parser copies.
Changes:
- Removed
AllowCaseFunctionfromTemplateContextand stopped threading it through template evaluation/parsing paths. - Updated expression parser(s) to always recognize
case()(removed the conditional rejection logic). - Adjusted/added L0 tests to reflect unconditional
case()availability.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Test/L0/Worker/ActionManifestManagerL0.cs | Adds L0 coverage ensuring case() works when evaluating default inputs (comment needs update). |
| src/Test/L0/Sdk/ExpressionParserL0.cs | Updates SDK parser regression tests to reflect unconditional case() support. |
| src/Sdk/WorkflowParser/ObjectTemplating/Tokens/TemplateToken.cs | Stops passing AllowCaseFunction into the parser during template evaluation. |
| src/Sdk/WorkflowParser/ObjectTemplating/TemplateContext.cs | Removes AllowCaseFunction from workflow parser template context. |
| src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs | Updates CreateTree calls to the new signature (no case gating). |
| src/Sdk/Expressions/ExpressionParser.cs | Removes allowCaseFunction from the public CreateTree API and related parsing logic. |
| src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConverter.cs | Updates CreateTree call sites to no longer pass AllowCaseFunction. |
| src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/TemplateToken.cs | Stops passing AllowCaseFunction into the parser for DT templating. |
| src/Sdk/DTObjectTemplating/ObjectTemplating/TemplateContext.cs | Removes AllowCaseFunction from DT templating context. |
| src/Sdk/DTExpressions2/Expressions2/ExpressionParser.cs | Removes allowCaseFunction from the public CreateTree API and related parsing logic (DT copy). |
| src/Runner.Worker/ActionManifestManagerLegacy.cs | Removes explicit disabling of case() in legacy action manifest templating context. |
| src/Runner.Worker/ActionManifestManager.cs | Removes explicit disabling of case() in the new action manifest templating context. |
| _ec.Object.ExpressionFunctions.Add(new LegacyExpressions.FunctionInfo<GitHub.Runner.Worker.Expressions.HashFilesFunction>("hashFiles", 1, 255)); | ||
|
|
||
| // Act — evaluate a case() expression as a default input value. | ||
| // The feature flag is set, so this should succeed. |
There was a problem hiding this comment.
The test comment references a feature flag being set, but this PR removes the AllowCaseFunction flag/gating. Update the comment to reflect the new behavior (case() is unconditionally available) to avoid misleading future readers.
Suggested change
| // The feature flag is set, so this should succeed. | |
| // case() is unconditionally available, so this should succeed. |
jsoref
reviewed
Mar 27, 2026
| @@ -1,4 +1,4 @@ | |||
| using System; | |||
| using System; | |||
Contributor
There was a problem hiding this comment.
Is there a reason you added a BOM to this file?
ef bb bf
1 task
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
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.
The case() expression function is now unconditionally available. Remove all gating logic, the feature flag constant, and related test scaffolding across both SDK copies and the Runner layer.