-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dagster-airlift][jobs 4/n] Definitions.execute_job_in_process #29243
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: dpeng817/airflow_defs_data
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b38fa41
to
c581bfc
Compare
a7caf6a
to
05fb3ae
Compare
c581bfc
to
c580897
Compare
05fb3ae
to
bbb6263
Compare
c580897
to
42308cf
Compare
bbb6263
to
6595ca7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this actually get used upstack? I'm having trouble understanding the precise usecase here -- is it purely for test use cases? If so, I'd prefer to "hide" this code a bit more (i.e. move as much of it as possible into the test code, and have this be a utility function rather than a method on Definitions itself)
@OwenKephart purely for test. See the upstack monitoring job tests for how it's used - but the idea is that sometimes you want access to the full repo in scope when executing a job in process. Fine with making it a utility function; but I'll make that change in an upstack PR to avoid refactor pain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good fixing upstack, would really prefer stuff like RepoBackedJob to also move into test-land when you do that
42308cf
to
ae1523b
Compare
6595ca7
to
f695d66
Compare
run_config=run_config, | ||
), | ||
run_id=run_id, | ||
asset_selection=frozenset(asset_selection), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line asset_selection=frozenset(asset_selection)
will raise a TypeError when asset_selection
is None, which is a valid input according to the function signature. Since both this method and core_execute_in_process
accept asset_selection
as an Optional parameter, this should be changed to:
asset_selection=frozenset(asset_selection) if asset_selection else None
This matches the pattern used in JobDefinition.get_subset
on line 743 and will properly handle the None case.
asset_selection=frozenset(asset_selection), | |
asset_selection=frozenset(asset_selection) if asset_selection else None, |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
ae1523b
to
86bdbc4
Compare
f695d66
to
55dd13b
Compare
86bdbc4
to
94984b0
Compare
55dd13b
to
16f8742
Compare
94984b0
to
5d3a0e4
Compare
16f8742
to
997cd2c
Compare
5d3a0e4
to
f1727c1
Compare
9a12662
to
62cf80a
Compare
f1727c1
to
b08c414
Compare
62cf80a
to
f3a8535
Compare
f3a8535
to
c7c9046
Compare
Summary & Motivation
Adds a new internal execute_in_process method to Definitions class which contains full repository context. This ends up being really useful for the "monitoring job", which requires full repo context to build its mapping of items.
How I Tested These Changes
Additional execute_in_process test.