Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Download and use the goma client from cipd #41488

Merged
merged 2 commits into from
Apr 26, 2023
Merged

Conversation

zanderso
Copy link
Member

@zanderso zanderso commented Apr 25, 2023

In flutter/flutter#125361 we discovered that a new version of clang can require updating goma in order for goma to work properly. This PR adds a dependency on CIPD goma to the DEPS file so that we can update it for use in local builds when needed. Since CI does its own management of the goma client and the compiler proxy, and since goma can only be used by Googlers, the DEPS file download is guarded behind the use_cipd_goma gclient var. To use it one would update the engine .gclient file to be something like:

~/flutter/engine/src $ cat ../.gclient
solutions = [
  {
    "managed": False,
    "name": "src/flutter",
    "url": "[email protected]:zanderso/engine.git",
    "custom_deps": {},
    "custom_vars": {
      "use_cipd_goma": True,
    },
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]

I'll update the wiki with these instructions after this PR lands.

@zanderso zanderso force-pushed the cipd-goma branch 2 times, most recently from f382206 to 7fa6538 Compare April 25, 2023 21:46
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #41488 at sha 7fa6538

tools/gn Outdated
@@ -237,6 +266,9 @@ def setup_goma(args):
os.getenv('FLUTTER_GOMA_CREATE_XCODE_SYMLINKS', '0') == '1'):
goma_gn_args['create_xcode_symlinks'] = True

if goma_gn_args['use_goma'] and args.goma_ensure_start:
goma_ensure_start(goma_gn_args['goma_dir'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this call be gated by an env variable to execute only on local builds? starting goma this way for CI builds will remove all the visibility from the goma recipe module and can potentially cause issues difficult to triage.

Copy link
Member Author

@zanderso zanderso Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're un-forking the goma recipe module, then this should be gated to be only for local builds, but if we can't un-fork the recipe module, then driving goma from this script is one way we could get rid of the fork, and so avoid blocking clang rolls going forward.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send the CL to prepare the goma module to unfork it when there is an arm64 cipd package

tools/gn Outdated
@@ -1070,6 +1102,19 @@ def parse_args(args):
help='Do not run GN. Instead configure the Impeller cmake example build.',
)

parser.add_argument(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we giving too much power to this script? by the name it seems it was originally designed as a gn wrapper but now it is doing gn, cmake, and goma.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By design, this is the build setup step that the engine_v2 recipe calls, so if we want to run something before we do a ninja build, this is where it has to go, right?

Copy link
Contributor

@godofredoc godofredoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a question about starting goma for non googlers

@@ -965,6 +1010,36 @@ hooks = [
'src/flutter/tools/activate_emsdk.py',
]
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work for external users with no access to goma?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but this runhook will only run if the use_cipd_goma is explicitly set to true.

@zanderso
Copy link
Member Author

Added stronger gating on the gclient var, and shifted goma_ctl.py ensure_start to a gclient runhook (also gated by the gclient var) to avoid running on every gn invocation.

# stops working on a clang roll, this may need to be updated using the value
# from the 'integration' tag of
# https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/goma/client
'goma_version': ' git_revision:41b3bcb64014144a844153fd5588c36411fffb56',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not integration?

Are we updating the clang roller to update this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good idea. We can ask the Skia autoroller folks if that's possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not integration because we should probably avoid unpinned dependencies.

@dnfield
Copy link
Contributor

dnfield commented Apr 26, 2023

Making the compiler proxy start as a gclient hook rather than the GN script is an improvement

@zanderso zanderso merged commit aff8cbe into flutter:main Apr 26, 2023
@zanderso zanderso deleted the cipd-goma branch April 26, 2023 18:30
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 26, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 26, 2023
…125583)

flutter/engine@cf97541...fddd5ad

2023-04-26 [email protected] [Impeller] Use a device buffer for SkBitmap allocation, use Linear texture on Metal backend. (flutter/engine#41374)
2023-04-26 [email protected] Manual clang roll to 5344d8e10bb7d8672d4bfae8adb010465470d51b (flutter/engine#41520)
2023-04-26 [email protected] Download and use the goma client from cipd (flutter/engine#41488)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 27, 2023
jonahwilliams pushed a commit to flutter/flutter that referenced this pull request Apr 27, 2023
…125593)

flutter/engine@cf97541...d4ca524

2023-04-27 [email protected] Roll Skia from 20a1c61c5597 to
d315ab065af3 (5 revisions) (flutter/engine#41535)
2023-04-26 [email protected] Revert "[Impeller] Use a device
buffer for SkBitmap allocation, use Linear texture on Metal backend."
(flutter/engine#41533)
2023-04-26 [email protected] [codesign] Add pinned xcode version as
property to mac android aot engine (flutter/engine#41518)
2023-04-26 [email protected] [Impeller] Coerce opaque ColorSourceContents
to Source (flutter/engine#41525)
2023-04-26 [email protected] Roll Skia from 3fea88565a83 to
20a1c61c5597 (3 revisions) (flutter/engine#41530)
2023-04-26 [email protected] [Impeller] partial repaint for
Impeller/iOS. (flutter/engine#40959)
2023-04-26 [email protected] Updated todo with
github issue link (flutter/engine#41517)
2023-04-26 [email protected] Roll Clang from 20d06c833d83
to 5344d8e10bb7 (flutter/engine#41524)
2023-04-26 [email protected] [Impeller] Use a device buffer for
SkBitmap allocation, use Linear texture on Metal backend.
(flutter/engine#41374)
2023-04-26 [email protected] Manual clang roll to
5344d8e10bb7d8672d4bfae8adb010465470d51b (flutter/engine#41520)
2023-04-26 [email protected] Download and use the goma
client from cipd (flutter/engine#41488)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the
revert to ensure that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants