commit | e33d3fa39534ca160f9c84b8a184c0e154444980 | [log] [tgz] |
---|---|---|
author | Zach Bush <zmbush@google.com> | Thu Oct 13 21:56:53 2022 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Oct 13 21:56:53 2022 +0000 |
tree | 1f979bd41c5812fb3f631d81f89047f1f7a8965e | |
parent | a8e65c15177b9e872217c3df6f51594a232a986a [diff] |
[Cobalt 1.1] Delete stub local_aggregation_1_1 files To migrate this code smoothly into copybara, we will follow the following steps: 1. Create placeholder files in the new directory 2. Add BUILD files with glob targets in the new directory 3. Move code into new directory, while moving placeholders into old directory 4. Delete BUILD files from old directory 5. Delete placeholder files This is step 5 Bug: 111165 Bug: b/247019647 Change-Id: I7cbde5b184beea3e84c4cc5e3f4691f9eee00623 Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt/+/739127 Fuchsia-Auto-Submit: Zach Bush <zmbush@google.com> Reviewed-by: Cameron Dale <camrdale@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Cobalt is a pipeline for collecting metrics data from user-owned devices in the field and producing aggregated reports.
Cobalt includes a suite of features for preserving user privacy and anonymity while giving product owners the data they need to improve their products.
The code in the Git repo at https://fuchsia.googlesource.com/cobalt is known as Cobalt Core. It contains:
In order to have a working Cobalt system you need to also have
//third_party/cobalt
.This document describes how to develop, build and test Cobalt Core independently of Fuchsia, as well as from in the Fuchsia tree.
To download just the Cobalt Core repo:
git clone https://fuchsia.googlesource.com/cobalt
cd cobalt
To download the entire Fuchsia source code, including Cobalt Core, follow the instructions. Then change into the Cobalt Core directory:
cd third_party/cobalt
./cobaltb.py setup
This command is required after a first checkout, before running any other cobaltb.py
commands, and will take a few minutes the first time. It does the following:
third_party
dir via Git submodules.sysroot
dir. This uses CIPD.If the ./cobaltb.py setup
command is run in the third_party/cobalt
checkout of Cobalt Core in a Fuchsia tree, the Git submodules may interfere with the correct functioning of Jiri to update the repos in the Fuchsia tree. If problems occur, the submodules can be removed with: ./cobaltb.py deinit
. Before running any other cobaltb.py
commands in this checkout, ./cobaltb.py setup
will need to be run again to refetch the submodules.
The Python script cobaltb.py
in the root directory is used to orchestrate building and testing Cobalt. It was already used above in ./cobaltb.py setup
.
./cobaltb.py -h
for general helpcobaltb.py <command> -h
for help on a command./cobaltb.py build
The Cobalt build uses GN and ninja.
./cobaltb.py test
This runs the tests from the currently built code (build
must be run first).
./cobaltb.py fmt
./cobaltb.py lint
See: clang-tidy for an explanation of clang-tidy configuration options.
./cobaltb.py sync_with_fuchsia --make_commit
Cobalt Core‘s standalone build relies on git submodules to load several other git repositories, including the Cobalt Registry. These submodules are not rolled automatically, so developers need to occasionally manually roll them to keep the libraries and the Cobalt Registry up to date. The command above will update all Cobalt Core submodules to the latest versions used in Fuchsia’s integration repo, syncs the prebuilts into cobalt.ensure
, copies over some required files from the fuchsia repo, then creates a commit with a description of which submodules were updated.
If the Cobalt Core checkout is part of a Fuchsia tree, it can also be built using Fuchsia's tools. This can be done to test the Cobalt code changes build and function correctly in Fuchsia. However, the build/test/fmt/lint commands above should always be used before contributing a change to Cobalt Core.
fx build
In this way, the Cobalt Core and Fuchsia build systems can function correctly in parallel.
Cobalt uses the Gerrit code review tool. Although Cobalt Core is independent of Fuchsia, we do share infrastructure with Fucshia and so much of the instructions from Fuchsia's Contributing Guide apply to Cobalt Core. The main difference is that Cobalt Core does not use Jiri--it uses Git submodules instead.
Follow the instructions here.
To create a change in Gerrit do the following:
cd ~/cobalt
git checkout -b <branch_name>
git add <files>
git commit
git push origin HEAD:refs/for/main
See the Gerrit documentation for more information.
After creating a change, to upload a patch to your change, do the following:
git add <files>
--amend
option: git commit --amend
git push origin HEAD:refs/for/main