Describe the bug
🛈 I must admit that this may not be a bug and is subject to the project author's decision.
I've had my workflows crash several times due to having a trailing comma used in the hashFiles input. These can be added manually or through linters/formatters. In my case, it's a learned habit, for a few reasons (cleaner vcs diffs, editing, ...). This minor formatting detail raises a TemplateValidationErrors syntax error and crashes a running pipeline (workflow).
To Reproduce
Steps to reproduce the behavior:
- Create a workflow step containing an expression function with a trailing comma:
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: python-cache-${{ hashFiles('pyproject.toml', 'uv.lock', ) }}
- Trigger/run the workflow.
- Observe the syntax/parser initialization failure in the logs [error::
TemplateValidationErrors]
Expected Behavior
The expression syntax parsing logic can ignore the trailing comma when it precedes a closing parenthesis. ). This aligns better with modern config parser standards (imo) and also prevents minor syntax elements from breaking pipelines.
Screenshots
Metadata
Package/Area
Package Version
v1.x.y
Additional context
N/A
Describe the bug
I've had my workflows crash several times due to having a trailing comma used in the
hashFilesinput. These can be added manually or through linters/formatters. In my case, it's a learned habit, for a few reasons (cleaner vcs diffs, editing, ...). This minor formatting detail raises aTemplateValidationErrorssyntax error and crashes a running pipeline (workflow).To Reproduce
Steps to reproduce the behavior:
TemplateValidationErrors]Expected Behavior
The expression syntax parsing logic can ignore the trailing comma when it precedes a closing parenthesis.
). This aligns better with modern config parser standards (imo) and also prevents minor syntax elements from breaking pipelines.Screenshots
Metadata
Package/Area
Package Version
v1.x.yAdditional context
N/A