You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add (experimental) ability to run agent.build against locally bazel-built rtloader (#48342)
### What does this PR do?
This introduces a way to plug together the bazel-built rtloader with the existing, not-yet-bazelified, `agent.build`-driven Agent build. It adds:
- A `dda inv rtloader.install-with-bazel` command that builds rtloader and all its runtime dependencies, and puts them under the local `dev` (on linux) or under `bin`, roughly matching the expectations on a working Agent.
- A `--enable-bazel` flag to `dda inv agent.build` that will first run `rtloader.install-with-bazel` and then build the agent pointing at what bazel installed.
This includes a few extra tweaks to facilitate the installation of all the dependencies from this temporary rule.
### Motivation
Put the result of [ABLD-323](https://datadoghq.atlassian.net/browse/ABLD-323) in the hands of those that may want to try to reap some of the benefits locally. In particular, many contributors complain about problems with the linking to a python environment for rtloader when building it, which this helps with by installing one which should closely match the one used by the agent in actual builds.
### Describe how you validated your changes
I ran `agent.build --enable-bazel` on all three platforms and ran the resulting Agent without any obvious errors, and with the "python home" being properly detected.
### Additional Notes
This is opt-in behavior as there may be rough edges and we don't want to commit too much effort to making this a "blessed path", given that we're already working towards building the agent binary itself with Bazel, which would remove the need to have this kind of bridge.
We won't be able to fully deprecate CMake usage until further down the bazel migration.
----
The two commands can also be run separately in this sequence, such that we can just run the second one on subsequent builds:
```
dda inv rtloader.install-with-bazel
dda inv agent.build --exclude-rtloader --python-home-3=dev/embedded --embedded-path=dev/embedded
```
[ABLD-323]: https://datadoghq.atlassian.net/browse/ABLD-323?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: alex.lopez <[email protected]>
0 commit comments