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

[pythonic resources] Partial config support for resources #12870

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

benpankow
Copy link
Member

@benpankow benpankow commented Mar 10, 2023

Summary

(Marking this as ready to review, but this should probably bake a bit longer, I'm a bit hesitant to merge a late PR like this).

Introduces the ability to partially configure a ConfigurableResource. The remaining config must then be specified at runtime.

For example:

class MyResource(ConfigurableResource):
  foo_str: str
  bar_str: str

defs = Definitions(
    resources={"my_resource": MyResource.partial(foo_str="foo")
)

In this case, bar_str must be specified at runtime.

Test Plan

Introduced new unit tests.

@vercel
Copy link

vercel bot commented Mar 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
dagit-storybook ⬜️ Ignored (Inspect) Mar 10, 2023 at 0:34AM (UTC)
dagster ⬜️ Ignored (Inspect) Mar 10, 2023 at 0:34AM (UTC)

@github-actions
Copy link

github-actions bot commented Apr 11, 2023

Deploy preview for dagster ready!

Preview available at https://dagster-lpqab6n0y-elementl.vercel.app

Direct link to changed pages:

@benpankow benpankow force-pushed the benpankow/partial-support branch from 46c8b6d to 87305ba Compare April 11, 2023 23:27
@github-actions
Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-qkrf5dchv-elementl.vercel.app

Built with commit 87305ba.
This pull request is being automatically deployed with vercel-action

@benpankow benpankow changed the title [pythonic resources][wip] Partial config support for resources [pythonic resources] Partial config support for resources Apr 12, 2023
@benpankow benpankow requested a review from schrockn April 12, 2023 03:57
@benpankow benpankow marked this pull request as ready for review April 12, 2023 03:57
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From brief perusal I agree with your assessment in the PR summary. We should wait until after the branch cut to merge this and release in a subsequent dot release. Let's focus on core docs and content until then.

@benpankow benpankow force-pushed the benpankow/partial-support branch from a06b828 to eb4c02f Compare June 21, 2023 22:53
@benpankow benpankow changed the base branch from master to benpankow/fix-nested-resource-logic June 21, 2023 22:53
@benpankow benpankow force-pushed the benpankow/fix-nested-resource-logic branch from 68ad4e6 to 929c237 Compare June 22, 2023 20:33
Base automatically changed from benpankow/fix-nested-resource-logic to master June 27, 2023 17:23
@benpankow benpankow force-pushed the benpankow/partial-support branch from cb46b14 to 3844b89 Compare May 9, 2024 22:42
@benpankow benpankow requested a review from schrockn May 9, 2024 22:47
@benpankow
Copy link
Member Author

Reviving this PR based on user request - I think this functionality is useful enough to warrant trying to get it in. Thankfully most of the groundwork was already in our existing PartialResource class, so the changes required are pretty brief (though they do touch some core Config/Resources code).

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall makes sense. Let's try the suggestions on for size and then spin again and then merge.

@benpankow benpankow force-pushed the benpankow/partial-support branch from 6d9b416 to 36f29ca Compare May 28, 2024 22:00
@benpankow benpankow force-pushed the benpankow/partial-support branch from 36f29ca to 12bb6c9 Compare November 20, 2024 16:57
@NellyWhads
Copy link

Hello folks,

Has there been any movement on this? I'm facing some issues with configure_at_launch() and the threads have led me here.

@benpankow benpankow force-pushed the benpankow/partial-support branch from 12bb6c9 to 12cf734 Compare January 17, 2025 23:00
@benpankow benpankow requested review from prha, schrockn and smackesey and removed request for erinkcochran87 January 17, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants