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

feat(remote_execution): attach RequestMetadata for non-fbcode builds #310

Closed
wants to merge 1 commit into from

Conversation

thoughtpolice
Copy link
Contributor

Summary: When doing requests to a RBE service, it's useful to attach the 'RequestMetadata' type defined by Bazel onto gRPC requests, using a specific header.

This is actually already done, more or less, but only for the internal fbcode build service which uses a different and simpler Metadata structure, and a different header. Therefore attaching a new header isn't so complicated.

This also ensures that non-fbcode builds of Buck2 don't bother attaching fbcode Metadata, since it's not useful and can only be tested internally there, anyway. And likewise, we don't attach OSS Bazel RequestMetadata to fbcode_build configurations, either.

Test Plan: NIH.

Change-Id: Irrsqpmptqmzzoukzuzrqmkxsoqtxvuvx

Summary: When doing requests to a RBE service, it's useful to attach the
'RequestMetadata' type defined by Bazel onto gRPC requests, using a specific
header.

This is actually already done, more or less, but only for the internal fbcode
build service which uses a different and simpler Metadata structure, and a
different header. Therefore attaching a new header isn't so complicated.

This also ensures that non-fbcode builds of Buck2 don't bother attaching
fbcode Metadata, since it's not useful and can only be tested internally there,
anyway. And likewise, we don't attach OSS Bazel RequestMetadata to fbcode_build
configurations, either.

Test Plan: NIH.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Irrsqpmptqmzzoukzuzrqmkxsoqtxvuvx
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 29, 2023
@thoughtpolice
Copy link
Contributor Author

thoughtpolice commented Jun 29, 2023

This will eventually fix #256, but it isn't ready yet. Just wanted to file it to get it out of the way. We need to pump around a bit more information to get this working, I think.

However, if the basic skeleton looks good, then I'll be rebasing in some more changes prior this that will plumb around more information.

@krallin
Copy link
Contributor

krallin commented Jun 29, 2023

Could we preferably expose this via a config option rather than a build flag? We do use our internal RE in order to test the OSS build, and that doesn't build with fbcode_build, so this would break that testing.

@thoughtpolice
Copy link
Contributor Author

Exactly why I drafted this instead of just submitting! I figured there would be some catch I didn't understand. I can rework this a little later.

@JakobDegen
Copy link
Contributor

#502 has landed which incorporates all of this and then some, so I'm gonna close this. Feel free to reopen if you disagree

@JakobDegen JakobDegen closed this Feb 29, 2024
@thoughtpolice thoughtpolice deleted the push-rrsqpmptqmzz branch July 12, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants