Bug: self-repository references emit false validation errors in parser comparison
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
$/<action-path> self-repository references are accepted and executed successfully, but emit false Expected format {org}/{repo}[/path]@ref errors when action-manifest parser comparison is enabled.
Environment
- GitHub-hosted Linux runner
- Runner version:
2.337.0 - Composite action from a separate template repository
Minimal example
runs:
using: composite
steps:
- name: Nested action
uses: $/<nested-action-path>
Observed behavior
<org>/<template-repository>/<parent-action-path>/action.yml (Line: <line>, Col: <column>): Expected format {org}/{repo}[/path]@ref. Actual '$/<nested-action-path>'
The template is not valid. <same error>
Despite those annotations, the runner resolves the action as __selfRepository, executes the nested action successfully, and the job completes successfully. The annotation is repeated whenever the composite action is parsed.
Expected behavior
$/<action-path> should not produce an org/repo@ref validation error.
Likely cause
The legacy action-manifest parser recognizes $/ before normal repository-reference validation. The newer WorkflowTemplateConverter parser recognizes $/ when generating the action ID, but its later validation branch only excludes docker://, ./, and .\\; it still validates $/… as org/repo@ref.
When actions_runner_compare_workflow_parser is enabled, the comparison wrapper runs both parsers. The newer parser emits the annotation and fails, but the wrapper returns the successful legacy-parser result. This explains why the job succeeds with error annotations.
Suggested fix
Exclude valid self-repository references from the newer parser's normal reference validation:
!GitHub.DistributedTask.Pipelines.PipelineConstants.TryParseSelfRepository(
uses.Value, out _)
Please add a regression test that loads a composite action containing uses: $/<action-path> with parser comparison enabled and asserts that no validation annotation is emitted.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in WorkflowTemplateConverter and inspect the validation branch that handles action references, then review PipelineConstants.TryParseSelfRepository. Add a regression test that loads a composite action using $/ with parser comparison enabled, and verify that no validation annotation is emitted while the action remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- ci-cd, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100