feat: Support dynamic selectors in dataset upload registration tags #1690
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.
Summary
This PR enables support for dynamic selectors in array inputs, specifically addressing the customer issue where
["literal", "$inputs.tag"]patterns were not supported in Dataset Upload block registration_tags.The implementation allows STRING_KIND selectors within arrays while maintaining safety restrictions on LIST_OF_VALUES_KIND selectors in mixed arrays.
Key Changes
schema_parser.py:367-371to allow first-level array selectors while maintaining deeper nesting restrictionsstep_input_assembler.pyto detect and prevent invalid mixed array patternsProblem Solved
Before: Arrays with selectors like
["literal", "$inputs.tag"]were completely ignored by the schema parserAfter: These patterns now work correctly with proper
any_datareferences and validationValidation Logic
✅ Allowed Patterns:
["literal1", "literal2", "$inputs.string_tag"]- Mixed arrays with STRING_KIND selectors"$inputs.list_tags"- Pure LIST_OF_VALUES_KIND selectors["$inputs.tag1", "$inputs.tag2"]- Multiple STRING_KIND selectors❌ Prevented Patterns:
["literal", "$inputs.list_tags"]- Mixed arrays with LIST_OF_VALUES_KIND selectors (clear error message)List[List[Selector]]- Deep nesting (existing restriction maintained)Test Results
All unit tests verify the implementation works correctly and prevent regressions.
Backward Compatibility
This change is fully backward compatible - existing workflows continue to work unchanged while new dynamic selector patterns are now supported.