Skip to content

Conversation

@jtmcdole
Copy link
Member

@jtmcdole jtmcdole commented Apr 7, 2025

  1. Calculate the hash in only two places: content_aware_hash.{ps1|sh}
  2. Call this from the workflow
  3. Eventually call this from update_engine_version.{ps1|sh}

The files of import:

  • DEPS: tracks third party dependencies related to building the engine
  • engine: all the code in the engine folder
  • bin/internal/content_aware_hash.ps1: script for calculating the hash on windows
  • bin/internal/content_aware_hash.sh: script for calculating the hash on mac/linux
  • .github/workflows/content-aware-hash.yml: github action for CI/CD hashing

Tested on windows and mac:

PS C:\src\flutter> C:\src\flutter\bin\internal\content_aware_hash.ps1
c24231e276e0719738e175e0622e040ad21a7012
~/src/flutter/bin/internal/content_aware_hash.sh
c24231e276e0719738e175e0622e040ad21a7012

@jtmcdole
Copy link
Member Author

jtmcdole commented Apr 7, 2025

fixes #166718

@matanlurey
Copy link
Contributor

Seems reasonable. I assume we'd maybe add tests like we have in update_engine_version_test.dart before using in prod?

@jtmcdole
Copy link
Member Author

jtmcdole commented Apr 7, 2025

I assume we'd maybe add tests like we have in update_engine_version_test.dart before using in prod?

I'll add that tomorrow before progressing.

@jtmcdole
Copy link
Member Author

jtmcdole commented Apr 8, 2025

Tests that work on Windows and Linux.

@jtmcdole jtmcdole requested a review from matanlurey April 8, 2025 23:57
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. team-tool Owned by Flutter Tool team d: docs/ flutter/flutter/docs, for contributors labels Apr 9, 2025
@jtmcdole
Copy link
Member Author

jtmcdole commented Apr 9, 2025

Changes: go back to only hashing the files responsible for engine builds. the content_aware_hash.ps1/sh files are a) tracked by git already and b) tested. If they change, they change, but the hash won't change for older commits.

@jtmcdole jtmcdole added autosubmit Merge PR when tree becomes green via auto submit App team-infra Owned by Infrastructure team and removed team-tool Owned by Flutter Tool team labels Apr 9, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
1. Calculate the hash in only two places: `content_aware_hash.{ps1|sh}`
2. Call this from the workflow
3. Eventually call this from `update_engine_version.{ps1|sh}`

 The files of import:
* `DEPS`: tracks third party dependencies related to building the engine
* `engine`: all the code in the engine folder
* `bin/internal/content_aware_hash.ps1`: script for calculating the hash
on windows
* `bin/internal/content_aware_hash.sh`: script for calculating the hash
on mac/linux
* `.github/workflows/content-aware-hash.yml`: github action for CI/CD
hashing

Tested on windows and mac:

```shell
PS C:\src\flutter> C:\src\flutter\bin\internal\content_aware_hash.ps1
c24231e276e0719738e175e0622e040ad21a7012
```

```shell
❯ ~/src/flutter/bin/internal/content_aware_hash.sh
c24231e276e0719738e175e0622e040ad21a7012
```
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…)" (flutter#166864)

<!-- start_original_pr_link -->
Reverts: flutter#166717
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Broke tree on
[postsubmit](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8718108088961866849/+/u/test:_run_suite_safari-dart2js-canvaskit-engine/stdout)
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jtmcdole
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
1. Calculate the hash in only two places: `content_aware_hash.{ps1|sh}`
2. Call this from the workflow
3. Eventually call this from `update_engine_version.{ps1|sh}`

 The files of import:
* `DEPS`: tracks third party dependencies related to building the engine
* `engine`: all the code in the engine folder
* `bin/internal/content_aware_hash.ps1`: script for calculating the hash
on windows
* `bin/internal/content_aware_hash.sh`: script for calculating the hash
on mac/linux
* `.github/workflows/content-aware-hash.yml`: github action for CI/CD
hashing

Tested on windows and mac:

```shell
PS C:\src\flutter> C:\src\flutter\bin\internal\content_aware_hash.ps1
c24231e276e0719738e175e0622e040ad21a7012
```

```shell
❯ ~/src/flutter/bin/internal/content_aware_hash.sh
c24231e276e0719738e175e0622e040ad21a7012
```
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
Rolls forward flutter#166717.

Does not copy the `README` or `DEPS` files, and instead uses synthetic
scratch files.

These files can change, so we can't possibly know how to hash them
consistently.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

d: docs/ flutter/flutter/docs, for contributors team-infra Owned by Infrastructure team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants