-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[dagster-airlift] Python operator docs #26096
base: dpeng817/k8s_docs
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. |
examples/docs_snippets/docs_snippets/integrations/airlift/operator_migration/python_operator.py
Outdated
Show resolved
Hide resolved
68f46a0
to
846e273
Compare
4c6eb2c
to
1e187a5
Compare
Graphite Automations"Add a 'docs-to-migrate' label to PRs with docs" took an action on this PR • (11/22/24)1 label was added to this PR based on Christopher DeCarolis's automation. |
846e273
to
9bb88e7
Compare
1e187a5
to
1bd29de
Compare
9bb88e7
to
806bc70
Compare
1bd29de
to
8b34130
Compare
806bc70
to
09d4822
Compare
8b34130
to
57974fd
Compare
09d4822
to
ee6dba1
Compare
57974fd
to
1bdbb43
Compare
ee6dba1
to
7f40743
Compare
1bdbb43
to
a6e21d8
Compare
docs/content/integrations/airlift/operator-migration/python-operator.mdx
Outdated
Show resolved
Hide resolved
7f40743
to
a8589be
Compare
a6e21d8
to
28d1ef5
Compare
a8589be
to
a564411
Compare
28d1ef5
to
8365a1f
Compare
8365a1f
to
267d5ec
Compare
def script_result(context: AssetExecutionContext): | ||
return ( | ||
PipesSubprocessClient() | ||
.run( |
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.
context.op_execution_context
is a property that doesn't exist on AssetExecutionContext
. To get the OpExecutionContext
that PipesSubprocessClient
requires, use context.get_op_execution_context()
instead.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
267d5ec
to
7f90cc5
Compare
def script_result(context: AssetExecutionContext): | ||
return ( | ||
PipesSubprocessClient() | ||
.run(context=context, command="python /path/to/script.py") |
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 context
parameter should be passed as context=context.op_execution_context
since PipesSubprocessClient.run()
expects an OpExecutionContext
. The current code passes an AssetExecutionContext
which will cause type errors. This can be fixed by accessing the underlying op_execution_context
property.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
a564411
to
00063fc
Compare
e7d0535
to
b84bce9
Compare
00063fc
to
a7d8d76
Compare
b84bce9
to
3b3ee96
Compare
Summary & Motivation
How I Tested These Changes
Changelog