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

Stream execution progress to the action page #6565

Merged
merged 3 commits into from
May 15, 2024
Merged

Conversation

bduffany
Copy link
Member

@bduffany bduffany commented May 13, 2024

Starting with the action page mostly as a proof of concept because it's easier to test than workflows and is maybe somewhat useful for larger actions. It will be more interesting to show this info on the queued invocation page (for workflow / remote bazel invocations).

Screen recording of an execution with an artificial 8s delay at the beginning of ExecuteTaskAndStreamResults + 750ms delay when transitioning between each execution state (otherwise the updates go by too quickly...) (also the "Unknown" execution status should probably be "Queued", need to fix that separately)

rec-2024-05-13_18.45.51.mp4

Related issues: N/A

@bduffany bduffany force-pushed the exec-progress-web branch 3 times, most recently from 38a5e6f to 35223bd Compare May 13, 2024 22:57
@bduffany bduffany changed the title WIP: stream execution progress to action page Stream execution progress to action page May 13, 2024
@bduffany bduffany changed the title Stream execution progress to action page Stream execution progress to the action page May 13, 2024
@bduffany bduffany marked this pull request as ready for review May 14, 2024 13:22
@bduffany bduffany requested review from jdhollen and siggisim and removed request for jdhollen May 14, 2024 13:22
@jdhollen
Copy link
Member

One extra thing--might be worth putting a tiny little spinner next to the status or something (until it's completed, obviously)? As it is it's not obvious that the text will potentially update.

I don't particularly like using a spinner, just think there should be something.

case ExecutionStage.QUEUED:
return "Queued";
case ExecutionStage.EXECUTING:
// Return fine-grained progress using BB-specific enum
Copy link
Member

Choose a reason for hiding this comment

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

nit: for readability, might be better to just break out the executionState-based text into its own function and call it directly here--the fall-through is a bit awkward.

Copy link
Member Author

Choose a reason for hiding this comment

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

good call, done

@@ -197,6 +197,12 @@ export default class InvocationComponent extends React.Component<Props, State> {
.catch((error: any) => {
console.error(error);
this.setState({ error: BuildBuddyError.parse(error) });

// To make manual testing easier, support a special 'retry' param that
// auto-reloads the page if there is an error.
Copy link
Member

Choose a reason for hiding this comment

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

why this one rpc + why this particular behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

eh I'm not sure how useful this will be in general so I just reverted this for now. The commit is b6a0e9c in case we need it in the future

@@ -74,6 +76,12 @@ export default class ExecutionCardComponent extends React.Component<Props, State
this.fetchUpdatedProgress();
}

// To help with manual testing, support a special "openFirst" URL param
// which automatically navigates to the first execution that we fetched.
Copy link
Member

Choose a reason for hiding this comment

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

Probably need to add a list of these somewhere (whether by an enum in code or just a list in a markdown file somewhere)--the way that they're placed right now means me and you will be the only people that know about them.

Copy link
Member Author

Choose a reason for hiding this comment

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

(Reverted for now, same as above)

@bduffany
Copy link
Member Author

bduffany commented May 15, 2024

One extra thing--might be worth putting a tiny little spinner next to the status or something (until it's completed, obviously)? As it is it's not obvious that the text will potentially update.

I don't particularly like using a spinner, just think there should be something.

I agree, I was thinking of maybe a pulsing blue dot ("progress-blue" color) but something tells me it's going to look a little weird. Will play around with this in a separate PR

@bduffany bduffany merged commit d9c2f9c into master May 15, 2024
17 of 18 checks passed
@bduffany bduffany deleted the exec-progress-web branch May 15, 2024 20:56
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.

None yet

2 participants