bug: validate complains about YAML merge keys (<<) #1011
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner#1011
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Can you reproduce the bug on the Forgejo test instance?
Yes
Description
forgejo-runner validatecomplains about malformed YAML forcodeberg.org/Freso/python-blocklister@a467f85525/.forgejo/workflows/publish.yaml:Merge keys (
<<) are valid, albeit optional/extended, YAML syntax, but the YAML library Forgejo uses seems to understand it—at least, Codeberg has run various iterations of these actions just fine. It would be nice ifvalidatewould not balk at them, since they’re very useful for reducing copy/paste (and, as such, complexity and chances of things falling out-of-sync, etc.) in YAML files. :)Forgejo Version
No response
Runner Version
11.0.0 (same behaviour as of
89f37985bd)How are you running Forgejo?
I’m not.
How are you running the Runner?
I’ve experienced this both using
forgejo-runner validate --repository . --clonedir .(with v11.0.0) and also with commit89f37985bd/ c9498b877d1be32672f1f5f2433d637d842ddcd3 using thepre-commithook (see #1002 ) withpre-commit run forgejo-runner-validate --all-files.The used pre-commit hook configuration:
Logs
No response
Workflow file
No response
v13 fails
v13.next.forgejo.org/earl-warren/validatemerge@b5bfca5294/.forgejo/workflows/try.ymlv11 passes
v11.next.forgejo.org/earl-warren/actionvalidate@87006f9128/.forgejo/workflows/try.ymlalso fails validation
For the record https://rhysd.github.io/actionlint/ does not validate any of those.
It is good you caught that right before the release 😅
I made the pre-commit hook for that repository, so I’ve been testing it on that too. I actually noticed this some days ago, but I was too busy getting the hook to work to dive in and formulate my thoughts coherently enough for a bug report 🙈
Thanks for fixing it so swiftly! 🙇