Skip to content

Add file system access profile to execute response - #243

Merged
EdSchouten merged 4 commits into
buildbarn:mainfrom
meroton:access-profile-in-action-result
Sep 23, 2026
Merged

EdSchouten merged 4 commits into
buildbarn:mainfrom
meroton:access-profile-in-action-result

Conversation

@osjo-meroton

Copy link
Copy Markdown
Contributor

Currently bb-portal uses the latest file system access profile saved to the FSAC. This profile may differ from the profile produced by the action being viewed, for example when viewing old action results. With this change, action result contains its corresponding access profile.

@EdSchouten EdSchouten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The problem is that the profile can become pretty big. I don't think it's a good idea to attach tens of kilobytes of data.

@moroten

moroten commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The problem is that the profile can become pretty big. I don't think it's a good idea to attach tens of kilobytes of data.

The recommended maximum size is 64 kB, so yes it is quite a bit of data. The goal is to get the access profile for a specific action. One could store the profile in FSAC for both the reduced action digest and the full action digest. That would though fill up the FSAC and there is race condition between execution and access if multiple actions are run in parallel.

What about storing the profile in the CAS and reference it from the action result? Then it's just ~70 bytes of data.

@EdSchouten

Copy link
Copy Markdown
Member

What about storing the profile in the CAS and reference it from the action result? Then it's just ~70 bytes of data.

Yeah, that makes more sense, though I would recommend gating it by a configuration option. What are your thoughts on including it in ExecuteResponse.server_logs? Or do you really need it to be part of ActionResult?

@osjo-meroton

Copy link
Copy Markdown
Contributor Author

Gating it by a configuration option seems very sensible.

As for using the logs instead. We would need the profile to be easily accessible at runtime.

@moroten

moroten commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

As for using the logs instead. We would need the profile to be easily accessible at runtime.

We meant remoteexecution.ExecutionResponse.server_logs, not to be confused with any logs of stdout/stderr on the servers.

Currently bb-portal uses the latest file system access profile saved to
the FSAC. This profile may differ from the profile produced by the
action being viewed, for example when viewing old action results. With
this change, action result contains its corresponding access profile.
Add file system access profile to execute response server logs and store
it in content addressable storage when configured.
@osjo-meroton
osjo-meroton force-pushed the access-profile-in-action-result branch from e20bd2d to 6c749c7 Compare September 22, 2026 12:45
@osjo-meroton

Copy link
Copy Markdown
Contributor Author

Has been rebased onto main and resubmitted with suggested changes. It now uses the Server Logs and CAS to log the file access profiles.

// Enables logging of generated file system access profiles.
//
// The profile digest is attached to the response Server Logs under
// "file-access-profile". The profile itself is also stored to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we call this file buildbarn.fsac.FileSystemAccessProfile, just like the fully-qualified name of the Protobuf message?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@osjo-meroton
osjo-meroton force-pushed the access-profile-in-action-result branch from d03913a to 7d80446 Compare September 23, 2026 08:03

@EdSchouten EdSchouten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Will merge if CI is happy.

@EdSchouten
EdSchouten merged commit c7bbd66 into buildbarn:main Sep 23, 2026
3 checks passed
@moroten
moroten deleted the access-profile-in-action-result branch September 30, 2026 07:29
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.

3 participants