variations: Migrate DevTools ClientVariations parser to TypeScript [chromium/src : main]

1 view
Skip to first unread message

Alexei Svitkine (Gerrit)

unread,
May 20, 2026, 12:57:02 PM (4 days ago) May 20
to Demetrios Papadopoulos, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
Attention needed from Andrzej Fiedukowicz and Demetrios Papadopoulos

Alexei Svitkine voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Andrzej Fiedukowicz
  • Demetrios Papadopoulos
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
Gerrit-Change-Number: 7860182
Gerrit-PatchSet: 18
Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
Gerrit-Comment-Date: Wed, 20 May 2026 16:56:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Demetrios Papadopoulos (Gerrit)

unread,
May 20, 2026, 2:43:36 PM (4 days ago) May 20
to Alexei Svitkine, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
Attention needed from Alexei Svitkine and Andrzej Fiedukowicz

Demetrios Papadopoulos added 1 comment

Patchset-level comments
File-level comment, Patchset 18 (Latest):
Demetrios Papadopoulos . resolved

cc'ing rbpotter as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexei Svitkine
  • Andrzej Fiedukowicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
Gerrit-Change-Number: 7860182
Gerrit-PatchSet: 18
Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
Gerrit-Comment-Date: Wed, 20 May 2026 18:43:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Demetrios Papadopoulos (Gerrit)

unread,
May 20, 2026, 2:54:14 PM (4 days ago) May 20
to Alexei Svitkine, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
Attention needed from Alexei Svitkine, Andrzej Fiedukowicz and Rebekah Potter

Demetrios Papadopoulos added 5 comments

File components/variations/proto/devtools/client_variations_uncompiled.ts
Line 82, Patchset 18 (Latest):(globalThis as any).parseClientVariations = parseClientVariations;
(globalThis as any).formatClientVariations = formatClientVariations;
Demetrios Papadopoulos . unresolved

Are these global exports really needed? This file is already using JS modules and the `export` keyword. Can whoever uses these not `import` them directly from here?

Line 81, Patchset 18 (Latest):
(globalThis as any).parseClientVariations = parseClientVariations;
(globalThis as any).formatClientVariations = formatClientVariations;
Demetrios Papadopoulos . unresolved

We are actively trying to ban 'any' across the codebase, see https://issues.chromium.org/issues/494464740.

While the code here is not passed through build_webui() and therefore would not have our checks automatically applied to it, the desire to disallow 'any' is still applicable here.

Can you remove this? For example does the following work equivalently?
```suggestion

Object.assign(globalThis, {parseClientVariations, formatClientVariations});
```

File components/variations/proto/devtools/update_client_variations.py
Line 57, Patchset 18 (Latest): "ignoreDeprecations": "6.0",
Demetrios Papadopoulos . unresolved

Why is this necessary? Note that we are actively preporing the codebase to support v7, so this would be a blocker, see [1]. If you can't address in the same CL, can you file a bug to track this removal and add a TODO comment here?

[1] https://issues.chromium.org/issues/423789047

Line 105, Patchset 18 (Latest):import path from 'path';
import fs from 'fs';
Demetrios Papadopoulos . unresolved

```suggestion
import path from 'node:path';
import fs from 'node:fs';
```

Line 116, Patchset 18 (Latest): resolveId(source, importee) {{
if (source.includes('@bufbuild/protobuf/')) {{
const parts = source.split('@bufbuild/protobuf/');
const subpath = parts[parts.length - 1];

// Try direct path
const p = path.resolve('{node_modules_posix}', subpath);
if (fs.existsSync(p)) return p;

// Try as directory with index.js
const p_idx = path.resolve('{node_modules_posix}', subpath, 'index.js');
if (fs.existsSync(p_idx)) return p_idx;

// Try with .js extension
const p_js = path.resolve('{node_modules_posix}', subpath + '.js');
if (fs.existsSync(p_js)) return p_js;
}}
if (source === 'client_variations_proto') {{
return '{proto_js_posix}';
}}
return null;
}}
Demetrios Papadopoulos . unresolved

Is inlining the entire Rollup plugin code here necessary? Can you move this to a checked-in rollup_plugin.js (or rollup_plugin.mjs) and instead trigger the plugin from here with the correct parameters?

See similar example from WebUI code generating rollup configs that invoke a plugin at [1] and the plugin itself at [2]. You can find generated configs in your out/<out>/<gen> folder, for example look at `out/gchrome/gen/chrome/browser/resources/tab_search/bundled/rollup.config.mjs`.

[1] https://source.chromium.org/search?q=rollup_plugin.mjs&ss=chromium%2Fchromium%2Fsrc:ui%2Fwebui%2Fresources%2Ftools%2F
[2] https://source.chromium.org/chromium/chromium/src/+/main:ui/webui/resources/tools/rollup_plugin.mjs

Open in Gerrit

Related details

Attention is currently required from:
  • Alexei Svitkine
  • Andrzej Fiedukowicz
  • Rebekah Potter
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
    Gerrit-Change-Number: 7860182
    Gerrit-PatchSet: 18
    Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
    Gerrit-Comment-Date: Wed, 20 May 2026 18:54:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Demetrios Papadopoulos (Gerrit)

    unread,
    May 20, 2026, 2:55:46 PM (4 days ago) May 20
    to Alexei Svitkine, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
    Attention needed from Alexei Svitkine, Andrzej Fiedukowicz and Rebekah Potter

    Demetrios Papadopoulos added 1 comment

    File components/variations/proto/devtools/update_client_variations.py
    Line 57, Patchset 18 (Latest): "ignoreDeprecations": "6.0",
    Demetrios Papadopoulos . unresolved

    Why is this necessary? Note that we are actively preporing the codebase to support v7, so this would be a blocker, see [1]. If you can't address in the same CL, can you file a bug to track this removal and add a TODO comment here?

    [1] https://issues.chromium.org/issues/423789047

    Demetrios Papadopoulos

    Also see https://chromium-review.googlesource.com/c/chromium/src/+/7861311/ which is about to land and as of this writing we can build Win/Mac/Linux with v7 successfully. Would the CL here affect that?

    Gerrit-Comment-Date: Wed, 20 May 2026 18:55:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alexei Svitkine (Gerrit)

    unread,
    May 21, 2026, 11:11:33 AM (3 days ago) May 21
    to Rebekah Potter, Demetrios Papadopoulos, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
    Attention needed from Andrzej Fiedukowicz, Demetrios Papadopoulos and Rebekah Potter

    Alexei Svitkine added 4 comments

    File components/variations/proto/devtools/client_variations_uncompiled.ts
    Line 82, Patchset 18:(globalThis as any).parseClientVariations = parseClientVariations;

    (globalThis as any).formatClientVariations = formatClientVariations;
    Demetrios Papadopoulos . resolved

    Are these global exports really needed? This file is already using JS modules and the `export` keyword. Can whoever uses these not `import` them directly from here?

    Alexei Svitkine

    Done, removed!

    File components/variations/proto/devtools/update_client_variations.py
    Line 57, Patchset 18: "ignoreDeprecations": "6.0",
    Demetrios Papadopoulos . resolved

    Why is this necessary? Note that we are actively preporing the codebase to support v7, so this would be a blocker, see [1]. If you can't address in the same CL, can you file a bug to track this removal and add a TODO comment here?

    [1] https://issues.chromium.org/issues/423789047

    Demetrios Papadopoulos

    Also see https://chromium-review.googlesource.com/c/chromium/src/+/7861311/ which is about to land and as of this writing we can build Win/Mac/Linux with v7 successfully. Would the CL here affect that?

    Alexei Svitkine

    Done, removed!

    Line 105, Patchset 18:import path from 'path';
    import fs from 'fs';
    Demetrios Papadopoulos . resolved

    ```suggestion
    import path from 'node:path';
    import fs from 'node:fs';
    ```

    Alexei Svitkine

    Done. Fixed in the standalone file.

    Line 116, Patchset 18: resolveId(source, importee) {{

    if (source.includes('@bufbuild/protobuf/')) {{
    const parts = source.split('@bufbuild/protobuf/');
    const subpath = parts[parts.length - 1];

    // Try direct path
    const p = path.resolve('{node_modules_posix}', subpath);
    if (fs.existsSync(p)) return p;

    // Try as directory with index.js
    const p_idx = path.resolve('{node_modules_posix}', subpath, 'index.js');
    if (fs.existsSync(p_idx)) return p_idx;

    // Try with .js extension
    const p_js = path.resolve('{node_modules_posix}', subpath + '.js');
    if (fs.existsSync(p_js)) return p_js;
    }}
    if (source === 'client_variations_proto') {{
    return '{proto_js_posix}';
    }}
    return null;
    }}
    Demetrios Papadopoulos . resolved

    Is inlining the entire Rollup plugin code here necessary? Can you move this to a checked-in rollup_plugin.js (or rollup_plugin.mjs) and instead trigger the plugin from here with the correct parameters?

    See similar example from WebUI code generating rollup configs that invoke a plugin at [1] and the plugin itself at [2]. You can find generated configs in your out/<out>/<gen> folder, for example look at `out/gchrome/gen/chrome/browser/resources/tab_search/bundled/rollup.config.mjs`.

    [1] https://source.chromium.org/search?q=rollup_plugin.mjs&ss=chromium%2Fchromium%2Fsrc:ui%2Fwebui%2Fresources%2Ftools%2F
    [2] https://source.chromium.org/chromium/chromium/src/+/main:ui/webui/resources/tools/rollup_plugin.mjs

    Alexei Svitkine

    Done, moved to a checked in file.

    Note: The rollup configuration boilerplate is still kept here (consistently with some other Chromium examples like ui/webui/resources/tools/bundle_js.py) because the configuration must point to absolute paths in the build directory or temporary directories that aren't known until execution time.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrzej Fiedukowicz
    • Demetrios Papadopoulos
    • Rebekah Potter
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
    Gerrit-Change-Number: 7860182
    Gerrit-PatchSet: 19
    Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
    Gerrit-Comment-Date: Thu, 21 May 2026 15:11:25 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Demetrios Papadopoulos (Gerrit)

    unread,
    May 21, 2026, 2:18:22 PM (3 days ago) May 21
    to Alexei Svitkine, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
    Attention needed from Alexei Svitkine, Andrzej Fiedukowicz and Rebekah Potter

    Demetrios Papadopoulos voted and added 6 comments

    Votes added by Demetrios Papadopoulos

    Code-Review+1

    6 comments

    Patchset-level comments
    File-level comment, Patchset 20 (Latest):
    Demetrios Papadopoulos . resolved

    LGTM with nits. Thanks for removing one more usage of Closure!

    File components/variations/proto/devtools/rollup_plugin.mjs
    Line 14, Patchset 20 (Latest): const subpath = parts[parts.length - 1];
    Demetrios Papadopoulos . unresolved

    Nit: You can get the last item of an array as follows.

    ```suggestion
    const subpath = parts.at(-1);
    ```
    Line 18, Patchset 20 (Latest): if (fs.existsSync(p)) return p;
    Demetrios Papadopoulos . unresolved
    Per styleguide.
    ```suggestion
    if (fs.existsSync(p)) {
    return p;
    }
    ```
    (here and elsewhere)
    Line 21, Patchset 20 (Latest): const p_idx = path.resolve(nodeModulesPath, subpath, 'index.js');
    Demetrios Papadopoulos . unresolved
    Per JS styleguide, these should be named with camelCase.
    ```suggestion
    const pIdx = path.resolve(nodeModulesPath, subpath, 'index.js');
    ```
    (here anh elsewhere in this file)
    Line 29, Patchset 20 (Latest): if (source === 'client_variations_proto') {
    return protoJsPath;
    }
    return null;
    Demetrios Papadopoulos . unresolved
    Nit: Use ternary.
    ```suggestion
    return source === 'client_variations_proto' ? protoJsPath : null;
    ```
    File components/variations/proto/devtools/update_client_variations.py
    Line 21, Patchset 20 (Latest):CWD = os.path.dirname(__file__)
    Demetrios Papadopoulos . unresolved

    This is confusing. CWD stands for "current working directory" but this not the current working directory, which in python can be fetched via `os.getcwd()`.

    Can you rename to `HERE_DIR` instead? This is a much more common naming for this variable, see examples below.

    https://source.chromium.org/search?q=HERE_DIR%20lang:py%20-file:out%2F%20-file:go%2F%20-file:luci%2F%20-file:third_party%2F%20-file:appengine%2F%20-file:v8%2F&ss=chromium

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexei Svitkine
    • Andrzej Fiedukowicz
    • Rebekah Potter
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
      Gerrit-Change-Number: 7860182
      Gerrit-PatchSet: 20
      Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
      Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
      Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
      Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
      Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
      Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
      Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
      Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
      Gerrit-Comment-Date: Thu, 21 May 2026 18:18:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alexei Svitkine (Gerrit)

      unread,
      May 21, 2026, 2:45:40 PM (3 days ago) May 21
      to Demetrios Papadopoulos, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
      Attention needed from Andrzej Fiedukowicz and Rebekah Potter

      Alexei Svitkine added 6 comments

      File components/variations/proto/devtools/client_variations_uncompiled.ts

      (globalThis as any).parseClientVariations = parseClientVariations;
      (globalThis as any).formatClientVariations = formatClientVariations;
      Demetrios Papadopoulos . resolved

      We are actively trying to ban 'any' across the codebase, see https://issues.chromium.org/issues/494464740.

      While the code here is not passed through build_webui() and therefore would not have our checks automatically applied to it, the desire to disallow 'any' is still applicable here.

      Can you remove this? For example does the following work equivalently?
      ```suggestion

      Object.assign(globalThis, {parseClientVariations, formatClientVariations});
      ```

      Alexei Svitkine

      Done

      File components/variations/proto/devtools/rollup_plugin.mjs
      Line 14, Patchset 20: const subpath = parts[parts.length - 1];
      Demetrios Papadopoulos . resolved

      Nit: You can get the last item of an array as follows.

      ```suggestion
      const subpath = parts.at(-1);
      ```
      Alexei Svitkine

      Done

      Line 18, Patchset 20: if (fs.existsSync(p)) return p;
      Demetrios Papadopoulos . resolved
      Per styleguide.
      ```suggestion
      if (fs.existsSync(p)) {
      return p;
      }
      ```
      (here and elsewhere)
      Alexei Svitkine

      Done

      Line 21, Patchset 20: const p_idx = path.resolve(nodeModulesPath, subpath, 'index.js');
      Demetrios Papadopoulos . resolved
      Per JS styleguide, these should be named with camelCase.
      ```suggestion
      const pIdx = path.resolve(nodeModulesPath, subpath, 'index.js');
      ```
      (here anh elsewhere in this file)
      Alexei Svitkine

      Done

      Line 29, Patchset 20: if (source === 'client_variations_proto') {
      return protoJsPath;
      }
      return null;
      Demetrios Papadopoulos . resolved
      Nit: Use ternary.
      ```suggestion
      return source === 'client_variations_proto' ? protoJsPath : null;
      ```
      Alexei Svitkine

      Done

      File components/variations/proto/devtools/update_client_variations.py
      Line 21, Patchset 20:CWD = os.path.dirname(__file__)
      Demetrios Papadopoulos . resolved

      This is confusing. CWD stands for "current working directory" but this not the current working directory, which in python can be fetched via `os.getcwd()`.

      Can you rename to `HERE_DIR` instead? This is a much more common naming for this variable, see examples below.

      https://source.chromium.org/search?q=HERE_DIR%20lang:py%20-file:out%2F%20-file:go%2F%20-file:luci%2F%20-file:third_party%2F%20-file:appengine%2F%20-file:v8%2F&ss=chromium

      Alexei Svitkine

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrzej Fiedukowicz
      • Rebekah Potter
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
        Gerrit-Change-Number: 7860182
        Gerrit-PatchSet: 21
        Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
        Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
        Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
        Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
        Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
        Gerrit-Comment-Date: Thu, 21 May 2026 18:45:34 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Andrzej Fiedukowicz (Gerrit)

        unread,
        May 22, 2026, 5:33:48 AM (3 days ago) May 22
        to Alexei Svitkine, Demetrios Papadopoulos, Rebekah Potter, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
        Attention needed from Alexei Svitkine and Rebekah Potter

        Andrzej Fiedukowicz added 6 comments

        Patchset-level comments
        File-level comment, Patchset 21 (Latest):
        Andrzej Fiedukowicz . unresolved

        Looks good, but it's a bit of an obscure corner of the codebase for me and I don't think I fully understand it, so on high level two questions:

         1. Have we tested that this still works? How?
        2. Could we add README.md which provides with the general context for this tool and its purpose.
        File components/variations/proto/devtools/client_variations_uncompiled.ts
        Line 18, Patchset 21 (Latest): * @param data The serialized ClientVariations proto contents, e.g.
        Andrzej Fiedukowicz . unresolved

        serialized as base64?

        Line 29, Patchset 21 (Latest): // Nothing to do here -- it's fine to leave `decoded` empty if base64
        // decoding fails.
        Andrzej Fiedukowicz . unresolved

        Can we just do:

        ```
        return {
        variationIds: [],
        triggerVariationIds: [],
        };
        ```

        So that the reader doesn't have to analyze the whole code below in the corner case of empty string?

        Line 45, Patchset 21 (Latest): parsed = {variationId: [], triggerVariationId: []};
        Andrzej Fiedukowicz . unresolved

        ditto, maybe:

        ```
        return {
        variationIds: [],
        triggerVariationIds: [],
        };
        ```
        File components/variations/proto/devtools/rollup_plugin.mjs
        Line 8, Patchset 21 (Latest):export function variationsResolver(nodeModulesPath, protoJsPath) {
        Andrzej Fiedukowicz . unresolved

        Is it worth adding some context in the comment here? This is a bit cryptic and seems like is just trying various setups so it works in different contexts, but I might be misinterpreting that.

        File components/variations/proto/devtools/update_client_variations.py
        Line 30, Patchset 21 (Latest):// Copyright 2020 The Chromium Authors
        Andrzej Fiedukowicz . unresolved

        Should be 2026?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alexei Svitkine
        • Rebekah Potter
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
          Gerrit-Change-Number: 7860182
          Gerrit-PatchSet: 21
          Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
          Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
          Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
          Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
          Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
          Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
          Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
          Gerrit-Comment-Date: Fri, 22 May 2026 09:33:33 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alexei Svitkine (Gerrit)

          unread,
          May 22, 2026, 11:57:33 AM (2 days ago) May 22
          to Demetrios Papadopoulos, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
          Attention needed from Andrzej Fiedukowicz, Demetrios Papadopoulos and Rebekah Potter

          Alexei Svitkine added 6 comments

          Patchset-level comments
          File-level comment, Patchset 21:
          Andrzej Fiedukowicz . resolved

          Looks good, but it's a bit of an obscure corner of the codebase for me and I don't think I fully understand it, so on high level two questions:

           1. Have we tested that this still works? How?
          2. Could we add README.md which provides with the general context for this tool and its purpose.
          Alexei Svitkine

          Done on both. For 1, I added the following to the cl desc:


          "Tested locally by building Chrome with this DevTools CL applied:
          https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7863572
          ... and navigating to a google.com url and inspecting headers in
          dev tools.
          "

          File components/variations/proto/devtools/client_variations_uncompiled.ts
          Line 18, Patchset 21: * @param data The serialized ClientVariations proto contents, e.g.
          Andrzej Fiedukowicz . resolved

          serialized as base64?

          Alexei Svitkine

          Done

          Line 29, Patchset 21: // Nothing to do here -- it's fine to leave `decoded` empty if base64
          // decoding fails.
          Andrzej Fiedukowicz . resolved

          Can we just do:

          ```
          return {
          variationIds: [],
          triggerVariationIds: [],
          };
          ```

          So that the reader doesn't have to analyze the whole code below in the corner case of empty string?

          Alexei Svitkine

          Done

          Line 45, Patchset 21: parsed = {variationId: [], triggerVariationId: []};
          Andrzej Fiedukowicz . resolved

          ditto, maybe:

          ```
          return {
          variationIds: [],
          triggerVariationIds: [],
          };
          ```
          Alexei Svitkine

          Done

          File components/variations/proto/devtools/rollup_plugin.mjs
          Line 8, Patchset 21:export function variationsResolver(nodeModulesPath, protoJsPath) {
          Andrzej Fiedukowicz . resolved

          Is it worth adding some context in the comment here? This is a bit cryptic and seems like is just trying various setups so it works in different contexts, but I might be misinterpreting that.

          Alexei Svitkine

          Done

          File components/variations/proto/devtools/update_client_variations.py
          Line 30, Patchset 21:// Copyright 2020 The Chromium Authors
          Andrzej Fiedukowicz . resolved

          Should be 2026?

          Alexei Svitkine

          Kept as-is. 2020 is correct because a) for existing files (this py file) we shouldn't bump copyright date and b) for code generated by files, the generated code should have matching copyright date to the generating file.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrzej Fiedukowicz
          • Demetrios Papadopoulos
          • Rebekah Potter
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
            Gerrit-Change-Number: 7860182
            Gerrit-PatchSet: 25
            Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
            Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
            Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
            Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
            Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
            Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
            Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
            Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
            Gerrit-Comment-Date: Fri, 22 May 2026 15:57:25 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Andrzej Fiedukowicz <af...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Alexei Svitkine (Gerrit)

            unread,
            May 22, 2026, 11:58:02 AM (2 days ago) May 22
            to Demetrios Papadopoulos, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
            Attention needed from Andrzej Fiedukowicz, Demetrios Papadopoulos and Rebekah Potter

            Alexei Svitkine voted and added 1 comment

            Votes added by Alexei Svitkine

            Commit-Queue+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 25 (Latest):
            Alexei Svitkine . resolved

            +thakis for src/PRESUBMIT.py

            Gerrit-Comment-Date: Fri, 22 May 2026 15:57:59 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Alexei Svitkine (Gerrit)

            unread,
            May 22, 2026, 11:58:41 AM (2 days ago) May 22
            to Nico Weber, Demetrios Papadopoulos, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
            Attention needed from Andrzej Fiedukowicz, Demetrios Papadopoulos, Nico Weber and Rebekah Potter

            Alexei Svitkine added 1 comment

            Patchset-level comments
            File-level comment, Patchset 25 (Latest):
            Alexei Svitkine . resolved

            +thakis for src/PRESUBMIT.py

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrzej Fiedukowicz
            • Demetrios Papadopoulos
            • Nico Weber
            • Rebekah Potter
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
            Gerrit-Change-Number: 7860182
            Gerrit-PatchSet: 25
            Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
            Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
            Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
            Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
            Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
            Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
            Gerrit-Attention: Nico Weber <tha...@chromium.org>
            Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
            Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
            Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
            Gerrit-Comment-Date: Fri, 22 May 2026 15:58:32 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Demetrios Papadopoulos (Gerrit)

            unread,
            May 22, 2026, 3:06:59 PM (2 days ago) May 22
            to Alexei Svitkine, Nico Weber, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
            Attention needed from Alexei Svitkine, Andrzej Fiedukowicz, Nico Weber and Rebekah Potter

            Demetrios Papadopoulos voted and added 2 comments

            Votes added by Demetrios Papadopoulos

            Code-Review+1

            2 comments

            Patchset-level comments
            Demetrios Papadopoulos . resolved

            Re-LGTM

            File components/variations/proto/devtools/client_variations_uncompiled.ts
            Line 25, Patchset 25 (Latest): if (!data) {
            Demetrios Papadopoulos . unresolved

            Are you chaecking against the empty string here? If so can you make it explicit? Otherwise this should never be null/undefined based on the type at line 21.

            Explicitly checking for the empty string makes it clearer whether this check is justified or if the type at line 21 is inaccurate, in which case it should be changed to be accurate.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Alexei Svitkine
            • Andrzej Fiedukowicz
            • Nico Weber
            • Rebekah Potter
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
              Gerrit-Change-Number: 7860182
              Gerrit-PatchSet: 25
              Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
              Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
              Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
              Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
              Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
              Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
              Gerrit-Attention: Nico Weber <tha...@chromium.org>
              Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
              Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
              Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
              Gerrit-Comment-Date: Fri, 22 May 2026 19:06:48 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Alexei Svitkine (Gerrit)

              unread,
              May 22, 2026, 3:28:59 PM (2 days ago) May 22
              to Demetrios Papadopoulos, Nico Weber, Rebekah Potter, Andrzej Fiedukowicz, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
              Attention needed from Andrzej Fiedukowicz, Nico Weber and Rebekah Potter

              Alexei Svitkine added 1 comment

              File components/variations/proto/devtools/client_variations_uncompiled.ts
              Line 25, Patchset 25: if (!data) {
              Demetrios Papadopoulos . resolved

              Are you chaecking against the empty string here? If so can you make it explicit? Otherwise this should never be null/undefined based on the type at line 21.

              Explicitly checking for the empty string makes it clearer whether this check is justified or if the type at line 21 is inaccurate, in which case it should be changed to be accurate.

              Alexei Svitkine

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Andrzej Fiedukowicz
              • Nico Weber
              • Rebekah Potter
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: chromium/src
                Gerrit-Branch: main
                Gerrit-Change-Id: I72330c30f864329aede81f23965a33e9694851b9
                Gerrit-Change-Number: 7860182
                Gerrit-PatchSet: 26
                Gerrit-Owner: Alexei Svitkine <asvi...@chromium.org>
                Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
                Gerrit-Reviewer: Andrzej Fiedukowicz <af...@google.com>
                Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
                Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
                Gerrit-CC: Rebekah Potter <rbpo...@chromium.org>
                Gerrit-Attention: Nico Weber <tha...@chromium.org>
                Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
                Gerrit-Attention: Andrzej Fiedukowicz <af...@google.com>
                Gerrit-Comment-Date: Fri, 22 May 2026 19:28:55 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy
                Reply all
                Reply to author
                Forward
                0 new messages