Skip to content
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

Draft: Add config to TaskInstance context #700

Closed
wants to merge 5 commits into from

Conversation

wseaton
Copy link

@wseaton wseaton commented Nov 20, 2023

Description

forwards context from the parsed model config object to the Airflow TaskInstance Context so it is available in callback functions

Related Issue(s)

closes #698

Breaking Change?

not that I'm aware

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

Would like guidance on where you'd like the tests for this, eg. mocked in the operators section or integration.

@wseaton wseaton requested a review from a team as a code owner November 20, 2023 23:55
@wseaton wseaton requested a review from a team November 20, 2023 23:55
Copy link

netlify bot commented Nov 20, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 472287b
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/655cb3320814a900085ccd2f

@dosubot dosubot bot added area:config Related to configuration, like YAML files, environment variables, or executer configuration execution:local Related to Local execution environment labels Nov 20, 2023
@wseaton wseaton force-pushed the add-config-to-context branch from e672125 to d47889a Compare November 20, 2023 23:58
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 21, 2023
@wseaton
Copy link
Author

wseaton commented Nov 21, 2023

Getting type check failures because of pre python 3.9 available type hint syntax that is being used, like dict[str, Any]. Do we want to fix that in other parts of the codebase?

@tatiana
Copy link
Collaborator

tatiana commented Dec 7, 2023

Thanks for working on this!

Getting type check failures because of pre python 3.9 available type hint syntax that is being used, like dict[str, Any]. Do we want to fix that in other parts of the codebase?

@wseaton it's possible to avoid this exception in previous versions of Python by using from __future__ import annotations.

I'm changing this PR to draft mode - please, move it back to a non-draft PR once the branch is rebased and the tests are passing.

@tatiana tatiana marked this pull request as draft December 7, 2023 01:44
@pankajkoti
Copy link
Contributor

hi @wseaton are you still working on this PR or could we close this?

@tatiana tatiana added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 4, 2024
@tatiana
Copy link
Collaborator

tatiana commented Jun 6, 2024

@wseaton, we find this very useful; please, if you have a chance, we'd love to see this work resumed!

For now, we're starting to close stale PRs - but please let us know if we can help you get this work to the finishing line.

Feel free to reopen or create a new PR.

@tatiana tatiana closed this Jun 6, 2024
@wseaton
Copy link
Author

wseaton commented Jun 11, 2024

Thanks @tatiana, to be honest I actually forget why I needed this. Do you have any examples you can share publicly of how this would be useful? Perhaps I can pick it back up.

Edit: My linked issue shows why: #698 (comment), there is DBT specific DAG metadata that would be useful to have available to route via webhooks.

@linchun3
Copy link
Contributor

Sorry for hijacking this, I have a use case for this feature and would like to contribute.

I have created a draft PR to implement this feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration execution:local Related to Local execution environment size:M This PR changes 30-99 lines, ignoring generated files. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose "meta" model config dictionary on TaskInstance
4 participants