-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Thread version_data through BundleInfo to worker-side bundle initialization #67217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
50fc87a
6e6ae90
718c87c
38a2bde
bf949eb
a309b4a
6c1d650
4bfd304
d63c1e6
d5dc388
703510d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,9 +102,13 @@ def make( | |
|
|
||
| ser_ti = TaskInstanceDTO.model_validate(ti, from_attributes=True) | ||
| if not bundle_info: | ||
| version_data = None | ||
| if ti.dag_version is not None and ti.dag_run.bundle_version is not None: | ||
| version_data = ti.dag_version.version_data | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why of this read off ti, but other things just below are ti.dag_model.bundle*
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth flagging that even off the same
The scheduler picks a deliberate rule for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ashb - What we're passing along here is the version that is being used and the bundle to use to grab it. The bundle itself isn't tracking the current version of the dag, that's on the dag_version. So once on the worker side, we'll ask the bundle to load the state of the bundle for the specific version the dag is trying to run with. So properties from these two things are combined later. Does that make sense? @kaxil Fair point, I think the right rule is: version_data should only be populated when the run is pinned (i.e., dag_run.bundle_version is not None). If the run is unpinned, the worker should use the latest bundle state anyway, so sending stale version_data would be misleading. I'll add a guard: version_data = None
if ti.dag_version is not None and ti.dag_run.bundle_version is not None:
version_data = ti.dag_version.version_data This mirrors the existing rule for bundle_version at scheduler_job_runner.py:1438-1442. For the second case the |
||
| bundle_info = BundleInfo( | ||
| name=ti.dag_model.bundle_name, | ||
| version=ti.dag_run.bundle_version, | ||
| version_data=version_data, | ||
| ) | ||
| fname = log_filename_template_renderer()(ti=ti) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.