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
Add a command to the sccache client to query distributed status #390
Comments
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Jul 17, 2019
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Jul 19, 2019
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Jul 19, 2019
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Jul 30, 2019
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Aug 1, 2019
chmanchester
added a commit
to chmanchester/sccache
that referenced
this issue
Aug 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With an eye towards making the Firefox build system able to use distributed builds in a seamless way it would be nice if sccache exposed a command to query the status of its distributed compilation configuration. I'm imagining something like
sccache dist-status
which could return information about possible states:dist-client
feature or because it's not configured in the client's config file. (It might be worthwhile to report these as separate states to help users troubleshoot.)-j100
or other arbitrary values. We could change the scheduler's/status
API to include anum_cores
alongside thenum_servers
value it currently reports. TheSchedulerStatusResult
struct is defined here.In terms of implementation, the sccache server (that runs client-side) has a
dist_client
field that contains information about the current state of distributed compilation. Right now that struct only stores enough information to distinguish between "disabled" , "configured but not currently working", and "working". It ought to be straightforward to extend things to provide finer-grained information about the current state. The "not compiled with distributed support enabled" case is gated on#[cfg(feature = "dist-client")]
cfg blocks, and all "configured but not working" situations will result in using theDistClientState::RetryCreateAt
variant of that enum which doesn't currently capture any reason about why things aren't working, but that could be added. Additionally I don't think the server will actually contact the scheduler until a compilation request is made, so we would likely need to make an actual request to the scheduler to verify that. Hitting the/status
API would accomplish that as well as provide a way to expose the number of available cores which would be useful. The client->scheduler API is invoked by trait methods on thedist::Client
trait which is implemented in thedist::http::Client
struct. Extending that to expose the status API ought to be straightforward.The text was updated successfully, but these errors were encountered: