Repository navigation
feat: add a named-selector limit Rule for orchestration jobs and sensors - #1489
Merged
Merged
Conversation
SQBRORCHESTRATION101 reports a job select, or the select of a node_event, source_new_data or source_stale sensor condition, that names more than max_named_selectors nodes. Sensor conditions are followed through module-level names and imports from project modules; what cannot be resolved is reported and can be suppressed with an exact exception.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A job or sensor that lists its nodes one by one silently stops covering a pipeline when a node is added to it. Selecting a folder or a tag keeps new nodes in the run. Nothing reported these lists.
Changes
SQBRORCHESTRATION101(named-selector-limit). It reports a jobselect, or theselectof anode_event,source_new_dataorsource_stalesensor condition, that names more thanmax_named_selectorsnodes (default 3).job:, job and job group names,+expansions and globs don't count. Repeated names count once.whenis followed through the last module-level assignment or import before the sensor, including imports from project modules. A condition that can't be resolved is reported with what couldn't be resolved; an exact rule exception suppresses it.Verification
make check-cipassed on the final head.DuckShop: new edge-case fixture
benchmarks/duckshop/edge_cases/named_selectors(listed and folder jobs, a listed sensor, a computed sensor select, and sensors whose conditions come from another module). The main DuckShop project reports no findings.