Support YAML anchors
Open
Nobody has claimed this yet.
stale
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
---
version: 1.0
description: Deploy staging application
.definitions:
action_succeeded: &action_succeeded
- task_message: "<% ctx('environment') %> deploy <% task().task_name %> :white_check_mark:"
someaction:
action: core.noop
retry:
count: 3
delay: 60
next:
- when: <% succeeded() %>
publish: *action_succeeded
do:
- notify_slack
- when: <% failed() %>
publish:
- task_message: "<% ctx('environment') %> deploy <% task().task_name %> :boom:"
- stderr: <% result().stderr %>
do:
- notify_slack
- fail
...
However when I run the workflow I get:
{
"errors": [
{
"message": "Additional properties are not allowed ('.definitions' was unexpected)",
"spec_path": null,
"schema_path": "additionalProperties",
"type": "syntax"
}
],
"output": null
}
Contributor guide
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 with the example workflow and the reported validation error, then trace the workflow YAML validation path that rejects the .definitions key and YAML anchor reference. Done means the shown workflow is accepted and the anchored action_succeeded values are usable when the workflow runs, without the unexpected-property error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100