Skip to content

Conversation

@christopherfujino
Copy link
Contributor

Description

This creates a cirrus test that will run on release branches and verify that the engine binaries are codesigned on macos.

Related Issues

This test would prevent issues like #50066.

Tests

I added an integration test file dev/bots/codesign.dart that verifies that certain cache binaries are codesigned.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@fluttergithubbot fluttergithubbot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Feb 4, 2020
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@Piinks
Copy link
Contributor

Piinks commented Feb 4, 2020

#49917 is happening here prior to #50088

final List<String> binaries = <String>[
path.join('bin', 'cache', 'dart-sdk', 'bin', 'dart'),
path.join('bin', 'cache', 'artifacts', 'engine', 'darwin-x64', 'flutter_tester'),
path.join('bin', 'cache', 'artifacts', 'engine', 'darwin-x64', 'gen_snapshot'),
Copy link
Contributor

Choose a reason for hiding this comment

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

font-subset?

Do we need to verify the ios-deploy and imobiledevice are signed asd well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was gonna (in a future PR) have this script parse the actual manifest file of all binaries in the engine to sign, but now I realize that that won't be easily accessible from the framework. I will hard-code them all here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked offline - it should be possible to just find all the binaries in bin/cache with the right MIME type and check those.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM!

@dnfield
Copy link
Contributor

dnfield commented Feb 5, 2020

I think this would be worth cherry picking onto the hot fix branch - both to test it out and to make sure we don't end up releasing a hotfix without this.

.cirrus.yml Outdated

- name: verify_binaries_codesigned-macos # macos-only
# TODO(fujino): remove this `only_if` after https://github.com/flutter/flutter/issues/44372
only_if: "$CIRRUS_BRANCH == 'dev' || $CIRRUS_BRANCH == 'beta' || $CIRRUS_BRANCH == 'stable'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Late add - we should make this run on hotfix branches too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, that'd be nice. Can you do pattern matching in the .cirrus.yml file @fkorotkov?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you can do something like $CIRRUS_BRANCH =~ '.*hotfix.*'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fkorotkov thanks!

@christopherfujino
Copy link
Contributor Author

I think this would be worth cherry picking onto the hot fix branch - both to test it out and to make sure we don't end up releasing a hotfix without this.

Yeah, that's my plan.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

L even better TM

@christopherfujino christopherfujino merged commit 105582e into flutter:master Feb 5, 2020
@christopherfujino christopherfujino deleted the test-binaries-are-signed branch February 5, 2020 20:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants