Fix WeaviateIngestOperator input_data validation before rendering#70326
Merged
shahar1 merged 3 commits intoJul 24, 2026
Conversation
input_data is a template field, rendered after __init__ runs. Validating it in the constructor checks the un-rendered value. Move the required-value check into execute() so it runs on the rendered value. Constructing with input_data=None now raises at run time rather than at build time.
MannXo
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
July 23, 2026 20:34
83 tasks
shahar1
previously requested changes
Jul 24, 2026
The default was left over from the removed input_json alternative. Dropping it restores parse-time validation of a missing input_data through Python itself and lets mypy catch input_data=None, while the execute() check still guards values that render to None after templating.
shahar1
approved these changes
Jul 24, 2026
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.
Move the
input_data is Nonerequired-value check from__init__intoexecute().input_datais a template field, so it is rendered after the constructor runs. Validating it in__init__checks the un-rendered value. Running the check inexecute()validates the value the task actually uses.Small behavior change: constructing the operator with
input_data=Noneno longer raises immediately; theTypeErroris raised when the task runs, after templating.Part of the template-field constructor burn-down; removes the
WeaviateIngestOperatorentry fromscripts/ci/prek/validate_operators_init_exemptions.txtin the same PR, as the hook requires.related: #70296
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines