Add an additional_info_url fields to ExecuteResponse.#36
Add an additional_info_url fields to ExecuteResponse.#36buchgr merged 1 commit intobazelbuild:masterfrom
Conversation
|
|
||
| // Similar to `server_logs`, an optional list of URLs the user may visit to | ||
| // obtain more information about the execution of the action. | ||
| repeated string additional_info_url = 5; |
There was a problem hiding this comment.
Why repeated? Do you have a use case for this already?
There was a problem hiding this comment.
I can only think this is due to logs from the worker side and logs from the execution side?
There was a problem hiding this comment.
That is a very good question. I have to say I didn't give this a lot of thought. "Why not?" must have been my reasoning.
Right now it's just the Bazel Buildbarn Browser to which we link. That said, there is a fair chance the scheduler processes will at some point gain a status page with info on workers, etc. Maybe there is a use for emitting links to that as well?
That's all speculating. If there's a preference for a non-repeated field (or the other extreme: a string keyed map, just like the server logs), I can change this. :-)
There was a problem hiding this comment.
The more generic version of the additional_info_url field would be a
string message = 5;
with the expectation being that a server can put an arbitrary message that a client is expected to display to the user. I do prefer the additional_info_url field because it's simple, no surprises and allows a client to have more control over how it presents the information to the user.
There was a problem hiding this comment.
Right now it's just the Bazel Buildbarn Browser to which we link. That said, there is a fair chance the scheduler processes will at some point gain a status page with info on workers, etc. Maybe there is a use for emitting links to that as well?
Wouldn't this require either a key or a description for each URL to make this usable? A list of URLs without any metadata doesn't sound user-friendly.
There was a problem hiding this comment.
Yeah, exactly. Let's switch this to a map then.
There was a problem hiding this comment.
Right now it's just the Bazel Buildbarn Browser to which we link. That said, there is a fair chance the scheduler processes will at some point gain a status page with info on workers, etc. Maybe there is a use for emitting links to that as well?
In that case couldn't you still only post a single link that takes the user to a web interface and link to other things from there? One link seems simple and powerful enough to fulfill all of these use cases.
|
Having read the original work this is based on, this is a nice proposal and I really like the website style that produces easily readable information for users. Though I'm unsure if support for URLs with additional information really fits into the Remote Execution API here. Perhaps we could expand the current
I still feel like this is more of a metadata result and very much optional which is what makes me feel uncomfortable having it written in the current form it is. |
Do you have specific concerns? I don't like Any in that it hurts cross compatibility between clients and services - it's poking a hole into a well specified protocol. |
Apologies, I amended my answer as you posted after realising it wasn't a sensible suggestion. For me, this is more of a metadata result than something essential to the |
|
My rational for including it in the I would argue against |
I have no problem with including this extra information and I rather like the idea. I just question if we should be shoving this field into the So if this is a type of log as you say, would it be better to refactor the
I find this field useful for builds that take a long time. I like how it allows the user to optionally stream logs back to the client and lets them know the status of the build. There are certain limitations about it which annoy me and I do question if we should be using the I've also made a mistake in my above comment, when I spoke about I would therefore argue that this field somehow be included as an improved logging message or in a |
|
Moving it into the https://github.com/EdSchouten/bazel-buildbarn/blob/master/pkg/proto/failure/failure.proto The URL that we return to the user is not much more than a digest of this message stored in the CAS. This is where it becomes problematic: by basing the URL on the digest of this message and storing that URL within the message, we introduce a cycle. This cycle could be avoided by only adding the URL to the Another thing that is worrisome about storing this underneath |
Agreed, I don't think this should be in the To be clear, I was suggesting we store these keys in |
|
Ah, gotcha. So it's either For a single This means that if these URLs are stored in the For Buildbarn Browser, the latter is sufficient. |
Bazel isn't the only client here. A better approach might be to look at what the API specifies. Currently when sending an
In this rare scenario, if a worker dies, could the server not retry the job internally, keeping the same
For jobs that take a long time, I wouldn't mind clicking on a URL to see what was happening. This URL could be retrieved from the metadata streamed from the first request you make. If you want to retrieve it from the last, you could still retrieve it from the metadata you receive from the final response you get since the It is a little subjective, though I feel that this data is metadata and should be made available from the first call and not just the last. |
|
Coming late to this very active party. :) I think that Finn has things roughly correct: the ExecuteResponse is intended to capture "end state" metadata for completed Actions, while the ExecuteOperationMetadata is intended to capture "status update" metadata for ongoing Actions. I think there are valid use cases for each type of metadata (and some data belongs in multiple places, e.g., stdout/stderr is provided as a stream handle in ExecuteOperationMetadata, but also as a digest in ActionResult). So, perhaps we should consider designating a place for this type of metadata in both ExecuteOperationMetadata and ExecuteResponse. Note that Bazel doesn't currently use ExecuteOperationMetadata, and that for Bazel, which is generally used to dispatch 100s or 1000s or actions, printing metadata for each ongoing action probably isn't the right thing to do. Other clients may have different usage patterns, though, so printing per-action metadata for ongoing actions may make more sense. In my opinion, the bigger question is how to capture and represent this data. I'd suggest that server_logs may be the right place after all, but that LogFile may need to be extended to support richer processing. For example, maybe it should have either a digest or embedded text. I think it should also specify some degree of handling preferences--something like "always print," "print on failure," or "never print"--as a hint to the client. |
YAGNI. If there is no current use case I'd argue we should revisit this once there is.
Works for me.
YAGNI. |
|
Thankyou for you responses :)
Adding or amending to the
I still feel that we are better off having a single If you take a look at what is returned from an |
|
@finnball are you suggesting of moving the |
|
Unless there's a good reason not to, I think it's better to move the mapping discussed for this MR to the I'm also suggesting in the future and in a separate MR, we could look at removing the |
|
Sorry for being even later to the party! Agree with Steven on the difference between the metadata and the response -- ExecuteOperationMetadata describes an in-progress operation, with fields such as stream handles for the outputs (and maybe logs, if we need them), while ExecuteResponse describes the completed action, with all the outputs already digested, and is stored persistently. I see a use-case for both here -- if the URL can be used to view the progress of an already executing action, or to ssh to the worker, or things like that -- these items belong in ExecuteOperationMetadata. But if the URL is used for debugging a failed action, then it belongs in the ExecuteResponse. Re: loop -- yes, the response digest cannot be part of the key in this case, it would have to be action-id+timestamp or some such. Btw, disagree with Jakob on ExecuteOperationMetadata -- it is the only way to get streamed logs, and we will definitely need to use it in Bazel if we want As to the field names: I am ambivalent about assuming that a server will always communicate in urls, I prefer the |
|
In order to make progress on solving this particular use case of displaying a url in case of a failed action. Would anyone strongly disagree with adding a simple For the other points raised here, let's talk about them in separate issues? I am happy to create the issues and start the discussion. |
|
Sounds good to me! |
This field may be used by a remote builder to inject additional lines of text into the output of the build client. Buildbarn may use this to print links to Buildbarn Browser, so that users can inspect build failures in more detail.
bef1c02 to
61c3b3f
Compare
|
SGTM |
1 similar comment
|
SGTM |
|
paging @finnball :-) |
|
Yup, fine by me. Thankyou. |
Noteworthy changes include: * From remote_execution.proto: - New message field in ExecuteResponse [1]. - Output file and dir. parent folders clarifications [2]. - Better doc. for do_not_cache/skip_cache_lookup [3]. - Documention updates. * From semver.proto: - Documentation updates. [1] bazelbuild/remote-apis#36 [2] bazelbuild/remote-apis#42 [3] bazelbuild/remote-apis#55
As mentioned in bazelbuild/bazel#6591, Bazel
Buildbarn now ships with a web service that can be used to explore data
stored in the CAS and AC.
By adding an extra field to ExecuteResponse, we can let Bazel
automatically report URLs to the user pointing to the correct page.
These URLs could, for example, be printed for build steps that fail.