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

Support symlinks output for Remote Execution #222

Open
sluongng opened this issue May 1, 2023 · 2 comments
Open

Support symlinks output for Remote Execution #222

sluongng opened this issue May 1, 2023 · 2 comments

Comments

@sluongng
Copy link
Contributor

sluongng commented May 1, 2023

Currently, buck2 is wrapping RE's ActionResult with TActionResult2

pub struct TActionResult2 {
pub output_files: Vec<TFile>,
pub output_directories: Vec<TDirectory2>,
pub exit_code: i32,
pub stdout_raw: Option<Vec<u8>>,
pub stdout_digest: Option<TDigest>,
pub stderr_raw: Option<Vec<u8>>,
pub stderr_digest: Option<TDigest>,
pub execution_metadata: TExecutedActionMetadata,
// Compatibility with the Thrift structs
pub _dot_dot_default: (),
}

This struct is missing output_symlinks and the 2 deprecated fields output_file_symlinks and output_directory_symlinks that allow the remote executor to return symlink outputs to the client.

In some special cases, output_symlinks could be used to create dangling symlinks (symlinks with target could not be resolved on the build environments) to support some packaging rules. I.e. an RPM may contain symlinks with targets that only exist in the production environment.

@thoughtpolice
Copy link
Contributor

This is one blocker (among others) for buck2-nix using RE currently, because some of my build rules output symlinks to /nix/store, which is another use case for this. That will definitely have to come sometime after #193 lands, of course.

@krallin
Copy link
Contributor

krallin commented May 2, 2023

I think it shouldn't be very hard to include (PRs welcome, it sounds from your comments on #220 that you might be doing this), and the callsites probably need little changing to account for it. We don't actually have a backend that supports those internally, however so that'd need a little testing somewhere else.

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

No branches or pull requests

3 participants