Skip to content

[CP-beta]_downloadArtifacts (Web SDK) uses content-aware hashing in post-submit #174310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

flutteractionsbot
Copy link

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

< Replace with issue link here >

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

< Replace with changelog description here >

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

< Replace with impact description here >

Workaround:

Is there a workaround for this issue?

< Replace with workaround here >

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

< Replace with validation steps here >

…mit (flutter#174236)

Towards flutter#174225.

Will need to get cherry-picked into 3.35 and 3.36.
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Aug 22, 2025
@flutteractionsbot
Copy link
Author

@matanlurey please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions bot added engine flutter/engine repository. See also e: labels. platform-web Web applications specifically labels Aug 22, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the artifact download process for the Web SDK to use content-aware hashing for post-submit builds, which is more stable than using git revisions. A new contentHash variable is introduced in common.dart, calculated by executing a platform-specific script. The Environment class is updated to provide the flutterRootDir needed for this calculation. The CopyArtifactsStep is then updated to use this contentHash when downloading artifacts from Google Cloud Storage for non-try builds. The changes appear correct and well-implemented.

@matanlurey matanlurey added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Aug 22, 2025
auto-submit bot pushed a commit to flutter/cocoon that referenced this pull request Aug 22, 2025
…e engine for the commit (#4845)

#4844 was partially correct.

However, PRs such as flutter/flutter#174310 are still blocked because they touch the engine, and try-bots (as of currently) only upload engines to a git SHA, not a content hash. This PR relaxes the try-bot logic to continue to provide the current SHA as "this is the engine" if the engine is being built from source.

Implicitly, it will no longer provide `FLUTTER_PREBUILT_ENGINE_VERSION=` for the `master` branch, if and only if the engine is not being touched. That means `flutter <any command>` will start to download the engine using the content hash, which should be fine.
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 22, 2025
@auto-submit auto-submit bot merged commit 56f64c2 into flutter:flutter-3.36-candidate.0 Aug 22, 2025
166 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue engine flutter/engine repository. See also e: labels. platform-web Web applications specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants