Skip to content

Conversation

@jtmcdole
Copy link
Member

content aware hash was using --format which isn't present in older, but still supported operating systems. this pr removes the format string which basically reduces the output before hasing to:

100644 blob 198d80926b6e873c327f71350a0cdefee6a8402f	DEPS
040000 tree 139c1f10f92e4b9d4ac3ec7d4d27b2aa9775c5cd	engine

this format is still stable across all platforms and passed into git hash-object - which produces the actual hash fingerprint of the engine.

safety: this is the only scripts that produce this hash, so all downstream consumers keep consuming a sha1 output. Since this changes the sha, an engine version shouldn't exist for it and cocoon will build the artifacts for it.

fixes: #175265

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 updates the content-aware hashing scripts to ensure compatibility with older versions of Git by removing the --format argument from the git ls-tree command. This change correctly alters the output format and, consequently, the resulting hash. The test files have been updated accordingly with the new expected hash values and additional formatting adjustments to align with the project's style guide. The changes are logical and well-implemented. I have one minor suggestion to improve the robustness of the test code.

@jtmcdole
Copy link
Member Author

Ah crud; cocoon probably won't produce the artifacts v2 for presubmit testing.

@jtmcdole
Copy link
Member Author

flutter/cocoon#4858 has to land first.

@jtmcdole
Copy link
Member Author

jtmcdole commented Oct 1, 2025

flutter/cocoon#4858 has to land first.

will test again tomorrow assuming cocoon builds and deploys.

@jtmcdole jtmcdole force-pushed the updateHashForOlderGit branch from 9324de0 to 738ba03 Compare October 2, 2025 15:49
content aware hash was using --format which isn't present in older, but
still supported operating systems. this pr removes the format string
which basically reduces the output before hasing to:

```shell
100644 blob 198d809	DEPS
040000 tree 139c1f1	engine
```

this format is still stable across all platforms and passed into
`git hash-object` - which produces the actual hash fingerprint of the
engine.

safety: this is the only scripts that produce this hash, so all
downstream consumers keep consuming a sha1 output. Since this changes
the sha, an engine version shouldn't exist for it and cocoon will build
the artifacts for it.

fixes: flutter#175265
@jtmcdole jtmcdole force-pushed the updateHashForOlderGit branch from 738ba03 to 774165b Compare October 2, 2025 17:38
@jtmcdole jtmcdole requested a review from chingjun October 3, 2025 15:24
@jtmcdole jtmcdole added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 4, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Oct 4, 2025
Merged via the queue into flutter:master with commit a9ea4b4 Oct 4, 2025
183 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 6, 2025
flutter/flutter@5c0c9e9...908012d

2025-10-05 [email protected] Roll Skia from 5479115ef5bf to 1fd0ca1f2120 (1 revision) (flutter/flutter#176541)
2025-10-05 [email protected] Roll Fuchsia Linux SDK from oWcBvgdpdlGvaqiDg... to Zm6K_3gP3VCaMy9rH... (flutter/flutter#176538)
2025-10-05 [email protected] Roll Dart SDK from 53aeaeb2454c to 016a8c0045fd (1 revision) (flutter/flutter#176531)
2025-10-04 [email protected] Roll Skia from f316de3d47b4 to 5479115ef5bf (4 revisions) (flutter/flutter#176529)
2025-10-04 [email protected] Roll Dart SDK from 9bc52df78b67 to 53aeaeb2454c (1 revision) (flutter/flutter#176525)
2025-10-04 [email protected] Roll Fuchsia Linux SDK from HUhTcRn-LUXa2Salu... to oWcBvgdpdlGvaqiDg... (flutter/flutter#176515)
2025-10-04 [email protected] Fix TextFormField does not inherit local InputDecorationTheme (flutter/flutter#176397)
2025-10-04 [email protected] Roll Dart SDK from 0009748aed50 to 9bc52df78b67 (4 revisions) (flutter/flutter#176506)
2025-10-04 [email protected] Roll Skia from 9cda1a2050c4 to f316de3d47b4 (2 revisions) (flutter/flutter#176504)
2025-10-04 [email protected] fix: support older git (ubuntu 22.04) in content hash (flutter/flutter#176321)
2025-10-04 [email protected] Roll Skia from a454242c3934 to 9cda1a2050c4 (2 revisions) (flutter/flutter#176499)
2025-10-03 [email protected] [material/menu_anchor.dart] Check for reserved padding updates on layout delegate.  (flutter/flutter#176457)
2025-10-03 [email protected] Roll Skia from b842026480e0 to a454242c3934 (3 revisions) (flutter/flutter#176484)
2025-10-03 [email protected] Starts updating the DEPS in preupload. (flutter/flutter#176485)
2025-10-03 [email protected] Align flutter dependencies with ones coming from dart. (flutter/flutter#176475)
2025-10-03 [email protected] fix: delay exiting microbenchmark (flutter/flutter#176477)
2025-10-03 [email protected] Add state restoration for UIScene migration (flutter/flutter#176305)
2025-10-03 [email protected] Fix Voiceover traversal for OutlinedButton.icon (flutter/flutter#175810)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mboetger pushed a commit to mboetger/flutter that referenced this pull request Oct 7, 2025
content aware hash was using --format which isn't present in older, but
still supported operating systems. this pr removes the format string
which basically reduces the output before hasing to:

```shell
100644 blob 198d809	DEPS
040000 tree 139c1f1	engine
```

this format is still stable across all platforms and passed into `git
hash-object` - which produces the actual hash fingerprint of the engine.

safety: this is the only scripts that produce this hash, so all
downstream consumers keep consuming a sha1 output. Since this changes
the sha, an engine version shouldn't exist for it and cocoon will build
the artifacts for it.

fixes: flutter#175265
okorohelijah pushed a commit to okorohelijah/flutter that referenced this pull request Oct 7, 2025
content aware hash was using --format which isn't present in older, but
still supported operating systems. this pr removes the format string
which basically reduces the output before hasing to:

```shell
100644 blob 198d809	DEPS
040000 tree 139c1f1	engine
```

this format is still stable across all platforms and passed into `git
hash-object` - which produces the actual hash fingerprint of the engine.

safety: this is the only scripts that produce this hash, so all
downstream consumers keep consuming a sha1 output. Since this changes
the sha, an engine version shouldn't exist for it and cocoon will build
the artifacts for it.

fixes: flutter#175265
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
content aware hash was using --format which isn't present in older, but
still supported operating systems. this pr removes the format string
which basically reduces the output before hasing to:

```shell
100644 blob 198d809	DEPS
040000 tree 139c1f1	engine
```

this format is still stable across all platforms and passed into `git
hash-object` - which produces the actual hash fingerprint of the engine.

safety: this is the only scripts that produce this hash, so all
downstream consumers keep consuming a sha1 output. Since this changes
the sha, an engine version shouldn't exist for it and cocoon will build
the artifacts for it.

fixes: flutter#175265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter needs git>=2.36 since 2025-04-09

2 participants