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

Fix asset checks + key prefixes #16327

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

johannkm
Copy link
Contributor

@johannkm johannkm commented Sep 6, 2023

Context: https://elementl-workspace.slack.com/archives/C05KFG9TETB/p1693931080865119?thread_ts=1693924159.102829&cid=C05KFG9TETB

This is a breaking change that will always require @asset_check( to have an asset. I think this isn't too bad ergonomically, though it does mean repeating in the io manager case:

@asset_check(asset=my_asset)
def my_check(my_asset):
  ...

At present I think this is required, because we use asset groups for resolving keys to the fully prefixed keys, and we don't know the group of a check until we resolve which asset it points at.

@johannkm
Copy link
Contributor Author

johannkm commented Sep 6, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@johannkm johannkm force-pushed the johann/09-05-Fix_asset_checks_key_prefixes branch 2 times, most recently from 987865f to ef36e90 Compare September 6, 2023 01:57
@johannkm johannkm force-pushed the johann/09-05-Fix_asset_checks_key_prefixes branch from ef36e90 to 9217d64 Compare September 6, 2023 14:45
@johannkm johannkm merged commit 1753db4 into master Sep 6, 2023
1 of 2 checks passed
@johannkm johannkm deleted the johann/09-05-Fix_asset_checks_key_prefixes branch September 6, 2023 14:45
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-40b75itqt-elementl.vercel.app
https://johann-09-05-Fix-asset-checks-key-prefixes.core-storybook.dagster-docs.io

Built with commit 9217d64.
This pull request is being automatically deployed with vercel-action

zyd14 pushed a commit to zyd14/dagster that referenced this pull request Sep 15, 2023
Context:
https://elementl-workspace.slack.com/archives/C05KFG9TETB/p1693931080865119?thread_ts=1693924159.102829&cid=C05KFG9TETB

This is a breaking change that will always require `@asset_check(` to
have an `asset`. I think this isn't too bad ergonomically, though it
does mean repeating in the io manager case:

```python
@asset_check(asset=my_asset)
def my_check(my_asset):
  ...
```

At present I think this is required, because we use asset groups for
resolving keys to the fully prefixed keys, and we don't know the group
of a check until we resolve which asset it points at.
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.

2 participants