[wiki migration] Pages under docs/postmortems/ (#148798)
This moves the wiki pages that have a final destination under docs/postmortems/ as planned in [flutter.dev/go/migrate-flutter-wiki-spreadsheet](https://docs.google.com/spreadsheets/d/1x65189ZBdNiLRygpUYoU08pwvXD4M-Z157c6pm8deGI/edit?usp=sharing) It also adds the team labels to the label bot for future PRs. Changes to the content were only updating cross links, or links to refer to the main branch rather than master. Remaining links to the wiki will be updated once all other pages have finished moving, they still work in the meantime. Part of https://github.com/flutter/flutter/issues/145009
This commit is contained in:
251
docs/postmortems/Postmortem-AndroidX-plugin-migration.md
Normal file
251
docs/postmortems/Postmortem-AndroidX-plugin-migration.md
Normal file
@@ -0,0 +1,251 @@
|
||||
# Flutter postmortem: AndroidX Plugin Migration
|
||||
|
||||
Status: draft
|
||||
|
||||
Owners: @mklim, @amirh, @dnfield, @hixie
|
||||
|
||||
## Summary
|
||||
|
||||
Description: The flutter/plugins repo was updated with a breaking change to
|
||||
resolve
|
||||
[flutter/flutter#23995](https://github.com/flutter/flutter/issues/23995). The
|
||||
change migrated and deprecated Android dependencies in the plugins'
|
||||
`build.gradle` files and required any apps using the plugins to also have Gradle
|
||||
files that were either migrated or compatible with the AndroidX. Gradle errors
|
||||
in hard-to-debug ways on Flutter apps broken by the change, without surfacing a
|
||||
clear explanation or migration path to affected users. In addition this was a
|
||||
known breaking change but originally incorrectly incremented the minor semantic
|
||||
version number in 6/32 of the affected packages.
|
||||
|
||||
Component: `flutter/plugins`
|
||||
|
||||
Date/time: 2019-01-24 13:24 -0800
|
||||
|
||||
Duration: 4 days for the semantic versioning problem. 2 weeks for the confusing
|
||||
Gradle error.
|
||||
|
||||
User impact: Users pinned to the major version of firebase_analytics,
|
||||
firebase_database, firebase_messaging, firebase_storage, google_sign_in, and
|
||||
url_launcher were broken by pub despite deliberately trying to avoid any
|
||||
breaking changes. All other first party plugin users that try to use the latest
|
||||
major version are affected by the confusing Gradle error.
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
### 2019-01-24
|
||||
|
||||
* 13:24 - First breaking change with incorrect versioning merged,
|
||||
[flutter/plugins#1103](https://github.com/flutter/plugins/pull/1103).
|
||||
* 14:20 - [flutter/plugins#1103](https://github.com/flutter/plugins/pull/1103)
|
||||
uploaded to pub. **<START OF OUTAGE>**
|
||||
|
||||
### 2019-01-25
|
||||
|
||||
* 09:44 - [flutter/plugins#1115](https://github.com/flutter/plugins/pull/1115),
|
||||
the final commit with breaking changes and incorrect semver, is merged to
|
||||
master.
|
||||
* 10:55 - Final batch of incorrectly versioned plugins is published to pub.
|
||||
* 13:53 - @hixie files
|
||||
[flutter/flutter#27106](https://github.com/flutter/flutter/issues/27106) for
|
||||
the obscure Gradle error following a fresh run of `flutter create` on the
|
||||
`stable` channel. Links the error to the AndroidX migration and tags @mklim,
|
||||
@amirh, and @dnfield.
|
||||
* 14:03 - @mklim confirms the root cause of the error as an incompatibility
|
||||
between the app and plugin's Gradle files. *(The semantic versioning issue is
|
||||
not known at this point.)*
|
||||
* 14:45 - @dnfield, @mklim, and @amirh discuss mitigating the user unfriendly
|
||||
`flutter create` error on `stable` offline. Decide to republish the AndroidX
|
||||
migration with a constraint so that users are on a version of flutter that
|
||||
produces AndroidX-compatible Gradle files. [pub](http://pub.dartlang.org)
|
||||
maintainers are contacted to remove the broken packages.
|
||||
|
||||
### 2019-01-26
|
||||
|
||||
* 00:30 - Email back and forth begins with pub maintainers.
|
||||
* 08:07 -
|
||||
[flutter/flutter#27128](https://github.com/flutter/flutter/issues/27128) filed
|
||||
about upgrading a >= 1.0.0 plugin's minor version number.
|
||||
* 12:33 - @mklim briefly explains the problem in
|
||||
[flutter/flutter#27128](https://github.com/flutter/flutter/issues/27128) and
|
||||
recommends to downgrade plugin versions since a revert for `flutter stable` is
|
||||
incoming. However his comment doesn't have details on all of the plugins to
|
||||
downgrade and what versions to downgrade them to. User discussion continues on
|
||||
this bug over the next 48 hours.
|
||||
* 14:00 - Discussion with pub maintainers concludes. The affected packages can't
|
||||
be replaced because pub has safeguards against removing a "stable" package
|
||||
version. Decided to replace the packages with a patch+1 revert, and then a
|
||||
patch+2 migration with the minimum Flutter SDK constraint.
|
||||
|
||||
### 2019-01-28
|
||||
|
||||
* 09:00 - *Semantic versioning issue discovered.* Offline discussion scheduled
|
||||
with @mklim, @amirh, @kevmoo, @hixie, and @dnfield to re-assess a fix.
|
||||
* 11:00 - @mklim, @amirh, @kevmoo, @hixie, and @dnfield re-review the issue with
|
||||
the semantic versioning issue also in mind. Decide that the minimum Flutter
|
||||
constraint is useless to address the problem since it really has to do with
|
||||
the app's `build.gradle`, which could have been generated by any Flutter
|
||||
version including the current one and which also could have been manually
|
||||
edited. Decide that the semver problem should be fixed by patching the 6
|
||||
affected plugins with a revert and then incrementing them with a major bump
|
||||
and the migration.
|
||||
* 11:45 - @mklim updates
|
||||
[flutter/flutter#27128](https://github.com/flutter/flutter/issues/27128) with
|
||||
a detailed description of the bug, root cause, way to fix via migration or
|
||||
downgrade, and plan to fix the semantic versioning for the affected plugins.
|
||||
* 14:28 - [flutter/plugins#1127](https://github.com/flutter/plugins/pull/1127)
|
||||
(the patch revert) is merged to master.
|
||||
* 15:05 - [flutter/plugins#1128](https://github.com/flutter/plugins/pull/1128)
|
||||
(the correct forward roll) is merged to master.
|
||||
* 15:08 - @dnfield alerts users following the AndroidX migration
|
||||
([flutter/flutter#23995](https://github.com/flutter/flutter/issues/23995)) of
|
||||
the semantic version issues and that there's going to be a major version bump.
|
||||
* 15:46 - The last affected package is updated on pub with both the patch revert
|
||||
and the forward roll with correct semver bump. **<END OF SEMVER
|
||||
OUTAGE>**
|
||||
* 15:58 - @mklim updates
|
||||
[flutter/flutter#27128](https://github.com/flutter/flutter/issues/27128) and
|
||||
[flutter/flutter#23995](https://github.com/flutter/flutter/issues/23995) with
|
||||
info on the 6 packages that have had their semantic versions updated.
|
||||
* 17:09 - @mklim updates
|
||||
[flutter/flutter#27106](https://github.com/flutter/flutter/issues/27106) with
|
||||
more details on the bug and the fixed semantic versioning problem.
|
||||
|
||||
### 2019-01-30
|
||||
|
||||
* 10:27 - @mklim updates the Flutter website via
|
||||
[flutter/website#2310](https://github.com/flutter/website/pull/2310) to
|
||||
explain how to import a Flutter app into the Android Studio IDE for automatic
|
||||
migration.
|
||||
* 11:28 - @mklim opens
|
||||
[flutter/plugins#1138](https://github.com/flutter/plugins/pull/1138) so that
|
||||
the plugins warn about the AndroidX migration when Gradle fails to compile.
|
||||
|
||||
### 2019-02-05
|
||||
|
||||
* 13:41- @mklim opens
|
||||
[flutter/flutter#27566](https://github.com/flutter/flutter/pull/27566) to
|
||||
detect gradle error messages and link to a Flutter AndroidX migration guide on
|
||||
the Flutter website in Flutter itself.
|
||||
* 17:35 - @mklim opens
|
||||
[flutter/website#2349](https://github.com/flutter/website/pull/2349) to add a
|
||||
migration guide to AndroidX for Flutter apps and plugins.
|
||||
|
||||
### 2019-02-07
|
||||
|
||||
* 13:23 - [flutter/website#2349](https://github.com/flutter/website/pull/2349)
|
||||
is merged.
|
||||
* 17:30 - [flutter/plugins#1138](https://github.com/flutter/plugins/pull/1138)
|
||||
and [flutter/flutter#27566](https://github.com/flutter/flutter/pull/27566) are
|
||||
merged. Plugins are uploaded with the change. **<END OF GRADLE ERROR
|
||||
OUTAGE>**
|
||||
|
||||
## Impact
|
||||
|
||||
### Some first party plugin users were broken in a minor version upgrade
|
||||
|
||||
It looks like the only issue filed for this directly has been
|
||||
[flutter/flutter#27128](https://github.com/flutter/flutter/issues/27128).
|
||||
|
||||
### All first party plugin users were broken in a confusing way
|
||||
|
||||
An explanation and migration path exists in the CHANGELOG.md of each plugin, but
|
||||
this information is hard to find and the actual Gradle error is not helpful.
|
||||
Several bugs on Github have been filed from affected users.
|
||||
|
||||
* [flutter/flutter#27106](https://github.com/flutter/flutter/issues/27106)
|
||||
* [flutter/flutter#27226](https://github.com/flutter/flutter/issues/27226)
|
||||
* [flutter/flutter#27146](https://github.com/flutter/flutter/issues/27146)
|
||||
* [flutter/flutter#27156](https://github.com/flutter/flutter/issues/27156)
|
||||
|
||||
## Root causes
|
||||
|
||||
[flutter/plugins#1103](https://github.com/flutter/plugins/pull/1103),
|
||||
[flutter/plugins#1115](https://github.com/flutter/plugins/pull/1115) migrated
|
||||
the plugins to support AndroidX instead of the original Android support
|
||||
libraries. See #23995 for more details, but in short the original support
|
||||
libraries are deprecated and not recommended for Android app development
|
||||
anymore.
|
||||
|
||||
This was a known breaking change and the changelog links to the official
|
||||
[migration steps](https://developer.android.com/jetpack/androidx/migrate). BUT
|
||||
plugins that were greater than or equal to `1.0.0` weren't updated according to
|
||||
[pubspec's semantic versioning
|
||||
philosophy](https://www.dartlang.org/tools/pub/versioning#semantic-versions). On
|
||||
pub for packages < `1.0.0` the versioning is `0.major.minor+patch`, and for >=
|
||||
1.0.0 it's `major.minor.patch`. The AndroidX PRs universally incremented the
|
||||
middle number, so any plugin that was already at or above `1.0.0` is being
|
||||
incorrectly treated as non-breaking by pub. This caused the semantic versioning
|
||||
issue.
|
||||
|
||||
In addition the breaking change was only surfaced in the CHANGELOG.md of each
|
||||
plugin, but resulted in breaking Gradle errors at runtime. These Gradle errors
|
||||
did not provide any obvious ways to debug the incompatibility.
|
||||
|
||||
## Lessons learned
|
||||
|
||||
### What worked
|
||||
|
||||
* The plugins were migrated to AndroidX!
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
* @hixie diagnosed the problem with standard `flutter create` templates
|
||||
relatively quickly and cc'ed the relevant devs.
|
||||
|
||||
### What didn't work
|
||||
|
||||
* We understood that the AndroidX migration was breaking, but underestimated the
|
||||
scale of the breakage. We didn't realize that it applied to all untouched
|
||||
`build.gradle` files produced by released versions of `flutter create`. Also
|
||||
failed to verify that the Gradle errors mentioned AndroidX or were otherwise
|
||||
easily understable.
|
||||
* The `flutter/plugins` CI failed to verify that the new plugins could be used
|
||||
with the template from `flutter create` on stable.
|
||||
* No manual sanity checks were recommended and insufficient ones were performed
|
||||
before publishing the packages to pub. There could have been manual checks to
|
||||
catch the `flutter create` and semantic versioning issues.
|
||||
* The packages were pushed Thursday/Friday (24-25) and remained broken over the
|
||||
weekend until a fix was decided communally when everyone was in the office
|
||||
Monday morning (28).
|
||||
* The breaking change and suggested migration were only surfaced in the
|
||||
CHANGELOG of the plugins, not in the actual Gradle compile error. The
|
||||
changelogs are not very findable and the Gradle error is confusing.
|
||||
* There was no way to mark the incorrect semver packages as broken in pub, so we
|
||||
needed to push a breaking revert along with a forward migration.
|
||||
|
||||
## Action items
|
||||
|
||||
### Prevention
|
||||
|
||||
* [flutter/flutter#27110](https://github.com/flutter/flutter/issues/27110) -
|
||||
Test the plugins from a blank, stable `flutter create` template on the plugins
|
||||
CI
|
||||
|
||||
### Detection
|
||||
|
||||
* [flutter/flutter#27258](https://github.com/flutter/flutter/issues/27258) - The
|
||||
plugins releasing process should be improved to help detect regressions.
|
||||
|
||||
### Mitigation
|
||||
|
||||
* [flutter/flutter#14818](https://github.com/flutter/flutter/issues/14818) -
|
||||
Translate Gradle errors into actionable steps for our users when possible.
|
||||
* [dart-lang/pub#2038](https://github.com/dart-lang/pub/issues/2038) - Show a
|
||||
migration prompt and ask for confirmation on updating a breaking change in
|
||||
pub.
|
||||
* [dart-lang/pub-dartlang-dart#378](https://github.com/dart-lang/pub-dartlang-dart/issues/378) - Tag
|
||||
specific pub releases as broken.
|
||||
|
||||
### Process
|
||||
|
||||
* [flutter/flutter#27258](https://github.com/flutter/flutter/issues/) - Have a
|
||||
better/more formalized releasing process for flutter/plugins.
|
||||
|
||||
### Fixes
|
||||
|
||||
* [flutter/plugins#1127](https://github.com/flutter/plugins/pull/1127)
|
||||
* [flutter/plugins#1128](https://github.com/flutter/plugins/pull/1128)
|
||||
* [flutter/website#2310](https://github.com/flutter/website/pull/2310)
|
||||
* [flutter/plugins#1138](https://github.com/flutter/plugins/pull/1138)
|
||||
* [flutter/flutter#27566](https://github.com/flutter/flutter/pull/27566)
|
||||
* [flutter/website#2349](https://github.com/flutter/website/pull/2349)
|
||||
123
docs/postmortems/Postmortem-Beta-1-Release.md
Normal file
123
docs/postmortems/Postmortem-Beta-1-Release.md
Normal file
@@ -0,0 +1,123 @@
|
||||
# Flutter postmortem: Beta 1 release process
|
||||
|
||||
Status: draft<br>
|
||||
Owners: [@tvolkert](https://github.com/tvolkert), [@Hixie](https://github.com/Hixie)
|
||||
|
||||
## Summary
|
||||
|
||||
Description: Flutter launched beta 1 on February 27, 2018. This document attempts to dissect what could have gone smoother strictly from a technical release process point of view.<br>
|
||||
|
||||
## Timeline (all times in PST)
|
||||
|
||||
### _2018/02/20 - 2018/02/25_
|
||||
|
||||
[@tvolkert](https://github.com/tvolkert) tests v0.1.4 in preparation for releasing it to beta on 2018/02/27.
|
||||
|
||||
### _2018/02/26_
|
||||
|
||||
| Time | |
|
||||
| --- | --- |
|
||||
| _11:40_ | [@tvolkert](https://github.com/tvolkert) tries to push v0.1.4 to beta but doesn’t have sufficient permissions, because the branch is protected on GitHub. |
|
||||
| _12:02_ | [@Hixie](https://github.com/Hixie) adds [@tvolkert](https://github.com/tvolkert) to the beta branch ACL so can push the beta release. |
|
||||
| _12:07_ | [@tvolkert](https://github.com/tvolkert) pushes v0.1.4 to the beta branch |
|
||||
| _12:20_ | [@mit-mit](https://github.com/mit-mit) tries to upgrade to the new beta and runs into [#15096](https://github.com/flutter/flutter/issues/15096). The exact cause is not yet known. |
|
||||
| _12:39_ | From similar reports from [@timsneath](https://github.com/timsneath) and [@mit-mit](https://github.com/mit-mit), [@tvolkert](https://github.com/tvolkert) notices that switching channels doesn’t fetch updated refs from GitHub and files [#14893](https://github.com/flutter/flutter/issues/14893). |
|
||||
| _14:40_ | [@timsneath](https://github.com/timsneath) runs into more trouble upgrading. [@tvolkert](https://github.com/tvolkert) begins trying to diagnose based on the reports. |
|
||||
| _16:53_ | After a few back-and-forths with [@timsneath](https://github.com/timsneath) over email, [@tvolkert](https://github.com/tvolkert) enlists the help of [@jason-simmons](https://github.com/jason-simmons) and [@cbracken](https://github.com/cbracken) in tracking down the cause for the problems [@timsneath](https://github.com/timsneath) is encountering. The goal is to determine whether the problems are an outlier unique to [@timsneath's](https://github.com/timsneath) setup or whether they’re likely to affect most users once the influx of users begins. |
|
||||
| _17:30_ | [@jason-simmons](https://github.com/jason-simmons) discovers that before [#14507](https://github.com/flutter/flutter/pull/14507) (v0.0.24), the “channel” command could create local (non-tracking) branches and that if [@timsneath](https://github.com/timsneath) was bitten by this, it would explain the behavior he’s seeing. The team tentatively decides the errors that [@timsneath](https://github.com/timsneath) is seeing are likely an outlier. |
|
||||
| _20:00_ | [@tvolkert](https://github.com/tvolkert) manages to reconstruct [@timsneath's](https://github.com/timsneath) environment setup and confirms [@jason-simmons'](https://github.com/jason-simmons) theory. The team adds a [section to the wiki](../releases/Flutter-build-release-channels.md#workaround) covering this case for users who may run into it. |
|
||||
|
||||
### _2018/02/27_
|
||||
|
||||
| Time | |
|
||||
| --- | --- |
|
||||
| _01:48_ | [@mit-mit](https://github.com/mit-mit) discovers that the gallery doesn’t run against the beta build and files [#14912](https://github.com/flutter/flutter/issues/14912).
|
||||
| _02:18_ | [@mravn-google](https://github.com/mravn-google) tracks down the cause of the failing gallery builds and discovers that it’s already been fixed in [#14714](https://github.com/flutter/flutter/pull/14714) (v0.1.5).
|
||||
| _06:00_ | The beta release is announced publicly.
|
||||
| _09:30_ | The Flutter team decides to push v0.1.5 to beta to pick up the fix to the gallery builds. [@tvolkert](https://github.com/tvolkert) begins testing v0.1.5.
|
||||
|
||||
### _2018/02/28_
|
||||
|
||||
| Time | |
|
||||
| --- | --- |
|
||||
| _10:00_ | [@tvolkert](https://github.com/tvolkert) pushes v0.1.5 to beta.
|
||||
| _10:20_ | [@tvolkert](https://github.com/tvolkert) [announces](https://groups.google.com/d/msg/flutter-dev/AFj7Rd_MNhY/lkMfRTDwAQAJ) the updated beta to the flutter-dev mailing list.
|
||||
| _16:00_ | [@tvolkert](https://github.com/tvolkert) discovers that docs.flutter.io did not update to reflect the beta release and files [#15002](https://github.com/flutter/flutter/issues/15002).
|
||||
|
||||
## Lessons Learned
|
||||
|
||||
### What Worked
|
||||
|
||||
* Beta 1 was successfully released on the target date!
|
||||
|
||||
* Most users have been able to successfully install Flutter against the beta release or upgrade from the dev channel. We’ve received only a few reports of problems; e.g. [#15074](https://github.com/flutter/flutter/issues/15074), [#14959](https://github.com/flutter/flutter/issues/14959)
|
||||
|
||||
* When the report of the failing gallery build hit, we were able to successfully vet a new dev build and push a new release to beta a day and a half later.
|
||||
|
||||
### What Didn't Work
|
||||
|
||||
* Our internal Google tests purposely don’t exercise our external build code paths (e.g. Gradle builds) — since within Google, everything is built using Bazel. This meant that although the gallery was unable to be built on the beta branch ([#14912](https://github.com/flutter/flutter/issues/14912)), we had no knowledge of this failure until after beta was pushed (and [@mit-mit](https://github.com/mit-mit) manually discovered the breakage). The bug had actually already been fixed on a newer dev build (in [#14714](https://github.com/flutter/flutter/pull/14714)), but we didn’t mark the affected build range as bad until after this was discovered and traced back to code that pointed to the existing fix. Our external tests were also [allowing failures on Travis](https://github.com/flutter/flutter/blob/5b46e0a4bef24e1c1302ba3ca40a99bd20a192da/.travis.yml#L18-L19), which was intentional at the time because we didn’t yet have confidence in those tests. In addition to fixing the issue, [#14714](https://github.com/flutter/flutter/pull/14714) also enabled those tests on Travis.
|
||||
|
||||
* The Flutter [release process](../releases/Release-process.md#rolling-the-beta-channel) didn’t call out the need to build and run the gallery as part of the beta vetting process, which further allowed the previous issue to go unnoticed.
|
||||
|
||||
* The Flutter team didn’t have on its radar to mark builds as bad when they saw or fixed issues that would warrant marking a build as bad. It’d be nice to have a better (ideally more automated) process around this.
|
||||
|
||||
* The release process instructs the person doing the release to ensure that the build:
|
||||
> can be successfully upgraded _to_ from an earlier dev build (via 'flutter upgrade')<br>
|
||||
> can be successfully upgraded _from_ to a later dev builds (via 'flutter upgrade')
|
||||
|
||||
Yet, there’s no way to cause the upgrade to stop at the target build - it always upgrades to tip-of-tree on the relevant branch. This means that the person doing the release is not experiencing the exact same upgrade path that the user will be experiencing.
|
||||
|
||||
* [@tvolkert](https://github.com/tvolkert), who was doing the roll, didn’t have permission to update `HEAD:beta` because it’s a restricted branch on GitHub.
|
||||
|
||||
* We pushed a follow-on beta build (v0.1.4 -> v0.1.5) the day after launch to fix the issue with the gallery building. Yet absent of [reading the flutter-dev email list](https://groups.google.com/forum/#!msg/flutter-dev/AFj7Rd_MNhY/lkMfRTDwAQAJ), users had no way of knowing that an upgrade was available because the flutter tool doesn’t alert them.
|
||||
|
||||
* The release process calls for the person doing the roll to simulate the upgrade path of our users, but it says “can be successfully upgraded to from an earlier dev build,” which is not explicitly the same upgrade that our users will face; they’ll be upgrading from one of the previous beta releases. This distinction would have led us to realize that such users would be bitten by [#15096](https://github.com/flutter/flutter/issues/15096).
|
||||
|
||||
* Users who stay exclusively on the beta channel and only upgrade when new beta releases are available will have Git repositories without any of the newer refs that have been added since their last upgrade. The person doing the beta release, on the other hand, will have a fresh clone of our Git repository and will be simulating our users’ upgrade path by issuing a `git reset --hard <old-version>` command. This distinction turned out to be substantive when trying to reproduce an error report from [@timsneath](https://github.com/timsneath). Ideally, the person doing the roll would be able to construct a Git repository synced to the previous beta release without any refs newer than that release.
|
||||
|
||||
### Bugs That Got in the Way
|
||||
|
||||
* In the “channel” command, we weren’t fetching updated refs from GitHub before [checking out the branch](https://github.com/flutter/flutter/blob/eaa9b47a4ac278a9439468911d2c361a472b114b/packages/flutter_tools/lib/src/commands/channel.dart#L103). This meant that if a user had switched to the beta branch in the past, then switched back to the alpha/dev branch as their primary channel, their beta Git head would be pointing to a commit in December. Net result: we had to [recommend](../releases/Flutter-build-release-channels.md#how-to-change-channels) that users run `flutter channel beta && flutter upgrade`, which is clunky.
|
||||
|
||||
* Until Feb 7 ([#14507](https://github.com/flutter/flutter/pull/14507)), we had a bug in the channel switching logic that would create branches as local (non-tracking) branches. If users tried to upgrade such channels, they’d get an error message about “no upstream repository configured.” Users who had tried switching to the beta channel that we had quietly pushed in December 2017 were bitten by this and found their local Git repository in a bad state. This likely only affected a very small number of users (perhaps only members of the Flutter team), but [@timsneath](https://github.com/timsneath) was one such user, and it took some time to remotely diagnose what was going on with his setup and whether his problems were indicative of a larger issue that was going to affect a large subset of our users. This time added uncertainty to our launch during crunch-time, where we weren’t sure if we should call off the launch announcements.
|
||||
|
||||
* The change that prepared the docs site for the beta launch ([#14606](https://github.com/flutter/flutter/pull/14606)) had a bug in it whereby docs would never get updated on the main docs site ([#15002](https://github.com/flutter/flutter/issues/15002)), and unfortunately this didn’t get caught in code review (partially due to GitHub code review’s auto-folding of very relevant content). This means that the main docs site hasn’t been updated since ~Feb 13 (and will now get updated in the next beta push).
|
||||
|
||||
* Once the beta branch was pushed, Travis began failing due to [#14975](https://github.com/flutter/flutter/issues/14975). A similar failure had happened on master and was fixed by [#14853](https://github.com/flutter/flutter/pull/14853), but the implications of that failure and how it’d manifest on the beta branch caused some confusion as to whether there was a real problem with the beta release.
|
||||
|
||||
## Action items
|
||||
|
||||
### Prevention
|
||||
|
||||
| Action Item | Owner | Issue | Notes |
|
||||
|-------------|-------|-------|-------|
|
||||
| Ensure that Travis tests the ability to build the gallery. | [@xster](https://github.com/xster) || [Done](https://github.com/flutter/flutter/pull/14714) |
|
||||
| Build all examples on Travis and AppVeyor on the dev branch. | [@xster](https://github.com/xster) | [#15164](https://github.com/flutter/flutter/issues/15164) ||
|
||||
| Add a hidden `--version` argument to `flutter upgrade` to allow the person doing a beta roll to better simulate the upgrade path. | [@tvolkert](https://github.com/tvolkert) | [#14970](https://github.com/flutter/flutter/issues/14970) ||
|
||||
| Fetch upstream refs before switching channels in the “channel” command. | [@tvolkert](https://github.com/tvolkert) | [#14893](https://github.com/flutter/flutter/issues/14893) | [Done](https://github.com/flutter/flutter/pull/14896) |
|
||||
|
||||
### Mitigation
|
||||
|
||||
| Action Item | Owner | Issue | Notes |
|
||||
|-------------|-------|-------|-------|
|
||||
| Make the flutter tool alert users when an upgrade is available. | [@tvolkert](https://github.com/tvolkert) | [#14920](https://github.com/flutter/flutter/issues/14920) ||
|
||||
|
||||
### Process
|
||||
|
||||
| Action Item | Owner | Issue | Notes |
|
||||
|-------------|-------|-------|-------|
|
||||
| Add a wiki page on identifying bad builds | [@tvolkert](https://github.com/tvolkert) | | [Done](../releases/Bad-Builds.md) |
|
||||
| Send an email to the core Flutter team about the need to think about marking builds as bad. | [@tvolkert](https://github.com/tvolkert) || Done |
|
||||
| Update our release process to call out the need to ensure that the gallery can be built and run. | [@tvolkert](https://github.com/tvolkert) || [Done](../releases/Release-process.md#rolling-the-beta-channel) |
|
||||
| Update release process to require that the Travis build go green on the beta branch before sending out any announcements or issuing any public communications. | [@tvolkert](https://github.com/tvolkert) || [Done](../releases/Release-process.md#rolling-the-beta-channel) |
|
||||
| Make a beta pusher group in GitHub, to control who has access to push beta releases. | [@Hixie](https://github.com/Hixie) || [Done](../releases/Release-process.md#rolling-the-beta-channel) |
|
||||
| Update beta release process to require that the candidate dev build “can be successfully upgraded to from the dev build to which the beta branch currently points.” | [@tvolkert](https://github.com/tvolkert) || [Done](../releases/Release-process.md#rolling-the-beta-channel) |
|
||||
| Update the release process to include downloading and installing the packaged archive for the dev build that represents the prior beta — and ensuring that it’s able to upgrade to the newest release. | [@gspen...](https://github.com/gspencergoog) |||
|
||||
|
||||
### Fixes
|
||||
|
||||
| Action Item | Owner | Issue | Notes |
|
||||
|-------------|-------|-------|-------|
|
||||
| Fix docs to get uploaded on the next beta push | [@tvolkert](https://github.com/tvolkert) | [#15002](https://github.com/flutter/flutter/issues/15002) | [Done](https://github.com/flutter/flutter/pull/15003) |
|
||||
| Fix create_test.dart to depend on package:flutter_test for its “package” template tests (not package:test) | [@tvolkert](https://github.com/tvolkert) | [#14975](https://github.com/flutter/flutter/issues/14975) | [Done](https://github.com/flutter/flutter/pull/14976) |
|
||||
84
docs/postmortems/Postmortem-Build-Breakage-on-2016-11-08.md
Normal file
84
docs/postmortems/Postmortem-Build-Breakage-on-2016-11-08.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# Flutter postmortem: Build Breakage on 2016-11-08
|
||||
|
||||
Status: final<br>
|
||||
Owners: chinmay
|
||||
|
||||
## Summary
|
||||
|
||||
Description: Travis reported failures on builds<br>
|
||||
Component: flutter repository<br>
|
||||
Date/time: 2016-11-07 21:30<br>
|
||||
Duration: 16h 45m<br>
|
||||
User impact: Flutter team members were unable to merge new PRs. Users would have been unable to run flutter tests if they upgraded, though we did not receive complaints during the outage.
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
### 2016-10-24
|
||||
|
||||
A change to package:args is committed ([591f9c](https://github.com/dart-lang/args/pull/55/commits/08b1b5301de1aa3f18dedf9343ea637a58591f9c)) that introduces a bug whereby `run()` no longer returns the value returned by the command.
|
||||
|
||||
### 2016-11-02
|
||||
|
||||
**15:11** The [change](https://github.com/dart-lang/args/pull/55) to package:args is merged into the args repository.
|
||||
|
||||
### 2016-11-07
|
||||
|
||||
**16:27** Dart package:args tag 0.13.6+1 is cut -- and shortly after is pushed to pub **<START OF OUTAGE>**<br>
|
||||
**21:36** ianh reports that Travis is upset and all PRs are failing
|
||||
|
||||
2016-11-08
|
||||
|
||||
**07:52** danrubel reports that Travis is still failing<br>
|
||||
**11:03** chinmaygarde reports he’s facing the same breakage in his pending PR<br>
|
||||
**11:07** Issue is reproduced locally. chinmaygarde, jsimmons and danrubel begin looking for the root cause of the breakage.<br>
|
||||
**13:08** Root cause of outage identified as a new version of package:args that Flutter picked up whereby `run()` no longer returns the value returned by the command (so we couldn’t get accurate exit codes).<br>
|
||||
**13:19** Flutter PR [#6765](https://github.com/flutter/flutter/pull/6765) sent to pin Flutter to a known good version of package:args<br>
|
||||
**13:42** [fb3bf7a](https://github.com/flutter/flutter/commit/fb3bf7a9d776c81651e3d65268d02ef97a259e1c) identified as root cause of the internal breakage.<br>
|
||||
**14:15** Fix lands. **<END OF OUTAGE>**
|
||||
|
||||
## Root causes
|
||||
|
||||
A bug was introduced in package:args that was picked up by Flutter. Flutter was vulnerable to this bug because our external dependencies have open-ended version constraints, so the stability of our codebase is not hermetic. This was an intentional choice; we have experienced this failure mode previously, and have been running on the basis that we are not yet stable enough to deal with the costs of being hermetic.
|
||||
|
||||
## Action items
|
||||
|
||||
### Prevention
|
||||
|
||||
| Action Item | Owner | Tracking bug | Notes |
|
||||
|-------------|-------|--------------|-------|
|
||||
| Pin our external Dart dependencies to specific versions to ensure that our public stability is hermetic. | chinmay | [#6767](https://github.com/flutter/flutter/issues/6767) | |
|
||||
|
||||
### Detection
|
||||
|
||||
| Action Item | Owner | Tracking bug | Notes |
|
||||
|-------------|-------|--------------|-------|
|
||||
| We should have a continuous monitoring bot that tries to run all our tests | ianh | [#6777](https://github.com/flutter/flutter/issues/6777) | |
|
||||
|
||||
### Mitigation
|
||||
|
||||
None.
|
||||
|
||||
### Process
|
||||
|
||||
None.
|
||||
|
||||
### Fixes
|
||||
|
||||
| Action Item | Owner | Tracking bug | Notes |
|
||||
|-------------|-------|--------------|-------|
|
||||
| Update our package:args dependency to a known good version | danrubel | [PR #6575](https://github.com/flutter/flutter/pull/6765) | Done |
|
||||
| Deploy a forward-rolling bot that goes red if our dependencies release a breaking change, and otherwise updates us to the latest versions of everything. | ianh | [#4696](https://github.com/flutter/flutter/issues/4696) | |
|
||||
|
||||
## Lessons learned
|
||||
|
||||
### What worked
|
||||
|
||||
* Once the Flutter team had a clear set of owners for the issue, it was root-caused and resolved quickly.
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
* The outage did not break users. It likely would have if we had a larger userbase.
|
||||
|
||||
### What didn't work
|
||||
|
||||
* There were indications of the breakage as early as 2016/11/07 21:30, yet the team didn’t start looking into it in earnest until 2016/11/08 11:00. Once we get to the point where our build is hermetic (so we control our own stability) and we separate production artifacts from development artifacts (e.g., have a release branch), then we should consider providing an SLA, at which time we’d have to create processes around how to maintain that SLA.
|
||||
@@ -0,0 +1,129 @@
|
||||
# Flutter postmortem: Widespread Gradle failures on Flutter v1.12.13+hotfix.5
|
||||
|
||||
Status: final<br>
|
||||
Owners: amirh@
|
||||
|
||||
## Summary
|
||||
|
||||
Description: Many users reported Gradle build failure after upgrading to Flutter v1.12.13+hotfix.5 <br>
|
||||
Component: plugins<br>
|
||||
Date: 2019-12-11<br>
|
||||
Duration: 19 hours<br>
|
||||
User impact: Users of the following plugins: url_launcher, google_sign_in, video_player, firebase_auth, firebase_core, shared_preferences who are using Android Studio couldn’t build their applications.
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
### 2019-09-01
|
||||
stuartmorgan@ notices that Flutter applications that are using non-Android plugins are failing to build for Android (same for iOS) and files https://github.com/flutter/flutter/issues/39657. The root cause is that the Flutter gradle plugin assumes that all plugins include an Android implementation and tries to build it.
|
||||
|
||||
### 2019-09-16
|
||||
stuargmorgan@ prototypes [a fix](https://github.com/flutter/flutter/compare/main...stuartmorgan:wip-platform-plugin-files?expand=1). That fix requires migration of existing plugins.
|
||||
|
||||
### 2019-09-18
|
||||
As a temporary workaround for the issue above (Android only), amirh@ lands https://github.com/flutter/flutter/pull/40640 which makes `flutter.gradle` skip packages that do not have an `android/build.gradle` file, this workaround lives in the Flutter SDK and does not require plugin migration.
|
||||
|
||||
The change lands with a test that:
|
||||
1. Creates a new ios-only flutter plugin named flutter_plugin_test
|
||||
1. Deletes the android/ folder
|
||||
1. Creates a new flutter app which depends on flutter_plugin_test
|
||||
1. Builds an apk for that app
|
||||
|
||||
In the following months work starts on federated web and mac implementations of `flutter/plugins` and `FirebaseExtended/flutterfire` plugins. With #40640 landed, these implementations all land without an `android/` folder.
|
||||
|
||||
### 2019-11-25
|
||||
blasten@ lands https://github.com/flutter/flutter/pull/45379 which reworks the Gradle workflow.
|
||||
This patch introduces a different code path for building transitive dependencies, the new code path again assumes that all plugins support `android/`. Though no one notices, and no tests fail (the test introduced in #40640 passes as flutter_plugin_test isn’t included as a transitive dependency).
|
||||
|
||||
|
||||
### 2019-12-06
|
||||
In preparation for the new pub.dev version that supports multi platform federated plugins and for the coming stable Flutter release the team decides to start endorsing web plugins (by adding them as a dependency of the app-facing plugins, so e.g url_launcher_web becomes a dependency of url_launcher). When staging the first PR for url_launcher, CI alerts us that the example application fails building for Android. After some investigation amirh@ and blasten@ figure out that https://github.com/flutter/flutter/pull/45379 introduced the regression.
|
||||
|
||||
amirh@ starts adding a no-op `android/` implementations to the offending plugins, at the same time blasten@ sends https://github.com/flutter/flutter/pull/46282 which allows gradle to build apps with non Android plugins as transitive dependencies. At this point the release candidate for the next stable (1.12.13) was already cut without #46282.
|
||||
|
||||
The logic in #46282 is somewhat similar to #40640 and skips packages that do not have an `android/` folder, amirh@ asks blasten@ whether we should be consistent with #46282 and check for `android/build.gradle` but both figure it shouldn’t matter and the PR lands as-is.
|
||||
|
||||
|
||||
### 2019-12-09
|
||||
The web team makes the case that #46282 should be cherry picked into 1.12.13 to avoid adding no-op `android/` folders to all web implementations. It’s cherry picked into v.12.13+hotfix.4 and the team decides to not add any more no-op `android/` implementations and endorse the existing with a minimal Flutter SDK constraint of `>=1.12.13+hotfix.4`.
|
||||
|
||||
The team moves forward to publish the endorsements for: url_launcher, google_sign_in, video_player, firebase_auth, firebase_core, shared_preferences. At this point users of stable Flutter aren’t impacted as there is not yet a stable Flutter release which satisfies the version constraint, so pub won’t fetch the new plugin versions which include the endorsements.
|
||||
|
||||
### 2019-12-11
|
||||
06:15pm - V1.12.13+hotfix.6 is released to stable **<START OF OUTAGE>**
|
||||
|
||||
At this point, users of any of {url_launcher, google_sign_in, video_player, firebase_auth, firebase_core, shared_preferences} are affected by 2 issues:
|
||||
#### 1. Android Studio users can’t build their apps
|
||||
Android studio automatically creates an `android/` folder for all the Gradle subprojects during the “analyzing project phase”. This essentially disables the fix in #46282. (note that it does not create a build.gradle file.)
|
||||
|
||||
This is not detected by CI as we’re not using Android Studio on CI.
|
||||
|
||||
#### 2. Non fully AndroidX-compatible projects fail to build
|
||||
The Flutter tool has a backup build strategy to deal with AndroidX failures - if the first build attempt fails due to an AndroidX issue, the Flutter tool tries a secondary build strategy which builds all plugins as AARs (this enables Jettifier). This AAR workflow was not updated to support non-Android plugins, which guarantees the build retry will fail if any of the affected plugins are included as dependencies.
|
||||
|
||||
|
||||
### 2019-12-12
|
||||
10:45am - amirh@ skims over new Flutter issues and notices multiple reports on Gradle errors due to plugins missing Android support and files https://github.com/flutter/flutter/issues/46898 to start tracking.
|
||||
|
||||
While blasten@ is investigating the Gradle issue the team starts to mitigate by adding no-op `android/` implementations to the endorsed web plugins.
|
||||
|
||||
01:34pm - All endorsed web plugins got a no-op `android/` folder **<END OF OUTAGE>**
|
||||
|
||||
### 2019-12-13
|
||||
blasten@ figures the underlying Gradle issue (https://github.com/flutter/flutter/issues/46898#issuecomment-565612416) and start working on a fix.
|
||||
|
||||
|
||||
## Impact
|
||||
|
||||
Users of multiple popular Flutter plugins were not able to build their Android apps following an upgrade to Flutter V1.12.13+hotfix.6 and were getting uninformative Gradle failures.
|
||||
|
||||
|
||||
## Root causes
|
||||
|
||||
1. Web plugin implementations that did not include an Android implementation were endorsed by popular Flutter plugins relying on #46282.
|
||||
1. #46282 did not take into account that Android Studio may create an `android/` folder for subprojects.
|
||||
1. The AAR build workflow did not support non-Android implementations.
|
||||
|
||||
## Lessons learned
|
||||
|
||||
|
||||
### What worked
|
||||
|
||||
- The community was quick to report the new issue.
|
||||
- The team was quick to mitigate by applying a workaround to all plugins.
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
- amirh@ skimmed the Flutter issue database a day after the incident started and flags the issue. Normally issue triage meetings run on a weekly cadence so it could have taken a whole week until the issue was flagged.
|
||||
|
||||
### What didn't work
|
||||
|
||||
- Non-Android transitive dependencies were not supported when Android Studio is used.
|
||||
- The AAR build workflow did not support non-Android dependencies.
|
||||
|
||||
## Action items
|
||||
|
||||
- All endorsed plugin implementation should have a op-op Android implementation until the Gradle fixes are in stable. OWNER: amirh@ (DONE).
|
||||
- The `flutter.gradle` script should exclude non-Android plugins for transitive dependencies in a way that’s resilient to Android Studio side effects. OWNER: blasten@ (DONE).
|
||||
- The `flutter.gradle` script should exclude non-Android plugins in the AAR build workflow as well. OWNER: blasten@ (DONE).
|
||||
|
||||
|
||||
### Detection
|
||||
|
||||
{link to github issues for things that would have detected this failure before it became An Incident, such as better testing, monitoring, etc}
|
||||
|
||||
* All `dev/devicelab/bin/tasks/gradle_*` tests should run with the AAR workflow as well - https://github.com/flutter/flutter/issues/48089.
|
||||
* All `dev/devicelab/bin/tasks/gradle_*` tests should run with and without the projects being opened (and built?) by Android Studio - https://github.com/flutter/flutter/issues/48088.
|
||||
|
||||
|
||||
### Process
|
||||
|
||||
{link to github issues for things that would have helped us resolve this failure faster, such as documented processes and protocols, etc}
|
||||
* A better process for flagging erupting fires quickly:
|
||||
* Alerts for issues that quickly gain thumb ups
|
||||
* Increased issue monitoring following a Flutter release
|
||||
|
||||
### Fixes
|
||||
|
||||
{link to github issues or PRs/commits for the actual fixes that were necessary to resolve this incident}
|
||||
|
||||
https://github.com/flutter/flutter/pull/47015
|
||||
@@ -0,0 +1,266 @@
|
||||
# Flutter postmortem: Windows Defender alert
|
||||
|
||||
Status: final<br>
|
||||
Owner: drewroengoogle
|
||||
|
||||
## Summary
|
||||
|
||||
Description: A change to Windows Defender caused transient CI failures and, more importantly, flagged Flutter as malware for some users.<br>
|
||||
Component: Release<br>
|
||||
Date/time: 2023-03-26<br>
|
||||
Duration: two days<br>
|
||||
User impact: An unknown number of users and potential new users were unable to use Flutter. Some tests failed.
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
### 2023-03-26
|
||||
|
||||
??:?? - Microsoft deploys an update to Windows Defender **<START OF OUTAGE>**<br>
|
||||
13:02 - We receive a message to security@flutter.dev reporting "Flutter Windows Installation WacAtac Trojan" from user S01.<br>
|
||||
20:57 - A test [fails in CI](https://ci.chromium.org/ui/p/flutter/builders/prod/Windows_android%20hot_mode_dev_cycle_win__benchmark/9172/overview) with the message "the file contains a virus or potentially unwanted software".<br>
|
||||
22:10 - @zanderso files [#123519](https://github.com/flutter/flutter/issues/123519) and marks it P0.<br>
|
||||
12:51 - @andrewkolos files [#123525](https://github.com/flutter/flutter/issues/123525) after seeing multiple other CI failures.<br>
|
||||
12:52 - @andrewkolos marks #123525 as a duplicate of #123519.<br>
|
||||
|
||||
### 2023-03-27
|
||||
|
||||
08:05 - @drewroengoogle begins investigating.<br>
|
||||
08:40 - @drewroengoogle was unable to reproduce the problem and lowers the priority of the issue after the previously failing tests passed on rerun.<br>
|
||||
09:02 - User Woo⛈ on Discord reports getting a Windows Defender warning for windows-x64.zip.<br>
|
||||
10:03 - @MP00 reports on #123519 that Windows Defender quarantined windows-x64.zip on their machine at 10:42 in some unspecified time zone.<br>
|
||||
10:27 - @godofredoc forwards the security e-mail from S01 to @sealesj and @drewroengoogle.<br>
|
||||
10:59 - @Hixie replies to S01 by e-mail asking for more details.<br>
|
||||
11:12 - S01 provides the specific URL that caused issues.<br>
|
||||
11:45 - @Hixie asks S01 for even more details.<br>
|
||||
11:47 - @Hixie flags this as a P0 to @godofredoc, @sealesj, and @drewroengoogle.<br>
|
||||
11:53 - @godofredoc asks @drewroengoogle if #123519 is related.<br>
|
||||
11:53 - @drewroengoogle marks #123519 as P0.<br>
|
||||
12:03 - S01 provides the sha256 for flutter_windows_3.7.8-stable.zip.<br>
|
||||
12:10 - @Hixie provides the reporter with the issue number.<br>
|
||||
12:21 - @drewroengoogle verifies that the hash of flutter_windows_3.7.8-stable.zip in storage matches the hash reported by S01, confirming that the file was not corrupted or compromised during download by the reporter.<br>
|
||||
12:34 - @Hixie attempts to upload the files to virustotal.com for independent verification of the file state. windows-x64.zip is marked as uncompromised and flutter_windows_3.7.8-stable.zip is too big to be uploaded.<br>
|
||||
12:40 - @Hixie asks anyone on Discord who has a Windows machine whether they can reproduce the problem.<br>
|
||||
12:52 - @gspencergoog reports getting the same message for gen_snapshot.exe.<br>
|
||||
13:00 - @timsneath provides information on how to report this to Microsoft.<br>
|
||||
13:04 - @Hixie creates an #incident-response channel on Discord to coordinate the response.<br>
|
||||
13:48 - @gspencergoog successfully uploads windows-x64.zip to Microsoft for analysis. The instant report was that no malware was detected but the report was still pending.<br>
|
||||
14:18 - @gspencergoog confirms that virustotal.com does not detect any malware in the affected files.<br>
|
||||
??:?? - Microsoft deploys an update to Windows Defender **<END OF OUTAGE>**<br>
|
||||
14:59 - @gspencergoog reports being unable to reproduce the problem for files that previously were affected.<br>
|
||||
15:18 - @godofredoc attempts to rebuild the affected files.<br>
|
||||
|
||||
### 2023-03-28
|
||||
|
||||
05:38 - User @FusoraTech reports having a similar problem.<br>
|
||||
08:47 - @godofredoc confirms using Google Cloud Storage audit logs that the affected artifact never changed while in storage.<br>
|
||||
10:28 - @gpencergoog reports that Microsoft confirmed the submission did not contain malware.<br>
|
||||
10:39 - @Hixie closes the issue as a transient Windows Defender issue.<br>
|
||||
|
||||
## Impact
|
||||
|
||||
Several users reported being unable to use Flutter.
|
||||
|
||||
Some tests in continuous integration failed.
|
||||
|
||||
## Root causes
|
||||
|
||||
As best we can determine, the cause was a transient issue with Windows Defender that caused certain Flutter binaries to be flagged as having the Trojan:Script/Wacatac.B!ml trojan when downloaded.
|
||||
|
||||
## History
|
||||
|
||||
This is not the first time Flutter binaries have been labeled as "Trojan:Script/Wacatac.B!ml" by Windows Defender.
|
||||
|
||||
In March 2021, @esDotDev reported a similar problem in [#78463](https://github.com/flutter/flutter/issues/78463), though at the time we were unable to reproduce it and the issue was closed due to insufficient information.
|
||||
|
||||
In January 2023, @anggoran reported a similar problem in [#118430](https://github.com/flutter/flutter/issues/118430). We were again unable to reproduce the problem and closed the issue.
|
||||
|
||||
In general there is a history of false positives with virus tools, we generally mark them as duplicates of [#95167](https://github.com/flutter/flutter/issues/95167) which is a non-actionable placeholder issue for us, or [#61997](https://github.com/flutter/flutter/issues/61997), which is an umbrella issue tracking any work we would do to react more gracefully when antivirus tools flag Flutter components or generated code as malware.
|
||||
|
||||
## Lessons learned
|
||||
|
||||
This section refers to the actual root cause, i.e., a false positive in Windows Defender. It may be worth considering our processes for handling a similar situation in the event that it was real.
|
||||
|
||||
### What worked
|
||||
|
||||
We did not in fact get compromised.
|
||||
|
||||
Our release bucket has audit logs configured, which allowed us to check that the artifact was not modified after the initial upload.
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
The damage caused by the false positive seems to have been minimal. We are only aware of three user reports, the CI failures happened mainly over a weekend, and the tests were not reliably failing so rerunning the bots allowed PRs to land. There was no press cycle, and a quick Google search found no mention of this in social media channels.
|
||||
|
||||
### What didn't work
|
||||
|
||||
Windows Defender, obviously.
|
||||
|
||||
Our builds are not reproducible: rerunning the same build stage does not create identical bits. This makes it hard for us to confirm that builds are not compromised by rerunning the build in a new VM.
|
||||
|
||||
Had this been a real compromise, our response rate would not have been especially prompt.
|
||||
|
||||
We do not have a way to communicate effectively to our users about incidents like this.
|
||||
|
||||
We don’t know the appropriate identification information/channel to expedite malware analysis at Microsoft (or other antivirus providers), even though that channel almost certainly exists and is available to us.
|
||||
|
||||
Devs did not have quick access to Windows machines to be able to attempt to reproduce the behavior, adding extra time to the triage process.
|
||||
|
||||
Although we have audit logs enabled, there was no documentation on how to search them, also adding to the total triage time.
|
||||
|
||||
We don't publish the hashes of the artifacts we allow developers to download. One user who was affected by this failure asked if there was a list anywhere so that they could verify their download locally.
|
||||
|
||||
## Action items
|
||||
|
||||
### Prevention
|
||||
|
||||
It is unclear what we can do to avoid such problems in the future.
|
||||
|
||||
### Detection
|
||||
|
||||
We could intentionally run Windows Defender updates and scans against recent artifacts continually to detect when an event occurs.
|
||||
|
||||
### Mitigation
|
||||
|
||||
It's unclear there is much we can do to prevent third-party tools from accidentally reporting Flutter as malware.
|
||||
|
||||
### Process
|
||||
|
||||
As part of this incident we created a new Discord channel, #incident-response. We should document this.
|
||||
|
||||
### Fixes
|
||||
|
||||
No fixes were necessary.
|
||||
|
||||
### Documentation
|
||||
|
||||
Add documentation on how Flutter infra can triage these issues quicker through audit logs.
|
||||
|
||||
## Appendix
|
||||
|
||||
### #incident-response logs
|
||||
|
||||
```discord
|
||||
[1:04 PM]Hixie: @Drewroen @Greg Spencer (gspencergoog) @timsneath let's coordinate here so we're not all speaking in different venues
|
||||
[1:04 PM]Hixie: current issue is https://github.com/flutter/flutter/issues/123519
|
||||
[1:05 PM]Hixie: greg and/or drew are you able to upload the affected file to the site tim gave?
|
||||
[1:21 PM]Greg Spencer (gspencergoog): I would, but I'm not sure how to sign in. Am I an "enterprise customer", or a "software developer"? Apparently you have to sign in to a Microsoft account before submitting it, and I'm not sure what account is the correct one to use (Is it OK to associate my @google.com account with my GitHub account for MS login?, Should I use a personal GitHub account?, etc.)
|
||||
[1:37 PM]Greg Spencer (gspencergoog): Okay, I figured out how to log in.
|
||||
[1:43 PM]Greg Spencer (gspencergoog): I've submitted it, but it's unclear when we'll get a response. I submitted it at "normal" priority because I didn't have the necessary ID numbers to submit it with Google enterprise credentials to get a higher priority.
|
||||
[1:44 PM]Hixie: sounds good, can you update the issue as well?
|
||||
[1:44 PM]Hixie: and thanks for your help here
|
||||
[1:44 PM]Greg Spencer (gspencergoog): Yes.
|
||||
[1:44 PM]Greg Spencer (gspencergoog): No problem.
|
||||
[1:45 PM]Drewroen: (Catching up now, had a meeting) Thank you for submitting, @Greg Spencer (gspencergoog)!
|
||||
[1:48 PM]Hixie: @Greg Spencer (gspencergoog) do you get anything useful if you upload the file to https://www.virustotal.com/gui/home/upload ?
|
||||
[2:18 PM]Greg Spencer (gspencergoog): No, it doesn't detect any threats.
|
||||
[2:19 PM]Greg Spencer (gspencergoog): I'm trying to figure out how to download previous versions of the gen_snapshot tool and see if they too trigger the quarantine.
|
||||
[2:20 PM]Greg Spencer (gspencergoog): Anyone know how to find out the hash on the flutter_infra_release gcs instance for a previous release?
|
||||
[2:23 PM]Greg Spencer (gspencergoog): Is it just the full github hash for the release? (You'd think I'd know this: I think I wrote it originally! I just can't remember)
|
||||
[2:33 PM]Greg Spencer (gspencergoog): What is the "windows-x64.zip" file from? Is that from a Dart distro?
|
||||
[2:33 PM]Drewroen: Maybe there's a simpler way, but I found the release commit for flutter/flutter for 3.7.7, then got the engine version from https://github.com/flutter/flutter/blob/2ad6cd72c040113b47ee9055e722606a490ef0da/bin/internal/engine.version and used that hash in the storage.googleapis url
|
||||
|
||||
Long story short, this should be the engine artifact for the 3.7.7 windows stable: https://storage.googleapis.com/flutter_infra_release/flutter/1837b5be5f0f1376a1ccf383950e83a80177fb4e/android-x64-release/windows-x64.zip
|
||||
[2:33 PM]Greg Spencer (gspencergoog): The Flutter version seems to be windows-x64-flutter.zip, and doesn't appear to have the problem (at least in the latest master build)
|
||||
[2:34 PM]Greg Spencer (gspencergoog): Ahh, so it's in an Engine build.
|
||||
[2:36 PM]Greg Spencer (gspencergoog): OK, so that 3.7.7 binary doesn't seem to trigger the quarantine.
|
||||
[2:40 PM]Hixie: do we have any way to check if the machine on which we did the builds is compromised?
|
||||
[2:40 PM]Hixie: cc @Godofredo Contreras (godofredoc)
|
||||
[2:45 PM]Greg Spencer (gspencergoog): Actually, I just tried unpacking the original windows-x64.zip file that triggered the quarantine before, and it no longer flags the file. As far as I know, it's the same file I unpacked before, and the same zip file I uploaded to MS for analysis.
|
||||
[2:45 PM]Greg Spencer (gspencergoog): Perhaps they've updated their cloud definitions and corrected an incorrect definition?
|
||||
[2:46 PM]Greg Spencer (gspencergoog): I haven't updated my local definitions, so it would have to be something online.
|
||||
[3:05 PM]Godofredo Contreras (godofredoc): @Hixie those are ephemeral VMs recycled every 24 hours. There is no way to access it.
|
||||
[3:06 PM]Godofredo Contreras (godofredoc): Let me get the builder that file was generated on, if the machine was compromised I'd expect all the other artifacts from the same build to also be infected
|
||||
[3:08 PM]Godofredo Contreras (godofredoc): @Greg Spencer (gspencergoog) that's correct only prod service accounts and release engineers have access to update artifacts. I would not expect the file to be updated but we can check our trail logs just in case
|
||||
[3:09 PM]Greg Spencer (gspencergoog): I completely agree. Also, the same file I originally downloaded earlier today no longer triggers it, and it is identical to the one I just downloaded now (same sha256sum).
|
||||
[3:10 PM]Greg Spencer (gspencergoog): So I think we can rule out someone replacing the file with an innocuous one.
|
||||
[3:11 PM]Greg Spencer (gspencergoog): The submission to MS is still "pending".
|
||||
[3:13 PM]Greg Spencer (gspencergoog): My money is on MS Defender just falsely flagging the file, and them updating their definitions.
|
||||
[3:15 PM]Hixie: that does seem most likely, but i would hate for us to assume that is the case and then later find it isn't :-)
|
||||
[3:15 PM]Greg Spencer (gspencergoog): Oh, definitely!
|
||||
[3:15 PM]Greg Spencer (gspencergoog): I haven't closed the issue yet. :-)
|
||||
[3:16 PM]Hixie: @Godofredo Contreras (godofredoc) if we rerun the build, do we get the same bits? it'd be a good test of our reproducible builds logic if we have it yet :-)
|
||||
[3:18 PM]Godofredo Contreras (godofredoc): not sure, but let me give it a try
|
||||
[4:40 PM]Hixie: @Godofredo Contreras (godofredoc) any luck?
|
||||
[4:56 PM]Godofredo Contreras (godofredoc): The build has not finished yet, I'm using https://ci.chromium.org/p/flutter/builders/prod/Windows%20Host%20Engine/21257
|
||||
[4:58 PM]Godofredo Contreras (godofredoc): I'll validate using this artifact https://storage.cloud.google.com/flutter_infra_release/flutter/8cb080365fb189a1e5d1e33a991518f2422e319b/dart-sdk-windows-x64.zip
|
||||
[4:59 PM]Greg Spencer (gspencergoog): Can anyone else with a Windows machine reproduce the quarantine that used to happen if you download and unpack https://storage.googleapis.com/flutter_infra_release/flutter/685fbc6f4d9db8026c56ee1a177bb10cc09f884b/android-x64-release/windows-x64.zip ?
|
||||
[5:00 PM]Greg Spencer (gspencergoog): It's not happening for me anymore.
|
||||
[5:00 PM]Godofredo Contreras (godofredoc): let me check on my windows pc
|
||||
[5:00 PM]Godofredo Contreras (godofredoc): @Greg Spencer (gspencergoog) which win OS are you using?
|
||||
[5:00 PM]Greg Spencer (gspencergoog): Windows 11
|
||||
[5:01 PM]Godofredo Contreras (godofredoc): ok, my computer is windows 10
|
||||
[5:01 PM]Greg Spencer (gspencergoog): But I think the build servers are running Windows 10, right? And they saw the same issue.
|
||||
[5:02 PM]Godofredo Contreras (godofredoc): yes, they are using win 10
|
||||
[5:07 PM]Godofredo Contreras (godofredoc): were you getting the error when downloading? or when extracting?
|
||||
[5:08 PM]Greg Spencer (gspencergoog): After extracting the zip file.
|
||||
[5:08 PM]Greg Spencer (gspencergoog): It quarantined the gen_snapshot.exe file.
|
||||
[5:10 PM]Godofredo Contreras (godofredoc): new behavior with downloads?
|
||||
[5:11 PM]Godofredo Contreras (godofredoc): after downloading and extracting I get a blue window with message "Microsoft defender smartscreen prevented an unrecognized app from starting"
|
||||
[5:12 PM]Godofredo Contreras (godofredoc): more info -> App: gen_snapshot.exe publisher: unknown publisher
|
||||
[5:12 PM]Godofredo Contreras (godofredoc): with the option run anyway and don't run
|
||||
[5:13 PM]Godofredo Contreras (godofredoc): I wonder if they started forcing | will start enforcing app signing
|
||||
[5:15 PM]Godofredo Contreras (godofredoc): do you know how the flutter tool downloads binaries in win?
|
||||
[5:16 PM]Godofredo Contreras (godofredoc): @Hixie https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/godofredoc_google.com/9d161b36a3996876610f0a49660b9e0fd37f7e43881c33f17aa9fa0f5ec277f8/+/build.proto, I'll validate hashes once the build is complete
|
||||
[5:31 PM]Greg Spencer (gspencergoog): It also might vary according to the system configuration. Mine is a stock Windows 11 install, not a corp machine.
|
||||
[5:34 PM]Godofredo Contreras (godofredoc): mine is a win 10 with stock windows
|
||||
[5:40 PM]Godofredo Contreras (godofredoc): Confirmed our builds are not replicable, sha for the test file in GCS 873d80acf1855733ce11a5b569859b6bc803ee38035cfb3491c0e3748544a48e and the one generated from a rebuild using the same build configs 57573123fff2713032b31cd8d99e30e79c0452516a54388c7aa237b8da1890b4
|
||||
[5:41 PM]Hixie: that could mean the first one was bad or, more likely, that we just haven't managed to get replicable builds yet, right?
|
||||
[5:45 PM]Godofredo Contreras (godofredoc): I used a build from a couple of hours ago for the validation, the two builds are correct
|
||||
[5:46 PM]Godofredo Contreras (godofredoc): is just that we may use some compilation/linker flags that impacts replicability or maybe we are using timestamps somewhere in the build system
|
||||
[5:46 PM]Godofredo Contreras (godofredoc): I haven't validate it yet the logs for the artifact, but let me do that
|
||||
[5:49 PM]Hixie: does the new version also trigger windows defender?
|
||||
[5:51 PM]Godofredo Contreras (godofredoc): In my windows machine it consistently blocks the execution on any binaries downloaded from the internet, until I explicitly allow them to run
|
||||
[6:09 PM]Godofredo Contreras (godofredoc): AI: document how to audit GCS logs
|
||||
[6:21 PM]Godofredo Contreras (godofredoc): There is a single log: event=storage.objects.create
|
||||
[6:21 PM]Godofredo Contreras (godofredoc): timestamp: "2023-03-24T22:19:48.210794479Z"
|
||||
[6:22 PM]Godofredo Contreras (godofredoc): auth: "flutter-prod-builder@chops-service-accounts.iam.gserviceaccount.com"
|
||||
[6:31 PM]Godofredo Contreras (godofredoc): ok, rewinding everything to use the right data
|
||||
[6:32 PM]Godofredo Contreras (godofredoc): Stable - 3.7.7 was https://github.com/flutter/flutter/commit/2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||
[6:32 PM]Godofredo Contreras (godofredoc): which is using engine 1837b5be5f0f1376a1ccf383950e83a80177fb4e
|
||||
[6:33 PM]Godofredo Contreras (godofredoc): The artifact to validate is https://storage.googleapis.com/flutter_infra_release/flutter/1837b5be5f0f1376a1ccf383950e83a80177fb4e/android-x64-release/windows-x64.zip
|
||||
[6:40 PM]Godofredo Contreras (godofredoc): Single log, create object event, timestamp: "2023-03-08T06:05:16.234063683Z" by flutter-prod-builder@chops-service-accounts.iam.gserviceaccount.com"
|
||||
[6:42 PM]Godofredo Contreras (godofredoc): which correlates with the information in the builder https://ci.chromium.org/p/flutter/builders/prod/Windows%20Host%20Engine/20852
|
||||
[6:44 PM]Godofredo Contreras (godofredoc): the end time of the build is 2023-03-08T06:16:58Z
|
||||
[6:45 PM]Godofredo Contreras (godofredoc): Defender is not finding any issues with the file on my Win 10 machine
|
||||
[8:45 PM]Hixie: so at this point we're not able to reproduce the problem, basically?
|
||||
[10:34 AM]Greg Spencer (gspencergoog): When I download the new artifact, it has the same sha256sum as the one I downloaded from the original build with this issue. Unpacking the zip file still doesn't trigger any quarantine.
|
||||
[10:34 AM]Greg Spencer (gspencergoog): As I reported in the bug, MS also found no issue with the contents of the zip file.
|
||||
[10:34 AM]Greg Spencer (gspencergoog):
|
||||
Image
|
||||
[10:35 AM]Greg Spencer (gspencergoog): (both the automated "No malware detected" and the analyst "Not malware" determination)
|
||||
[10:40 AM]Greg Spencer (gspencergoog): Unless someone can come up with a reproduction case, I think all we can do now is probably close the incident.
|
||||
[10:45 AM]Hixie: agreed. thanks greg and everyone else who worked on this.
|
||||
[10:45 AM]Hixie: i've closed the issue.
|
||||
[10:46 AM]Greg Spencer (gspencergoog): No problem!
|
||||
[10:47 AM]Godofredo Contreras (godofredoc): One thing that I'd like to get feedback is how can we do better in this situation? some thoughts:
|
||||
[10:48 AM]Godofredo Contreras (godofredoc): a) Get non corp win machines for the security team.
|
||||
[10:48 AM]Godofredo Contreras (godofredoc): b) Document the process to audit an artifact, including how to get the right SHAs for a given release version
|
||||
[10:49 AM]Godofredo Contreras (godofredoc): c) [medium/long term] start working on replicable builds
|
||||
[10:49 AM]Hixie: do we want to write a mini postmortem about it?
|
||||
[10:49 AM]Greg Spencer (gspencergoog): I think that seems like a good idea.
|
||||
[10:50 AM]Godofredo Contreras (godofredoc): Yes, that will be helpful. In a real threat scenario we won't have the luxury of figuring out things with the research step spanning during multiple hours
|
||||
[10:51 AM]Greg Spencer (gspencergoog): Agreed.
|
||||
[10:52 AM]Godofredo Contreras (godofredoc): Also forgot d) Sign windows binaries
|
||||
[10:52 AM]Greg Spencer (gspencergoog): In this particular case, signing the binaries would have let us narrow where we were looking.
|
||||
[10:53 AM]Greg Spencer (gspencergoog): And in the end, you seem to have produced an artifact with the same sha256.
|
||||
[10:54 AM]Godofredo Contreras (godofredoc): no, I used a different commit and uploaded to an experimental location, the hashes were different
|
||||
[10:55 AM]Greg Spencer (gspencergoog): Oh? Well the one you posted above with "The artifact to validate:" had the same sha256 as the original artifact that triggered the quarantine.
|
||||
[10:55 AM]Greg Spencer (gspencergoog): This one: https://storage.googleapis.com/flutter_infra_release/flutter/1837b5be5f0f1376a1ccf383950e83a80177fb4e/android-x64-release/windows-x64.zip
|
||||
[10:56 AM]Greg Spencer (gspencergoog): The commit hashes might have been different, but the artifact wasn't.
|
||||
[10:56 AM]Godofredo Contreras (godofredoc): aaaah ok, yeah I downloaded that file and validated locally extracting and running defender on my win machine
|
||||
[10:56 AM]Greg Spencer (gspencergoog): Okay, so did I test the right thing?
|
||||
[10:57 AM]Godofredo Contreras (godofredoc): let me double check, I validated both 3.7.7 and 3.7.8
|
||||
[10:57 AM]Greg Spencer (gspencergoog): Because this was the original artifact we found the problem in: https://storage.googleapis.com/flutter_infra_release/flutter/685fbc6f4d9db8026c56ee1a177bb10cc09f884b/android-x64-release/windows-x64.zip
|
||||
[10:59 AM]Godofredo Contreras (godofredoc): 3.7.8 hash is 9aa7816315095c86410527932918c718cb35e7d6
|
||||
[10:59 AM]Greg Spencer (gspencergoog): That's a sha1 from the windows-64.zip, right?
|
||||
[10:59 AM]Godofredo Contreras (godofredoc): 3.7.7 has is 1837b5be5f0f1376a1ccf383950e83a80177fb4e
|
||||
[11:00 AM]Godofredo Contreras (godofredoc): that's the commit hash for the engine artifacts
|
||||
[11:00 AM]Greg Spencer (gspencergoog): Ahh, OK.
|
||||
[11:02 AM]Greg Spencer (gspencergoog): Git makes a new hash for each commit even if the content doesn't change, so those would have to be different. I thought you had posted the link to a newly built version of the same artifact. If that's not what that was, then what was it?
|
||||
[11:35 AM]Hixie: https://docs.google.com/document/d/1g5LyqB4uezd-5xNYMwlTBbWTntHhyjLCBYI_ZInX-R0/edit?usp=sharing postmortem doc (currently just the template) - this is a markdown file for putting on the wiki
|
||||
[11:35 AM]Hixie: (right now everyone has edit access so don't share that link outside the team)
|
||||
[11:39 AM]Godofredo Contreras (godofredoc): @Greg Spencer (gspencergoog) this is the build I used for validating if the builds are replicable https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/godofredoc_google.com/9d161b36a3996876610f0a49660b9e0fd37f7e43881c33f17aa9fa0f5ec277f8/+/build.proto
|
||||
[11:41 AM]Godofredo Contreras (godofredoc): I compared some of the artifacts in that build(experimental) with the ones in the release bucket
|
||||
[11:42 AM]Godofredo Contreras (godofredoc): e.g. https://storage.cloud.google.com/flutter_infra_release/flutter/experimental/8cb080365fb189a1e5d1e33a991518f2422e319b/windows-x64-debug/windows-x64-flutter.zip vs https://storage.cloud.google.com/flutter_infra_release/flutter/8cb080365fb189a1e5d1e33a991518f2422e319b/windows-x64-debug/windows-x64-flutter.zip
|
||||
[11:54 AM]Greg Spencer (gspencergoog): Yes, those aren't even the same size (by several hundred K), so they definitely are different artifacts.
|
||||
[11:59 AM]Greg Spencer (gspencergoog): So I see why you want to work on making reproducible builds.
|
||||
```
|
||||
@@ -0,0 +1,86 @@
|
||||
Status: final<br>
|
||||
Owners: @Hixie
|
||||
|
||||
## Summary
|
||||
|
||||
Description: flutter.dev was offline for 80% of users for a period of several hours.<br>
|
||||
Component: www.flutter.dev web site<br>
|
||||
Date/time: 2023-08-26 21:14 PDT<br>
|
||||
Duration: 15 hours 40 minutes<br>
|
||||
User impact: Potential new users, anyone trying to visit flutter.dev
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
At some point in 2023, a change in Google Groups caused the flutter.dev security@, conduct@, and press@ aliases to stop working. This issue was temporarily worked around by changing public documentation to give Hixie's personal e-mail address. The task of determining a more permanent solution was considered low priority.
|
||||
|
||||
### 2023-08-25
|
||||
|
||||
15:27 - Hixie and tvolkert submit a change to the DNS configuration to change the MX records in order to enable Google Workspace Google groups on the flutter.dev domain, enabling security@, conduct@, and press@ aliases to be reactivated, unaware that an error in the new configuration would add four A records and four AAAA records for flutter.dev providing incorrect IP addresses. (Internal ID 560528920.)<br>
|
||||
21:14 - DNS configuration changes take effect. 80% of IPs served for flutter.dev fail to serve correctly. **<START OF OUTAGE>**<br>
|
||||
21:20 - Monitoring system sends first e-mail, incorrectly reporting docs.flutter.dev is down.<br>
|
||||
21:27 - Monitoring system sends second e-mail, reporting flutter.dev is down.<br>
|
||||
21:42 - A user tweets concern: https://twitter.com/macoshita/status/1695295520351359040?s=20<br>
|
||||
23:54 - The first dubious security vulnerability ("the javascript on your website is accessible") since the MX record update is received at security@flutter.dev.
|
||||
|
||||
### 2023-08-26
|
||||
|
||||
04:24 - @Abitofevrything on Discord pings @Hixie to inform them of the outage.<br>
|
||||
04:27 - @Hixie sees and acknowledges the message.<br>
|
||||
05:07 - jonasfj and Hixie submit a fix to the DNS configuration.<br>
|
||||
10:07 - Another user tweets concern: https://twitter.com/its_me_mahmud/status/1695483187936555397?s=20 (in the brief resulting thread, another user confirms the outage, while the original poster expresses confusion that the site works on some machines but not others)<br>
|
||||
12:55 - DNS configuration changes take effect. **<END OF OUTAGE>**
|
||||
|
||||
## Data
|
||||
From monitoring data (highlighted line is the moving average of successful pings):
|
||||

|
||||
|
||||
From analytics (the outage is visible at the bottom right):
|
||||

|
||||
|
||||
## Impact
|
||||
|
||||
Four fifths of users were unable to learn about Flutter from flutter.dev during the outage. Traffic numbers recovered immediately when the DNS issue was fixed.
|
||||
|
||||
The outage seems to have slightly reduced traffic to docs.flutter.dev.
|
||||
|
||||
We don't have long-term impact data yet.
|
||||
|
||||
## Root causes
|
||||
|
||||
The DNS configuration change introduced an import of a configuration file for Google Workspace domains that itself imported two files: one to add MX records, and one to add IP addresses for web hosting. However, since flutter.dev is not hosted using Google Workspace, the additional IP addresses for web hosting returned error pages.
|
||||
|
||||
## Lessons learned
|
||||
|
||||
### What worked
|
||||
|
||||
The DNS server did exactly what it was told to do.
|
||||
|
||||
Our team has improved work-life balance significantly in the past year.
|
||||
|
||||
The MX record change worked as intended.
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
Hixie checked his messages just prior to going to sleep, and once aware of the problem, was able to find a solution in a few minutes. Also, Hixie's questionable sleep habits meant he was awake at the time of the message.
|
||||
|
||||
The outage happened during one of our off-peak days.
|
||||
|
||||
### What didn't work
|
||||
|
||||
Monitoring detected the issue but one e-mailed one person, who was not working at the time. The issue went undetected by humans for seven hours and ten minutes.
|
||||
|
||||
It took about 25 minutes for Hixie to find someone to review the PR, because everyone was either sleeping or enjoying their weekend.
|
||||
|
||||
The DNS changes took hours to take effect.
|
||||
|
||||
## Follow-up
|
||||
|
||||
The monitoring system should notify more people. Ideally, it would ping Discord directly. Ideally it would not be limited to Googlers. (filed https://github.com/flutter/flutter/issues/133509)
|
||||
|
||||
The monitoring system for docs.flutter.dev is incorrectly configured to check docs.flutter.io, which redirects to flutter.dev. (fixed by adding a separate monitoring entry for docs.flutter.dev and api.flutter.dev)
|
||||
|
||||
It would be useful to have a channel for getting hold of team members in a hurry. (added an @emergency role on Discord which has notifications enabled)
|
||||
|
||||
The current setup requires a Google employee Flutter team member to approve DNS changes. We should expand this to Dart team members as well since that would increase the number of people in different time zones. (added Dart team members to the OWNERS file)
|
||||
|
||||
We could have a policy of not landing DNS changes on a Friday, since that would reduce the difficulty in getting hold of someone. On the other hand, the outage happening on a weekend greatly diminished the impact. These factors may cancel each other out.
|
||||
19
docs/postmortems/README.md
Normal file
19
docs/postmortems/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
This page lists incidents for which we have written retrospectives and postmortems.
|
||||
|
||||
## Postmortems
|
||||
|
||||
When adding a new incident, start from the [postmortem template](postmortem-template.md).
|
||||
|
||||
* [Postmortem: Build Breakage on 2016-11-08](Postmortem-Build-Breakage-on-2016-11-08.md)
|
||||
* [Postmortem: Beta 1 Release](Postmortem-Beta-1-Release.md)
|
||||
* [Postmortem: AndroidX plugin migration](Postmortem-AndroidX-plugin-migration.md)
|
||||
* [Postmortem: Widespread Gradle failures on Flutter v1.12.13 hotfix.5](Postmortem-Widespread-Gradle-failures-on-Flutter-v1.12.13-hotfix.5.md)
|
||||
* [Postmortem: Flutter/Dart Incorrect Version July 2020](https://docs.google.com/document/d/1TeCpj-T0HAp7DcY2ag-q5iX218TeOHNcW5fUusaum0c/edit)
|
||||
* [Postmortem: Flutter Gold Summer 2020 Outages](https://docs.google.com/document/d/1cZi84iWFJa9l7TIhSZEnhZlg7bBBIoJLjzx-uLUSLzI/edit?usp=sharing)
|
||||
* [Postmortem: Pub.dev outage 2021-03-24](https://docs.google.com/document/d/1hBVi6_1FXoY1hG9zgKFUkqreP7UsnaF4EGspIJh0E2g/edit?hl=en)
|
||||
* [Postmortem: Windows Defender alert on 2023-03-26](Postmortem-Windows-Defender-alert-on-2023-03-26.md)
|
||||
* [Postmortem: flutter.dev outage on August 26 2023](Postmortem-flutter.dev-outage-on-August-26-2023.md)
|
||||
|
||||
## Retrospectives
|
||||
|
||||
* [Retrospective: Flutter 2.8 Stable Release](Retrospective-Flutter-2.8-Stable-Release.md) 16 December 2021
|
||||
89
docs/postmortems/Retrospective-Flutter-2.8-Stable-Release.md
Normal file
89
docs/postmortems/Retrospective-Flutter-2.8-Stable-Release.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# Flutter 2.8 Stable Retrospective
|
||||
Date: 16 December 2021
|
||||
|
||||
Facilitator: Kevin Chisholm
|
||||
## Attendees
|
||||
1. Nuritzi Sanchez
|
||||
1. Alexander Thomas
|
||||
1. Godofredo Contreras
|
||||
1. Vijay Menon
|
||||
1. Devon Carew
|
||||
1. Ian Hickson
|
||||
1. Devon Carew
|
||||
1. Todd Volkert
|
||||
1. Khyati Mehta
|
||||
1. Eric Seidel
|
||||
1. Christopher Fujino
|
||||
1. Andrew Brogdon
|
||||
1. Kevin Chisholm
|
||||
|
||||
|
||||
## Retrospective Guidelines
|
||||
### Blameless
|
||||
Focus on the actions and behaviors, not the people. Our retrospectives should be a safe place to reflect on what we can do to improve as a team.
|
||||
### Inclusive
|
||||
All input is valuable, we should never make someone feel as if their thoughts and contributions are not valued.
|
||||
### Actionable
|
||||
Work toward defining the issues that can be actioned on to be more successful in the future.
|
||||
## Retrospective Items
|
||||
### What went well
|
||||
* We released a quality SDK on the expected date.
|
||||
* No P0 issues to hotfix.
|
||||
* Our infrastructure and test owners responded rapidly to the chat allowing us to address issues.
|
||||
* The social team was proactive in keeping customers informed.
|
||||
* Were able to delay blog post and docs.
|
||||
* Got them out in time after the release was available.
|
||||
### Challenges
|
||||
* We did not properly take into account how long the release would take.
|
||||
* We had no process to separate the build from the release.
|
||||
* Documentation is lacking / not prescriptive enough to accurately describe the entire process.
|
||||
* Release documentation. We have a lot of documentation, but it’s not consolidated into a single source of truth with handoffs and DRIs (directly responsible individuals)
|
||||
* A lot of this release seemed based on undocumented institutional knowledge.
|
||||
* Didn’t find info about dot releases and cherrypicking. Not written down anywhere.
|
||||
* We incorrectly tagged the Dart commit.
|
||||
* We did not have the Dart commit hash posted in the release engineering doc.
|
||||
* Missed deadline by 8 hours.
|
||||
* PM team had to do extra work and expend their social capital.
|
||||
* We need documentation for the binary signing process.
|
||||
* We may not have benefited from publishing the Dart SDK release earlier. We had the Dart stable hash on Friday, but did not properly communicate it to the release engineer. As soon as the Dart hash exists, Flutter and Dart release processes are independent, so if we had published it on Monday or Tuesday it wouldn’t have helped.
|
||||
* Right now we start betas on a certain day and then stable have to be shipped on a certain day. We may need to rethink this and standardize.
|
||||
* Fixes were needed to the stable bots (they were not the same as commit-bots/beta bots).
|
||||
* Java version was wrong.
|
||||
* Properties used to select the correct versions of artifacts were missing.
|
||||
Xcode/Mac/iOS were force updated in between the beta to stable time window
|
||||
* Web Engine Framework, Framework sdk tests in the engine failed because they used the master version of framework with old version of engine.
|
||||
* Branch configurations were updated after landing the PR causing multiple purples and several manual retries.
|
||||
|
||||
### How can we improve [30 Minutes]
|
||||
* Build Flutter in advance.
|
||||
* Should have been done the day before and pushed the morning of.
|
||||
* Do most of the build and release process in advance; on the day-of, do the tagging / packaging work (<1 hr, and a predictable process).
|
||||
* How early we can release may be determined by what bugs we need to hotfix.
|
||||
* Docs need to be updated after the branch push
|
||||
* What is the delta between the master and stable branch?
|
||||
* ~6 days
|
||||
* Create a solid release playbook on the wiki to be followed.
|
||||
* Should be clear enough that two interns (meaning, two inexperienced people new to the team who have the appropriate permissions) should be able to make a release without supervision while everyone else is on vacation. (It has to be two because you need two people to authorize a release).
|
||||
* [Release Process](../releases/Release-process.md) should be (or point to) that process doc; other pages on the wiki should be up to date also.
|
||||
* Align beta and stable release processes.
|
||||
* Practice release dry runs.
|
||||
* Have people who have never followed the steps before practice the steps, to find where the documentation is missing important details.
|
||||
* Run retrospectives after every beta and stable release.
|
||||
* Improve testing infrastructure.
|
||||
* Better define owners.
|
||||
* Improve communication.
|
||||
* Cherry pick owners were not notified of the release times.
|
||||
* Were not able to resolve issues.
|
||||
### Action Items
|
||||
|
||||
| Status | Action Item | Owner |
|
||||
|--------|-------------|-------|
|
||||
| In Progress | Create a single source of truth release playbook unifying the Flutter and Dart release processes | Kevin |
|
||||
| In Progress | Rethink timing of releases | Kevin |
|
||||
| In Progress | Identify release calendars and make sure they are easily accessible to everyone who needs to see them | Kevin |
|
||||
| In Progress | Conduct retrospectives after every release | Kevin |
|
||||
| In Progress | Create a release rotation for beta releases | Godofredo |
|
||||
| In Progress | Create meeting for Dart / Flutter EngProd teams and TPM team on release weeks | Kevin |
|
||||
| In Progress | Clean up and consolidate release documentation | TPM |
|
||||
| In Progress | Successfully produce at least 2 betas before our Feb stable to verify that we will be without issues for the Feb stable | Devon / Kevin |
|
||||
| In Progress | Consider the milestone flow on github | Ian / Kevin |
|
||||
73
docs/postmortems/postmortem-template.md
Normal file
73
docs/postmortems/postmortem-template.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Flutter postmortem: {Incident Title}
|
||||
|
||||
Status: {draft|final}<br>
|
||||
Owners: {who drove the incident resolution}
|
||||
|
||||
## Summary
|
||||
|
||||
Description: {brief description of symptoms and root cause}<br>
|
||||
Component: {affected area}<br>
|
||||
Date/time: {YYYY-MM-DD HH:MM}<br>
|
||||
Duration: {time from initial breakage to final resolution}<br>
|
||||
User impact: {who was affected by the incident}
|
||||
|
||||
## Timeline (all times in PST/PDT)
|
||||
|
||||
### 1900-01-01
|
||||
|
||||
14:44 - something happened<br>
|
||||
14:45 - next thing happened **<START OF OUTAGE>**
|
||||
|
||||
### 1900-01-02
|
||||
|
||||
09:12 - another thing happened **<END OF OUTAGE>**
|
||||
|
||||
## Impact
|
||||
|
||||
{summarize the problems that the outage caused}
|
||||
|
||||
## Root causes
|
||||
|
||||
{without blame, describe the root cause of the outage}
|
||||
|
||||
## Lessons learned
|
||||
|
||||
### What worked
|
||||
|
||||
{list things where things worked as expected in a positive manner}
|
||||
|
||||
### Where we got lucky
|
||||
|
||||
{list things that mitigated this incident but not because of our foresight}
|
||||
|
||||
### What didn't work
|
||||
|
||||
{list things that failed, with github issues from the action items section}
|
||||
|
||||
## Action items
|
||||
|
||||
{each item here should have an owner}
|
||||
|
||||
### Prevention
|
||||
|
||||
{link to github issues for things that would have prevented this failure from happening in the first place, such as input validation, pinning dependencies, etc}
|
||||
|
||||
### Detection
|
||||
|
||||
{link to github issues for things that would have detected this failure before it became An Incident, such as better testing, monitoring, etc}
|
||||
|
||||
### Mitigation
|
||||
|
||||
{link to github issues for things that would have made this failure less serious, such as graceful degradation, better exception handling, etc}
|
||||
|
||||
### Process
|
||||
|
||||
{link to github issues for things that would have helped us resolve this failure faster, such as documented processes and protocols, etc}
|
||||
|
||||
### Fixes
|
||||
|
||||
{link to github issues or PRs/commits for the actual fixes that were necessary to resolve this incident}
|
||||
|
||||
## Appendix
|
||||
|
||||
{any other useful information, such as relevant chat logs}
|
||||
Reference in New Issue
Block a user