-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Content aware hash moved to script and tracked #166717
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
Only one place for this calculation. Update calc to include the calc.
|
fixes #166718 |
|
Seems reasonable. I assume we'd maybe add tests like we have in |
I'll add that tomorrow before progressing. |
mode can be different on windows; we just need the name and path
|
Tests that work on Windows and Linux. |
|
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. |
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
```
…)" (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]>
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.
content_aware_hash.{ps1|sh}update_engine_version.{ps1|sh}The files of import:
DEPS: tracks third party dependencies related to building the engineengine: all the code in the engine folderbin/internal/content_aware_hash.ps1: script for calculating the hash on windowsbin/internal/content_aware_hash.sh: script for calculating the hash on mac/linux.github/workflows/content-aware-hash.yml: github action for CI/CD hashingTested on windows and mac:
❯ ~/src/flutter/bin/internal/content_aware_hash.sh c24231e276e0719738e175e0622e040ad21a7012