-
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
[dagit] Auto-refreshing materialization + in progress run overlays on Asset graph #5825
Conversation
# Conflicts: # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetGraphExplorer.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/Utils.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/types/AssetGraphQuery.ts
# Conflicts: # js_modules/dagit/packages/core/src/assets/AssetMaterializations.tsx # js_modules/dagit/packages/core/src/graph/PipelineGraph.tsx # js_modules/dagit/packages/core/src/pipelines/GraphExplorer.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetGraphExplorer.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/SidebarAssetInfo.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/Utils.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/types/AssetGraphQuery.ts
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/elementl/dagster/BE7HTXuFPusgWpsk7qp5PYFDDEi3 [Deployment for f940455 canceled] |
dd5d858
to
ee959c9
Compare
> | ||
<span>This asset may be materialized soon by </span> | ||
|
||
{['12341514'].map((runId) => ( |
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.
Placeholder?
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.
Heh whoops, will fix 🤦♂️
<span>This asset may be materialized soon by </span> | ||
|
||
{['12341514'].map((runId) => ( | ||
<Link to={`/instance/runs/${runId}`} key={runId}> |
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.
I think elsewhere we put the link on the ID text or other inner info, rather than the tag itself.
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.
Ahh yeah I can move the link to the ID text 👍
e1a974c
to
3f269d5
Compare
I gave this a spin. It's pretty cool. Some comments:
|
That all sounds great! The asset details version of this definitely needs to happen, it'd be super cool - just waiting on one of the two PRs to merge. I think we can address #1 (the latest run header being static) and #2 + #4 today, will get those knocked out! I think the last point is interesting. Right now, the spinner would be spinning for any asset covered by an in-progress run - the spinner isn't tied to the current step state, just to the current state of the run. Not sure if it'd be helpful to get more granular - we could technically pull not just the current run Ids but the step logs inside those runs? (cc @sryza ) |
…h-in-progress # Conflicts: # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetGraphExplorer.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetNode.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/types/AssetGraphQuery.ts
…in-progress # Conflicts: # js_modules/dagit/packages/core/src/assets/AssetNodeDefinition.tsx # js_modules/dagit/packages/core/src/assets/AssetView.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetGraphExplorer.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/AssetNode.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/Utils.tsx # js_modules/dagit/packages/core/src/workspace/asset-graph/types/AssetGraphQuery.ts
Interesting, it looks like I was wrong! @clairelin135 what do you think of breaking this into two states? It'd be ideal if launching a run immediately returned some sort of in-progress state for the launched steps. Right now it takes a while for the spinner to start because the asset you picked actually needs to start, but this granular data is great. What if we returned both?
Something like this would also be ok as well:
|
Hey folks! I talked with Claire today about this and it sounds like we'll hold off on the "going to be refreshed by a run, but hasn't been yet" status. This status will address Sandy's points 4 and 5 above - right now there's a delay before the spinner appears because the run needs to launch and begin the step. The other feedback has all been addressed - there's now live status on the asset details page as well! I think this is ready for another look if you get a minute @hellendag |
if (paramsTimeWindowOnly) { | ||
return; | ||
} | ||
console.log('refetch'); |
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.
eep
Summary
This PR adds in-progress spinners and status messages to the Asset explorer using @clairelin135's new repo-level graphql query! I also split the query made by the AssetGraphExplorer in half - we load the graph itself (node definitions with their upstream node references) once, and have a separate query that returns the in-progress runs and latest asset materialization for each node. We refresh the latter every 5 seconds to give the asset graph a nice real-time info overlay. My hope is that having a smaller initial query also makes the time-to-usable-DAG lower.
I think a 5 second polling interval is ideal, but if the query is slow on large DAGs it'll back off a bit - I double checked the Apollo source and pollInterval will skip and retry
pollInterval
ms later if the previous query is still in flight (https://github.com/apollographql/apollo-client/blob/8155890a3ee296799cd318ca2ca749961eb91ce1/src/core/ObservableQuery.ts#L633).Test Plan
Just tested on hacker_new_assets graph so far.
Checklist