Commit message options

When uploading changes to Fuchsia's Gerrit instance, there are various options that can change the behavior of presubmit. These options are represented by special strings added to the commit message of a change.

This page documents the options that can be used for Fuchsia presubmit.

Important: While only some options (such as Git footers like Depends-on and Build-Only) need to be placed in the last paragraph of the commit message (with no blank lines between them and the Change-Id line or other trailers), it is safe and recommended to place all options there. If there is a blank line separating those that require it from Change-Id or other trailers, they will not be parsed and will have no effect.

Buganizer issue options

These options control associated bugs in Buganizer.

Bug

Bug: # adds a comment on the given Buganizer issue when a change is submitted.

For example:

Bug: 372314445

The above line resulted in this comment.

Fixed / Fixes

Fixed: # (or Fixes: #) adds a comment, and marks as “Fixed”, the given Buganizer issue when a change is submitted.

For example:

Fixed: 297456438

The above line resulted in this comment and status change on the issue.

Dependent changes options

Depends-on

Depends-on: <other-change-id> marks the change as depending on another change, possibly in a separate repository.

The change with the Depends-on footer will not be submittable until all dependencies have been submitted, and any dependencies will also be patched in during presubmit testing.

Important: The Depends-on footer must be in the last paragraph of the commit message (with no blank lines between it and the Change-Id line), or else it will have no effect.

For example:

[component] Short summary of change

Longer description of change.

Depends-on: Idc82d1483b4be8480aaa87bb48af8d03cfa45858
Change-Id: I3da1f71fdcd001107b17d959a3d2b46ce300eff3

{% dynamic if user.is_googler %}

To make a change in turquoise-internal-review.googlesource.com depend on a change in fuchsia-review.googlesource.com:

Depends-on: fuchsia:I9916ccaa4b95b6e9babdee33014fa6bd3d478f2e

To make a change in fuchsia-review.googlesource.com depend on a change in turquoise-internal-review.googlesource.com:

Depends-on: turquoise-internal:I9916ccaa4b95b6e9babdee33014fa6bd3d478f2e

{% dynamic endif %}

Test options

These options control how tests are executed.

Build-Only

Build-Only: true tells builders to exit early before running tests, so that only builds are run. This is helpful to get preliminary fast feedback on whether builds succeed without waiting for test execution.

Important: The Build-Only footer must be removed from the commit message before submitting. Gerrit will prevent submission of any changes containing this footer.

When the Build-Only footer is removed, presubmit will correctly rerun any builders that run tests (along with their tests) rather than reusing the previous build-only results, ensuring a full test run is executed before the change is merged.

Build-Only must be in the last paragraph of the commit message (with no blank lines between it and the Change-Id line), or else it will have no effect.

For example:

[component] Short summary of change

Longer description of change.

Build-Only: true
Change-Id: I3da1f71fdcd001107b17d959a3d2b46ce300eff3

Multiply

Multiply: <test name> will run the given test multiple times. This is helpful to confirm that specific tests are not flaky. This applies to builders triggered by CQ as well as manually-triggered builders started using the Choose Tryjobs dropdown.

For example:

Multiply: socket-integration

The above line reruns the “socket-integration” test multiple times.

Run-All-Tests

Run-All-Tests: true runs all tests, even if static analysis marks them as unaffected by a change. This option is helpful when making changes that can implicitly affect the entire system, such as changes to the Zircon kernel, Component Framework, Test Manager, or Diagnostics.

Cq-Include-Trybots

Cq-Include-Trybots <list> runs the given builders as part of presubmit for the change, in addition to the default set of presubmit builders.

For example:

Cq-Include-Trybots: luci.fuchsia.try:fuchsia-coverage-absolute

The above line forces execution of fuchsia-coverage-absolute along with the other jobs for presubmit.

Use the Choose Tryjobs dropdown in Gerrit to see the full set of available builders.