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

Conversation

@godofredoc
Copy link
Contributor

The flutter tool is expecting FlutterMacOS.dSYM.zip to be double zipped.

Bug: flutter/flutter#124911

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@godofredoc
Copy link
Contributor Author

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

@XilaiZhang
Copy link
Contributor

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

thanks for the info! Yeah I think the current topology covers this case.

based on the insights from flutter/flutter#124322 (comment) we would skip signing this file since it is debug symbols and not executables. On the signing tool side, this file will be skipped since if no signing metadata is found upon the first unzip, the file will be skipped.

@godofredoc
Copy link
Contributor Author

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

thanks for the info! Yeah I think the current topology covers this case.

based on the insights from flutter/flutter#124322 (comment) we would skip signing this file since it is debug symbols and not executables. On the signing tool side, this file will be skipped since if no signing metadata is found upon the first unzip, the file will be skipped.

This also applies to FlutterMacOS.framework.zip and any other potential double zipped artifacts.

Copy link
Contributor

@XilaiZhang XilaiZhang left a comment

Choose a reason for hiding this comment

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

Thanks for explaining! I added the changes needed for codesign metadata in comments.

I tested the correctness of the new change by downloading the artifacts built from bab6f0e engine v2 bucket, and run codesign locally on it.

@godofredoc
Copy link
Contributor Author

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

thanks for the info! Yeah I think the current topology covers this case.

based on the insights from flutter/flutter#124322 (comment) we would skip signing this file since it is debug symbols and not executables. On the signing tool side, this file will be skipped since if no signing metadata is found upon the first unzip, the file will be skipped.

This is covered at the recipes level: https://flutter-review.googlesource.com/c/recipes/+/42560

@godofredoc
Copy link
Contributor Author

Thanks for explaining! I added the changes needed for codesign metadata in comments.

I tested the correctness of the new change by downloading the artifacts built from bab6f0e engine v2 bucket, and run codesign locally on it.

ACK

@XilaiZhang
Copy link
Contributor

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

thanks for the info! Yeah I think the current topology covers this case.
based on the insights from flutter/flutter#124322 (comment) we would skip signing this file since it is debug symbols and not executables. On the signing tool side, this file will be skipped since if no signing metadata is found upon the first unzip, the file will be skipped.

This is covered at the recipes level: https://flutter-review.googlesource.com/c/recipes/+/42560

Umm I left a comment in recipe. Sorry if I misunderstood, umm I think in the recipe we are requiring the zip to be codesigned, but we are supplying empty configs. My understanding is that the codesign tool might detect the binary in the zip and report a failure due to the empty config. Or maybe we are planning to add more commits in this pr

The flutter tool is expecting FlutterMacOS.dSYM.zip to be double zipped.

Bug: flutter/flutter#124911
@godofredoc
Copy link
Contributor Author

\cc @XilaiZhang this will impact codesigning in two different parts: identifying if the file requires signing and also on the signing tool detecting if it needs to unzip twice.

thanks for the info! Yeah I think the current topology covers this case.
based on the insights from flutter/flutter#124322 (comment) we would skip signing this file since it is debug symbols and not executables. On the signing tool side, this file will be skipped since if no signing metadata is found upon the first unzip, the file will be skipped.

This is covered at the recipes level: https://flutter-review.googlesource.com/c/recipes/+/42560

Umm I left a comment in recipe. Sorry if I misunderstood, umm I think in the recipe we are requiring the zip to be codesigned, but we are supplying empty configs. My understanding is that the codesign tool might detect the binary in the zip and report a failure due to the empty config. Or maybe we are planning to add more commits in this pr

Details:

  • The double zip behavior is temporary, ~couple of weeks until it is fixed.
  • Having the inner zip with the correct structure(metadata with correct paths) would have been the easiest way to remove the outer zip, preventing additional disruption when the outer zip is removed.

@godofredoc
Copy link
Contributor Author

@XilaiZhang implemented your suggestions and added to TODOs to follow up when removing the outer zip folders.

@christopherfujino @jmagman any concerns about adding the double zip logic to the dsym artifact?

@jmagman
Copy link
Member

jmagman commented Apr 25, 2023

any concerns about adding the double zip logic to the dsym artifact?

I don't think the tool knows anything about the dSYM artifact, I don't think it downloads it at all. Users manually download it https://github.com/flutter/flutter/wiki/Crashes (and macOS isn't mentioned). Was that artifact actually causing issues somewhere? (I know the .framework was flutter/flutter#124911 (comment)).

@godofredoc
Copy link
Contributor Author

any concerns about adding the double zip logic to the dsym artifact?

I don't think the tool knows anything about the dSYM artifact, I don't think it downloads it at all. Users manually download it https://github.com/flutter/flutter/wiki/Crashes (and macOS isn't mentioned). Was that artifact actually causing issues somewhere? (I know the .framework was flutter/flutter#124911 (comment)).

It was not causing any issues but when checking all the artifacts I found the legacy dsym artifact is double zipped. I'm trying to get all the artifacts generated by engine v2 aligned with the legacy artifacts to avoid new disruptions during the migration.

Copy link
Contributor

@XilaiZhang XilaiZhang left a comment

Choose a reason for hiding this comment

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

LGTM! sorry for blocking v2 migration

As a side note, we could keep the metadata for both the inner zip and outer zip (have them both present), and remove the outer metadata when the outer zip is removed. This would work because the codesign tool only looks at metadata at the outer most layer.

@godofredoc godofredoc added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 25, 2023
@auto-submit auto-submit bot merged commit 34ece7a into flutter:main Apr 25, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 25, 2023
@godofredoc godofredoc deleted the dsym_double_zip branch April 25, 2023 21:54
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 25, 2023
flutter/engine@6d79839...34ece7a

2023-04-25 godofredoc@google.com Double zip FlutterMacOS.dSYM.zip. (flutter/engine#41425)

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 jsimmons@google.com,rmistry@google.com,zra@google.com 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.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants