[dg] Add asset checks to dg list defs#29016
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
schrockn
left a comment
There was a problem hiding this comment.
can you post screenshot as test plan.
also a snapshot test would be good
schrockn
left a comment
There was a problem hiding this comment.
"can you post screenshot as test plan.
also a snapshot test would be good"
1d82ad7 to
897b5fd
Compare
897b5fd to
dac0a03
Compare
557a521 to
363a4b6
Compare
dac0a03 to
8266845
Compare
| │ │ │ my_schedule │ @daily │ │ | ||
| │ │ └─────────────┴───────────────┘ │ | ||
| │ Sensor │ ┏━━━━━━━━━━━┓ │ | ||
| │ │ ┃ Name ┃ │ | ||
| │ │ ┡━━━━━━━━━━━┩ │ | ||
| │ │ │ my_sensor │ │ | ||
| │ │ └───────────┘ │ | ||
| └──────────┴───────────────────────────────────────────────────────┘ | ||
| """).strip() | ||
|
|
||
| _EXPECTED_DEFS_JSON = textwrap.dedent(""" | ||
| [ | ||
| { | ||
| "type": "asset", | ||
| "key": "my_asset_1", | ||
| "group": "default", | ||
| "deps": [], | ||
| "kinds": [], | ||
| "group": "default", | ||
| "description": null, | ||
| "automation_condition": null | ||
| }, | ||
| { | ||
| "type": "asset", | ||
| "key": "my_asset_2", | ||
| "group": "default", | ||
| "deps": [], | ||
| "kinds": [], | ||
| "group": "default", | ||
| "description": null, | ||
| "automation_condition": null | ||
| }, | ||
| { | ||
| "type": "job", | ||
| "name": "my_job" | ||
| }, | ||
| { | ||
| "type": "schedule", | ||
| "name": "my_schedule", | ||
| "cron_schedule": "@daily" | ||
| }, | ||
| { | ||
| "type": "sensor", | ||
| "name": "my_sensor" | ||
| } |
There was a problem hiding this comment.
The JSON test expectations appear to be missing the type field for each object. In the updated output format, each definition should include a field indicating whether it's an asset, job, schedule, etc., but these type fields have been removed from the test expectations. The actual output likely still includes these type identifiers, which would cause the tests to fail when comparing expected vs. actual output.
| │ │ │ my_schedule │ @daily │ │ | |
| │ │ └─────────────┴───────────────┘ │ | |
| │ Sensor │ ┏━━━━━━━━━━━┓ │ | |
| │ │ ┃ Name ┃ │ | |
| │ │ ┡━━━━━━━━━━━┩ │ | |
| │ │ │ my_sensor │ │ | |
| │ │ └───────────┘ │ | |
| └──────────┴───────────────────────────────────────────────────────┘ | |
| """).strip() | |
| _EXPECTED_DEFS_JSON = textwrap.dedent(""" | |
| [ | |
| { | |
| "type": "asset", | |
| "key": "my_asset_1", | |
| "group": "default", | |
| "deps": [], | |
| "kinds": [], | |
| "group": "default", | |
| "description": null, | |
| "automation_condition": null | |
| }, | |
| { | |
| "type": "asset", | |
| "key": "my_asset_2", | |
| "group": "default", | |
| "deps": [], | |
| "kinds": [], | |
| "group": "default", | |
| "description": null, | |
| "automation_condition": null | |
| }, | |
| { | |
| "type": "job", | |
| "name": "my_job" | |
| }, | |
| { | |
| "type": "schedule", | |
| "name": "my_schedule", | |
| "cron_schedule": "@daily" | |
| }, | |
| { | |
| "type": "sensor", | |
| "name": "my_sensor" | |
| } | |
| │ │ │ my_schedule │ @daily │ │ | |
| │ │ └─────────────┴───────────────┘ │ | |
| │ Sensor │ ┏━━━━━━━━━━━┓ │ | |
| │ │ ┃ Name ┃ │ | |
| │ │ ┡━━━━━━━━━━━┩ │ | |
| │ │ │ my_sensor │ │ | |
| │ │ └───────────┘ │ | |
| └──────────┴───────────────────────────────────────────────────────┘ | |
| """).strip() | |
| _EXPECTED_DEFS_JSON = textwrap.dedent(""" | |
| [ | |
| { | |
| "key": "my_asset_1", | |
| "deps": [], | |
| "kinds": [], | |
| "group": "default", | |
| "description": null, | |
| "automation_condition": null, | |
| "type": "asset" | |
| }, | |
| { | |
| "key": "my_asset_2", | |
| "deps": [], | |
| "kinds": [], | |
| "group": "default", | |
| "description": null, | |
| "automation_condition": null, | |
| "type": "asset" | |
| }, | |
| { | |
| "name": "my_job", | |
| "type": "job" | |
| }, | |
| { | |
| "name": "my_schedule", | |
| "cron_schedule": "@daily", | |
| "type": "schedule" | |
| }, | |
| { | |
| "name": "my_sensor", | |
| "type": "sensor" | |
| } |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
|
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-803wnv7up-elementl.vercel.app Direct link to changed pages: |
8266845 to
da6e843
Compare
363a4b6 to
857b508
Compare
da6e843 to
0c980ae
Compare
0c980ae to
3338168
Compare

Summary & Motivation
Now we can pass info about asset checks through list defs
How I Tested These Changes
Also added an asset check to our unit tests
Changelog
dg list defsnow includes infomation about asset checks.