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 error on op selection #17233

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Conversation

johannkm
Copy link
Contributor

@johannkm johannkm commented Oct 16, 2023

With https://github.com/dagster-io/dagster/pull/16640/files#diff-3a0d9c2e7d488c33f5be6fdf25298f9b03277b1bc73417d53e0a51688d32e8b6, we started passing assetCheckSelection: [] for op jobs. This was untested, and hit this invariant because unlike for assets where [] gets turned in to None, we maintain a difference between None and [] with asset checks

This is ripe for rethinking

@johannkm
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@johannkm johannkm force-pushed the johann/10-16-Fix_error_on_op_selection branch from 42fd4c9 to c9a2df7 Compare October 16, 2023 16:02
@johannkm johannkm force-pushed the johann/10-16-Fix_error_on_op_selection branch from c9a2df7 to b622a21 Compare October 16, 2023 16:08
@johannkm johannkm requested a review from sryza October 16, 2023 16:09
@@ -201,6 +201,8 @@ def infer_pipeline_selector(
{
"pipelineName": pipeline_name,
"solidSelection": op_selection,
"assetSelection": [],
Copy link
Contributor

Choose a reason for hiding this comment

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

So this now means we have coverage for the case where these are set. Is there a case where these aren't set that we're losing coverage for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. The front end always provides them now, but that's not guaranteed forever and gql api users might not. I'll add coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with a specific case for []. Going to start a discussion about how to handle this going forwards

@johannkm johannkm force-pushed the johann/10-16-Fix_error_on_op_selection branch from b622a21 to 75c1ac9 Compare October 16, 2023 18:48
@johannkm johannkm requested a review from sryza October 16, 2023 18:49
@github-actions
Copy link

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-o5iqchp0y-elementl.vercel.app
https://johann-10-16-Fix-error-on-op-selection.components-storybook.dagster-docs.io

Built with commit 75c1ac9.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-9pb1d84bq-elementl.vercel.app
https://johann-10-16-Fix-error-on-op-selection.core-storybook.dagster-docs.io

Built with commit 75c1ac9.
This pull request is being automatically deployed with vercel-action

Comment on lines 1464 to 1465
# asset_selection gets coerced from [] to None, but asset_check_selection doesn't. We
# allow asset_check_selection to be [] when op_selection is set.
Copy link
Member

Choose a reason for hiding this comment

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

I'm still struggling to follow this. Where does the coercing being referenced here happen? Can we add some whys in addition to some whats here / be more verbose?

@johannkm johannkm force-pushed the johann/10-16-Fix_error_on_op_selection branch from 75c1ac9 to f98f0f7 Compare October 16, 2023 19:44
@johannkm johannkm merged commit 4ecfe81 into master Oct 16, 2023
@johannkm johannkm deleted the johann/10-16-Fix_error_on_op_selection branch October 16, 2023 19:45
dpeng817 pushed a commit that referenced this pull request Oct 16, 2023
With
https://github.com/dagster-io/dagster/pull/16640/files#diff-3a0d9c2e7d488c33f5be6fdf25298f9b03277b1bc73417d53e0a51688d32e8b6,
we started passing assetCheckSelection: [] for op jobs. This was
untested, and hit this invariant because unlike for assets where [] gets
turned in to None, we maintain a difference between None and [] with
asset checks

This is ripe for rethinking
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