Skip to content

Clean up test infrastructure#41880

Merged
Hixie merged 1 commit intoflutter:masterfrom
Hixie:cirrus.yaml
Oct 18, 2019
Merged

Clean up test infrastructure#41880
Hixie merged 1 commit intoflutter:masterfrom
Hixie:cirrus.yaml

Conversation

@Hixie
Copy link
Copy Markdown
Contributor

@Hixie Hixie commented Oct 3, 2019

  • Clean up cirrus.yaml
  • Clean up test.dart
  • Remove per-test timeout configuration in flutter_tools
  • Other random cleanup

@fluttergithubbot fluttergithubbot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Oct 3, 2019
@Hixie Hixie force-pushed the cirrus.yaml branch 3 times, most recently from dfb1273 to 5d022d7 Compare October 4, 2019 00:21
@Hixie
Copy link
Copy Markdown
Contributor Author

Hixie commented Oct 4, 2019

Most of the failures seem to be because I messed up the RAM requirements. I'm going to minimize the RAM requirements on all the shards and then increase them until each shard works.

@Hixie Hixie force-pushed the cirrus.yaml branch 3 times, most recently from 20dc493 to cc0689a Compare October 5, 2019 01:05
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 5, 2019

Codecov Report

Merging #41880 into master will decrease coverage by 0.99%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #41880    +/-   ##
========================================
- Coverage   60.89%   59.89%    -1%     
========================================
  Files         194      194            
  Lines       18919    18919            
========================================
- Hits        11520    11331   -189     
- Misses       7399     7588   +189
Flag Coverage Δ
#flutter_tool 59.89% <ø> (-1%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/ios/devices.dart 13.88% <0%> (-61.51%) ⬇️
packages/flutter_tools/lib/src/ios/mac.dart 26.33% <0%> (-27.9%) ⬇️
packages/flutter_tools/lib/src/services.dart 0% <0%> (-24.4%) ⬇️
packages/flutter_tools/lib/src/base/build.dart 59.66% <0%> (-15.97%) ⬇️
packages/flutter_tools/lib/src/convert.dart 58.33% <0%> (-8.34%) ⬇️
packages/flutter_tools/lib/src/version.dart 93.23% <0%> (-1.94%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 67.24% <0%> (-1.73%) ⬇️
packages/flutter_tools/lib/src/mdns_discovery.dart 82.53% <0%> (-1.59%) ⬇️
packages/flutter_tools/lib/src/cache.dart 48.47% <0%> (-0.71%) ⬇️
packages/flutter_tools/lib/src/ios/xcodeproj.dart 89.14% <0%> (-0.58%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 315471b...3583a98. Read the comment docs.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I this empty container block messes the execution. Will add a check to the parser in the meantime.

@Hixie
Copy link
Copy Markdown
Contributor Author

Hixie commented Oct 7, 2019

Aah! I was wondering if that would break things. It seemed like it should work, based on the YAML spec and the lack of error message about parse errors. :-)

I'll fix it.

@Hixie Hixie force-pushed the cirrus.yaml branch 11 times, most recently from 5af979c to 9f34245 Compare October 11, 2019 01:58
@Hixie Hixie force-pushed the cirrus.yaml branch 3 times, most recently from 50b3a2f to 4fa532b Compare October 11, 2019 05:15
@Hixie Hixie marked this pull request as ready for review October 11, 2019 18:18
@Hixie Hixie force-pushed the cirrus.yaml branch 3 times, most recently from 0a907b2 to 0467e0b Compare October 16, 2019 01:31
Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should _runFlutterTest() always just do a pass with --track-widget-creation and a pass with --no-track-widget-creation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that could get pretty expensive. What bugs are you hoping to catch?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was just reacting to the fact that we seem to be calling it with both of those flags in many places already.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

some places, yeah. intentionally not all though.

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we ever add a new directory that matches packages/flutter/test/**/widgets, its tests will silently never be run...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

unless i misunderstand, i don't believe that's an issue; recursive is false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, I missed the recursive:false - nevermind.

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you make sure that this cleanup will yield Cirrus tests that pass on dev, beta, and stable? Right now, we have tests that are guaranteed to fail on those channels (e.g. because Flutter for web is disabled on non-master).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how to test that short of actually doing a release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could temporarily (with no intention of submitting) edit the tools logic for what channel you're on to synthesize fake runs of dev|beta|stable. I leave it up to you on whether that churn of git push, wait, repeat is worth it.

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why shuffle it at all if we're going to hard code the seed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure what Ian's motivation was, but I like this change because randomizing should break up clusters of big tests making sharding more effective.

Copy link
Copy Markdown
Contributor

@yjbanov yjbanov Oct 16, 2019

Choose a reason for hiding this comment

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

Might be worth a comment explaining why this is done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah you want to shuffle so that the average cost-per-file is uniform.
i'll add a comment.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also if changes include 'packages/flutter_web_plugins/***'

@fkorotkov fkorotkov mentioned this pull request Oct 16, 2019
8 tasks
@Hixie Hixie force-pushed the cirrus.yaml branch 4 times, most recently from 91ac939 to 7536502 Compare October 16, 2019 23:33
Copy link
Copy Markdown
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where is $CIRRUS_USER_COLLABORATOR set?

If it's set by Cirrus, is there a documentation page we can link to at the top of this YAML file?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here is a link to all variable set by Cirrus: https://cirrus-ci.org/guide/writing-tasks/#environment-variables

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment why you chose CPU:3

(and below)

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like we can probably remove key now (it looks like we never set $SHARD or $SUBSHARD anymore).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll add a comment. It's useful when doing local testing so you can run a whole shard (or a specific shard+subshard) without having to figure out the corresponding task name.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We were doing some gymnastics before to restore the values of these env variables after the tests were done. Is that not necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not as far as I can tell. Nothing runs after.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these not use backslashes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess not? These are unchanged from before.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like we run this for every MacOS task. Should we just put it in the setup_script that pertains to all tasks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It has to run in the same shell as the script that uses a lot of files.

Comment thread .cirrus.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks SOOO much better. Note, however, that I didn't check to make sure that this PR doesn't accidentally drop any shards that we were running before.

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can say recursive: true and not need the existsSync() check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting. Done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It happens to the best of us. I even wrote a test that shows what the behavior is 😄

Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wish enums could have properties & methods like they can in Java.

@Hixie Hixie force-pushed the cirrus.yaml branch 2 times, most recently from 9a2d736 to c69e00e Compare October 17, 2019 23:49
Comment thread dev/bots/test.dart Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

cc @tvolkert @blasten this block is new, it's the result of merging with @blasten's recent changes

Basically I took the same approach as with the web tests (though sadly it's different enough that I couldn't reuse code).

@Hixie Hixie merged commit 1781d5c into flutter:master Oct 18, 2019
jonahwilliams pushed a commit that referenced this pull request Oct 18, 2019
jonahwilliams pushed a commit that referenced this pull request Oct 18, 2019
Hixie added a commit to Hixie/flutter that referenced this pull request Oct 18, 2019
Hixie added a commit that referenced this pull request Oct 18, 2019
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 3, 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. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants