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

More precise running workunit for processes executing remotely #17719

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Dec 6, 2022

The run_execute_request workunit includes the "scheduling" time inside the remote execution server, during which the process might be queued because other workers are busy. But some servers (including buildgrid) support sending Operation API updates which indicate that a process has moved from queued to actually running.

To avoid including the queueing time in the Pants UI (and blaming processes as "long running" even though they are just queued), this change begins to consume the ExecuteOperationMetadata on streaming Operations to wait to begin reporting the process as running until either:

  1. We see an ExecutionStage::Unknown (indicating that the server probably doesn't support sending fine-grained operations)
  2. We see an ExecutionStage::Executing

The impact is that an overloaded execution server which reports ExecuteOperationMetadata will not begin reporting processes as running until they have actually begun executing.

@stuhood stuhood added needs-cherrypick category:bugfix Bug fixes for released features labels Dec 6, 2022
@stuhood stuhood added this to the 2.15.x milestone Dec 6, 2022
@stuhood
Copy link
Sponsor Member Author

stuhood commented Dec 6, 2022

Commits are useful to review independently.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@stuhood stuhood merged commit 5c65d4d into pantsbuild:main Dec 6, 2022
@stuhood stuhood deleted the stuhood/more-precise-remote-execution-workunit branch December 6, 2022 17:05
stuhood added a commit to stuhood/pants that referenced this pull request Dec 6, 2022
…build#17719)

The `run_execute_request` workunit includes the "scheduling" time inside the remote execution server, during which the process might be queued because other workers are busy. But some servers (including `buildgrid`) support sending `Operation` API updates which indicate that a process has moved from queued to actually running.

To avoid including the queueing time in the Pants UI (and blaming processes as "long running" even though they are just queued), this change begins to consume the `ExecuteOperationMetadata` on streaming `Operations` to wait to begin reporting the process as running until either:
1. We see an `ExecutionStage::Unknown` (indicating that the server probably doesn't support sending fine-grained operations)
2. We see an `ExecutionStage::Executing`

The impact is that an overloaded execution server which reports `ExecuteOperationMetadata` will not begin reporting processes as running until they have actually begun executing.
stuhood added a commit that referenced this pull request Dec 6, 2022
…y-pick of #17719) (#17725)

The `run_execute_request` workunit includes the "scheduling" time inside the remote execution server, during which the process might be queued because other workers are busy. But some servers (including `buildgrid`) support sending `Operation` API updates which indicate that a process has moved from queued to actually running.

To avoid including the queueing time in the Pants UI (and blaming processes as "long running" even though they are just queued), this change begins to consume the `ExecuteOperationMetadata` on streaming `Operations` to wait to begin reporting the process as running until either:
1. We see an `ExecutionStage::Unknown` (indicating that the server probably doesn't support sending fine-grained operations)
2. We see an `ExecutionStage::Executing`

The impact is that an overloaded execution server which reports `ExecuteOperationMetadata` will not begin reporting processes as running until they have actually begun executing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants