Apply SageMaker operator template-field checks after rendering - #70485
Merged
Conversation
mitre88
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl,
o-nikolas and
potiuk
as code owners
July 27, 2026 00:17
vincbeck
approved these changes
Jul 27, 2026
Contributor
|
Can you rebase? Main was broken but it is now fixed |
mitre88
force-pushed
the
fix-sagemaker-template-fields
branch
from
July 30, 2026 02:49
078d634 to
d89eaa4
Compare
78 tasks
Contributor
|
There are conflicts to resolve |
output_files_to_xcom (SageMakerProcessingOperator) and create_instance_kwargs (SageMakerCreateNotebookOperator) are template fields, but were validated or transformed in __init__, before Jinja rendering. The wait_for_completion guard and the tags formatting now run at execute() time, on rendered values.
mitre88
force-pushed
the
fix-sagemaker-template-fields
branch
from
July 31, 2026 22:11
d89eaa4 to
ef06527
Compare
potiuk
approved these changes
Aug 1, 2026
mitre88
added a commit
to mitre88/airflow
that referenced
this pull request
Aug 1, 2026
Rebased onto current main after apache#70485 removed the SageMaker exemptions. Constructor args now match the templated cluster_id attribute; Neptune provision-check exemptions are dropped accordingly.
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.
Two SageMaker operators applied logic to template fields in
__init__, before Jinja rendering:SageMakerProcessingOperatorrejectedoutput_files_to_xcomwithoutwait_for_completion=Trueat construction time — a templatedoutput_files_to_xcomthat renders empty was rejected anyway. The guard now runs at the top ofexecute().SageMakerCreateNotebookOperatorranformat_tagsovercreate_instance_kwargs["tags"]in__init__, so a templated kwargs dict never got its tags formatted (and the operator mutated its own constructor argument). The formatting now happens inexecute()on a copy, leaving the operator's stored kwargs untouched.Both classes are removed from the exemption list.
related: #70296
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines