Repository navigation
Reject a child's missing config before reusing a sibling's artifact (v0.1.39) - #88
Merged
Merged
Conversation
A child's `task_annotations` function contributed nothing to its compile key when the child had no config file, so its key matched an annotation-free wrapper over the same function and name. Used after that sibling, the child reused the sibling's artifact, skipping the compile that rejects the missing config, and its defaults were dropped; in the other order it raised. The missing config is now rejected while building the key, with the error the child's own compile raises, whichever sibling comes first.
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.
Follow-up to #86 and #87. When a child had a
task_annotationsfunction but no config file,_own_task_annotations_for_keyreturned{}. That made the child's compile key the same as the key of an annotation-free wrapper over the same function and name. With noconfig.yaml, usingplain = pipeline("Child")(body)beforeconfigured = pipeline("Child", task_annotations=lambda cfg: {"team": cfg.team})(body)madeconfiguredreuseplain's compiled artifact. That skipped the_compile_pipeline_fncall that rejects the missing config, so the defaults were silently dropped. In the reverse order the compile raised.The missing config is now rejected while building the key, with the error the child's own compile raises (via
_load_cfg_and_raw), so the outcome no longer depends on the order of the siblings.Test: plain-then-configured and configured-then-plain siblings with no
config.yamlboth raise "config file not found … has a task_annotations function". On the currentmaster, the plain-first case does not raise.Bumps the version to 0.1.39.
Raised in review of the shop/world vendoring of tangle-cli: https://delta.shopify.io/shop/world/pull/2480347#discussion_r2600832335899