crowbar: pass metadata as commit message footer to Copybara [infra/infra : main]

0 views
Skip to first unread message

Jiewei Qian (Gerrit)

unread,
Jun 12, 2026, 2:46:11 AMJun 12
to Chenlin Fan, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Chenlin Fan

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Chenlin Fan
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Gerrit-Change-Number: 7929729
Gerrit-PatchSet: 1
Gerrit-Owner: Jiewei Qian <q...@chromium.org>
Gerrit-Reviewer: Chenlin Fan <fa...@chromium.org>
Gerrit-Attention: Chenlin Fan <fa...@chromium.org>
Gerrit-Comment-Date: Fri, 12 Jun 2026 06:46:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Chenlin Fan (Gerrit)

unread,
Jun 15, 2026, 8:41:14 PM (13 days ago) Jun 15
to Jiewei Qian, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Jiewei Qian

Chenlin Fan voted and added 1 comment

Votes added by Chenlin Fan

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jiewei Qian . resolved

fancl: want opinion :)

i'm contemplating if this is better or worse than implement a README.chromium parse + update in CLI.

^ if we need to cater for dependencies where the metadata files are derived based on requirements.txt / package.json / package-lock.json.

If i guess correctly, the multi-dependency README.chromium needs to be derived per package ecosystem. Not sure if we want to do this in go, or give owners an option to DIY.

Chenlin Fan

if they have a standard lock file we can implement the generator for them since it could be shared. I'm fine with starting with this and decide later when we actually need to handle multi-dependency README.chromium.

Just add a comment that if we have multi-dependency README.chromium then consider remove this implementation.

Open in Gerrit

Related details

Attention is currently required from:
  • Jiewei Qian
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Gerrit-Change-Number: 7929729
Gerrit-PatchSet: 1
Gerrit-Owner: Jiewei Qian <q...@chromium.org>
Gerrit-Reviewer: Chenlin Fan <fa...@chromium.org>
Gerrit-Attention: Jiewei Qian <q...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 00:41:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Jiewei Qian <q...@chromium.org>
satisfied_requirement
open
diffy

Jiewei Qian (Gerrit)

unread,
Jun 16, 2026, 1:54:22 AM (13 days ago) Jun 16
to Chenlin Fan, chromium...@chromium.org, infra-rev...@chromium.org

Jiewei Qian added 1 comment

Patchset-level comments
Jiewei Qian . resolved

fancl: want opinion :)

i'm contemplating if this is better or worse than implement a README.chromium parse + update in CLI.

^ if we need to cater for dependencies where the metadata files are derived based on requirements.txt / package.json / package-lock.json.

If i guess correctly, the multi-dependency README.chromium needs to be derived per package ecosystem. Not sure if we want to do this in go, or give owners an option to DIY.

Chenlin Fan

if they have a standard lock file we can implement the generator for them since it could be shared. I'm fine with starting with this and decide later when we actually need to handle multi-dependency README.chromium.

Just add a comment that if we have multi-dependency README.chromium then consider remove this implementation.

Jiewei Qian

Ack / Done.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Gerrit-Change-Number: 7929729
Gerrit-PatchSet: 2
Gerrit-Owner: Jiewei Qian <q...@chromium.org>
Gerrit-Reviewer: Chenlin Fan <fa...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 05:54:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Chenlin Fan <fa...@chromium.org>
Comment-In-Reply-To: Jiewei Qian <q...@chromium.org>
satisfied_requirement
open
diffy

Jiewei Qian (Gerrit)

unread,
Jun 18, 2026, 12:13:13 AM (11 days ago) Jun 18
to Chenlin Fan, chromium...@chromium.org, infra-rev...@chromium.org

Jiewei Qian voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Gerrit-Change-Number: 7929729
Gerrit-PatchSet: 2
Gerrit-Owner: Jiewei Qian <q...@chromium.org>
Gerrit-Reviewer: Chenlin Fan <fa...@chromium.org>
Gerrit-Reviewer: Jiewei Qian <q...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Jun 2026 04:13:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

LUCI CQ (Gerrit)

unread,
Jun 18, 2026, 12:34:27 AM (11 days ago) Jun 18
to Jiewei Qian, Chenlin Fan, chromium...@chromium.org, infra-rev...@chromium.org

LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: go/src/infra/tools/crowbar/pkg/spec/metadata.go
Insertions: 5, Deletions: 1.

@@ -10,7 +10,11 @@
"strings"
)

-// Metadata Git footer names. They're passed to Copybara as the origin's message.
+// Metadata Git footer names. They're passed to Copybara as the origin's message
+// and allows generating or updating README.chromium files in `copy.bara.sky`.
+//
+// TODO(b/524446296): Remove this if we decide to let Crowbar CLI to handle
+// README.chromium file updates.
const (
MetadataGitRepo = "Crowbar-Git-Repo"
MetadataGitCommit = "Crowbar-Git-Commit"
```

Change information

Commit message:
crowbar: pass metadata as commit message footer to Copybara

This CL adds logic to generate a "stub" origin message and pass it to
Copybara to serve as the missing message that describes a git commit or
gerrit change.

This would allow us to use them in Copybara workflow, for tasks like
generating or updating readme files.

The alternative approach is to implement a README.chromium parser /
replacement logic and handle funny multi-dependencies cases.
Bug: 464370533
Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Reviewed-by: Chenlin Fan <fa...@chromium.org>
Commit-Queue: Jiewei Qian <q...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81368}
Files:
  • M go/src/infra/tools/crowbar/internal/utilities/assets/copybara.java
  • A go/src/infra/tools/crowbar/pkg/spec/metadata.go
  • A go/src/infra/tools/crowbar/pkg/spec/metadata_test.go
  • M go/src/infra/tools/crowbar/pkg/spec/package.go
  • M go/src/infra/tools/crowbar/pkg/spec/stages.go
  • M go/src/infra/tools/crowbar/pkg/spec/stages_test.go
Change size: M
Delta: 6 files changed, 189 insertions(+), 2 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Chenlin Fan
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: I92fba9040e6c7c510258c81721d9048381879eb6
Gerrit-Change-Number: 7929729
Gerrit-PatchSet: 3
Gerrit-Owner: Jiewei Qian <q...@chromium.org>
Gerrit-Reviewer: Chenlin Fan <fa...@chromium.org>
Gerrit-Reviewer: Jiewei Qian <q...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages