Conversation
Accept self-repository references consistently in both action-manifest parser paths and cover the comparison mode. Fixes: actions#4706
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The regression test should directly verify the new-parser converted repository reference.
Pull request overview
Fixes parser comparison handling for $/... self-repository references by aligning validation and conversion with legacy behavior.
Changes:
- Accepts valid self-repository references during validation.
- Converts references consistently in comparison mode.
- Adds composite-action regression coverage.
File summaries
| File | Summary |
|---|---|
src/Test/TestData/self_repository_composite_action.yml |
Adds composite-action test data using a self-repository reference. |
src/Test/L0/Worker/ActionManifestParserComparisonL0.cs |
Adds comparison regression coverage, but assertions currently inspect only the legacy result. |
src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs |
Excludes valid self-repository references from validation. |
src/Runner.Worker/ActionManifestManagerWrapper.cs |
Converts self-repository references consistently. |
Review details
Suppressed comments (1)
src/Test/L0/Worker/ActionManifestParserComparisonL0.cs:125
- These assertions inspect the legacy
result:ActionManifestManagerWrapper.Loadalways returns the legacy result, whileCompareCompositeExecutiononly compares step count and outputs. The test would therefore still pass if the new-parser path inConvertToLegacySteps(including the new$/mapping) produced a different repository reference. Please compare or directly assert the converted new step reference so the regression covers both changes.
var reference = Assert.IsType<GitHub.DistributedTask.Pipelines.RepositoryPathReference>(nestedAction.Reference);
Assert.Equal(GitHub.DistributedTask.Pipelines.PipelineConstants.SelfRepositoryAlias, reference.RepositoryType);
Assert.Equal("actions/nested", reference.Path);
Assert.False(_ec.Object.Global.HasActionManifestMismatch);
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Author
|
Closing as a duplicate of #4669, which contains the same production fix and broader regression coverage for self-repository references in parser comparison. |
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.
Accept
$/self-repository references consistently when action-manifest parser comparison is enabled.The newer parser previously emitted a false validation annotation and converted this reference differently from the legacy parser. This aligns validation and conversion with the legacy behavior, with a regression test covering comparison mode.
Fixes #4706