You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
validate.py: flag references to undeclared WorkflowCustomVariables (#42)
* validate.py: flag references to undeclared WorkflowCustomVariables
A workflow that references ${data['WorkflowCustomVariable.<name>']} for a variable
that no CreateVariable (or UpdateVariable setter) declares imports and api_validates
cleanly, then fails only at release with 'property "..." contains unknown variable
"WorkflowCustomVariable.<name>"'. Preflight never caught it because the validator
never collected declared variable names.
Add _validate_custom_variable_refs to the structural tier: collect declared names from
CreateVariable variable_schema properties and WorkflowCustomVariable setter blocks
(recursing into loops), scan the raw file for WorkflowCustomVariable.<name> references,
and flag any name that is not declared. Reinforce the rule in the authoring and
workflows yaml-schema references, and add tests covering the undeclared case, both
declaration mechanisms, and de-duplication. Correct three existing fixtures that
referenced custom variables they never declared.
* pylintrc: raise max-module-lines to 1400 for the new validate.py guard
validate.py crossed the 1350 line limit (now 1377) with the undefined-custom-variable
check. Consistent with prior guard additions (1200 -> 1300 -> 1350), bump to 1400.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
7
+
## [Unreleased]
8
+
9
+
### Fixed
10
+
11
+
-**`validate.py` now flags `WorkflowCustomVariable.<name>` references to variables that nothing declares** — a release-only failure. A reference to a custom variable that no `CreateVariable` (or `UpdateVariable` setter) declares imports and validates cleanly, then fails at release with `property "..." contains unknown variable "WorkflowCustomVariable.<name>"`. The validator now collects declared variable names and reports an undeclared reference before you deploy.
0 commit comments