-
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
sentinel for tags without values #20388
Conversation
bb66632
to
cbc1643
Compare
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.
Did you consider doing a non-string sentinel? I could be convinced either way. But if we are going to do this partition keys too I want to be consistent.
Yeah I've gone back and forth on this and didn't reach a clear answer. I started with the string sentinel because it was easier to implement - doesn't require changing types everywhere. Going with a non-string sentinel would send us in the direction of accepting that on run tags as well, which seemed like it could have downstream implications. Could definitely be convinced either way. |
cbc1643
to
c7ef26e
Compare
## Summary & Motivation This PR passes tags up through graphql to the UI and displays them on the asset overview page. It doesn't yet support the no-value tags introduced in this PR: #20388. Stacks on top of #20351. <img width="1167" alt="image" src="https://github.com/dagster-io/dagster/assets/654855/97bcb447-06e6-4cd1-a0f2-4fdfffdd1d0d"> ## How I Tested These Changes
3b5f6af
to
a1230f2
Compare
7673295
to
35cdf77
Compare
35cdf77
to
903a174
Compare
I'm ok with the string version of this, given that runless event tags are also strings rather than objects. I can't see any major benefits to making it an object sentinel instead. That being said, looks like our APIs only accept dict mappings right now, so where will this be used? Is the intent to automatically ingest dbt tags and punt on python APIs? |
903a174
to
cdde23f
Compare
Good question. I think there three stages here:
|
branch-name: tag-no-value
@sryza that makes sense to me, I'm comfortable with (1) and (2). |
## Summary & Motivation Adds a special sentinel value for tags that indicates "this tag is just a string, not a key-value pair". How this sentinel will be used: - In the CLI, when a selection like `--select tag:foo` is provided, we'll interpret it as `AssetSelection.tag("foo", "__dagster_novalue")` (implemented in this PR) - The dbt integration will provide this value for all tags (because dbt tags are strings). - In the UI, we'll hide this sentinel value. I.e. a tags dict like `{"foo": "fooval", "bar": "__dagster_novalue"}` will be rendered as "foo=fooval, bar" in the UI. ## How I Tested These Changes
## Summary & Motivation This PR passes tags up through graphql to the UI and displays them on the asset overview page. It doesn't yet support the no-value tags introduced in this PR: #20388. Stacks on top of #20351. <img width="1167" alt="image" src="https://github.com/dagster-io/dagster/assets/654855/97bcb447-06e6-4cd1-a0f2-4fdfffdd1d0d"> ## How I Tested These Changes
## Summary & Motivation Adds a special sentinel value for tags that indicates "this tag is just a string, not a key-value pair". How this sentinel will be used: - In the CLI, when a selection like `--select tag:foo` is provided, we'll interpret it as `AssetSelection.tag("foo", "__dagster_novalue")` (implemented in this PR) - The dbt integration will provide this value for all tags (because dbt tags are strings). - In the UI, we'll hide this sentinel value. I.e. a tags dict like `{"foo": "fooval", "bar": "__dagster_novalue"}` will be rendered as "foo=fooval, bar" in the UI. ## How I Tested These Changes
Summary & Motivation
Adds a special sentinel value for tags that indicates "this tag is just a string, not a key-value pair". How this sentinel will be used:
--select tag:foo
is provided, we'll interpret it asAssetSelection.tag("foo", "__dagster_novalue")
(implemented in this PR){"foo": "fooval", "bar": "__dagster_novalue"}
will be rendered as "foo=fooval, bar" in the UI.How I Tested These Changes