Closed vaskomitanov closed 3 months ago
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!
There is already a type defined by RBE for this, which https://github.com/facebook/buck2/pull/310 sends. You could pick up that PR and add the config flag that was requested.
Yes, sorry for not getting around to it lately. I think #310 is the right way forward, but note that PR is very incomplete. Most of the plumbing for the RBEv2 metadata isn't there, so I think a lot of refactorings need to go in, first.
tool_invocation_id
for this purpose.@vaskomitanov - are all your rebasings done now?
@vaskomitanov - are all your rebasings done now?
Yes. There are few fields not yet populated but even in this state we have all of the needed information for efficient scheduling for action execution and caching. I can add more information in a subsequent PR.
Thanks for taking this over the finish line! Please note that @krallin did I have one important adjustment he wanted me to make in https://github.com/facebook/buck2/pull/310#issuecomment-1612723781
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.
That is, they do a build of the OSS version of Buck internally and test that. So, we need to refactor this part of the diff in particular to just use a buckconfig
value instead of conditional compilation thru #[cfg]
:
Maybe we should call it:
[buck2_re_client]
use_fbcode_metadata = true
And then default it to false
so OSS users don't have to even know about it.
[buck2_re_client] use_fbcode_metadata = true
And then default it to
false
so OSS users don't have to even know about it.
OK, sorry for the wait (thanksgiving), I've made requested changes.
As a side note, to keep the current behavior, I've made use_fbcode_metadata
= true. Can make it false by default if everybody thinks that should be the way to go.
THIS IS A SAMPLE COMMENT
As a side note, to keep the current behavior, I've made
use_fbcode_metadata
= true. Can make it false by default if everybody thinks that should be the way to go.
IMO it should be turned off by default; after all, the code path in question is located inside the RPC client for the OSS Bazel API, so it's the exact path all OSS users rely on. This codepath should work as expected in OSS builds, i.e. with OSS metadata.
We could #[cfg]
that choice, but I'm sure Meta can override it with a simple -c buck2_re_client.use_fbcode_metadata=true
flag to buck2
in their test harness.
As a side note, to keep the current behavior, I've made
use_fbcode_metadata
= true. Can make it false by default if everybody thinks that should be the way to go.IMO it should be turned off by default; after all, the code path in question is located inside the RPC client for the OSS Bazel API, so it's the exact path all OSS users rely on. This codepath should work as expected in OSS builds, i.e. with OSS metadata.
We could
#[cfg]
that choice, but I'm sure Meta can override it with a simple-c buck2_re_client.use_fbcode_metadata=true
flag tobuck2
in their test harness.
OK, done, default is "false"
@ndmitchell any additional steps I need to do to get this PR merged?
Sorry for the delay - was travelling then got a bit ill. Just running through the code now.
@JakobDegen has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
This pull request has been reverted by 1d39ef8c4306fc18539388c56edc2835a75ab654.
The label was technically right that this was reverted, but I relanded it a day later so all good :)
Hi @vaskomitanov!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with
CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!