Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Start generating coverage. #113587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ targets:
validation: analyze
validation_name: Analyze

- name: Linux coverage
bringup: true
recipe: flutter/coverage
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of a dedicated recipe can we just have a generic recipe that loads its instructions from a script on the repo?

I would like us to stop using recipes, they're a huge pain to maintain, they're not discoverable, they can't be synced with changes in the repo, they can't easily be reverted by the gardener, they don't get managed by the same ACLs as the rest of the project, etc etc etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new recipe for this functionality is actually a good tradeoff, trying to force this use case into the generic flutter recipe complicates the other 99% use cases with a bunch of if-else that are only relevant to coverage. Even worse trying to force this into the generic recipe will require to get back service account authentication that we are actively working to replace with short lived tokens.

Copy link
Contributor

@Hixie Hixie Oct 20, 2022

Choose a reason for hiding this comment

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

I strongly disagree with this (and I wish this handed landed when I had an outstanding comment on the review).

I'm not saying to force this into the "generic flutter recipe", I'm saying we shouldn't even have a "generic flutter recipe", we should just have a single recipe which does nothing but fetch a script from the repo (different script for different shards, e.g. driven from the shard name or something) and run that. I'm saying literally every shard that runs in LUCI on every single one of our repos should all be driven by the same trivial recipe.

The trade-off IMHO is very bad. Like I say above, recipes are hard to maintain, they're not discoverable, they can't be synced with changes in the repo, they can't easily be reverted by the gardener, they don't get managed by the same ACLs as the rest of the project, etc. These are all very serious issues, and we keep making it worse by adding more recipes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about landing, I wasn't sure you were going to reply back and I really wanted to address the coverage issue that has been opened for a few years(#81803). If you strongly disagree with this PR I can revert it and let someone else to take over the bug.

I disagree that adding a recipe is worse than having multiple bash scripts or dart scripts running shell commands. In this case the recipe is running a single command flutter test coverage I could certainly have added that command in bash script, call it from the current recipe and then adding 20 more lines in an if - then - else to download a service account from cloud kms and use it to upload the coverage file to GCS. All of this embracing the extra work of encrypting the key, regenerating the key every 6 weeks and weakening the security of our release artifacts bucket.

In terms maintenance the recipe for the flutter repository got its last major update in 08/2021 with small cleanup updates every few months. I wonder how many people are actually touching recipes apart from infra to implement new features or move more logic to the repositories under test.

For discoverability we always use https://cs.opensource.google/flutter, reverting recipe changes is as easy as reverting from any other repository and I'm not sure what you mean by different ACLs but I'll guess this is a GoB vs GitHub discussion rather than a recipes discussion.

Certainly recipes is not dart but recipes along with LUCI is what has allowed us to get to the current state of scalability and resilience that wouldn't have been possible with any of the of external CI systems.

timeout: 120
properties:
tags: >
["framework", "hostonly", "shard", "linux"]

- name: Linux packages_autoroller
presubmit: false
recipe: pub_autoroller/pub_autoroller
Expand Down
1 change: 1 addition & 0 deletions TESTOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
#
# build_tests @zanderso @flutter/tool
# ci_yaml flutter roller @caseyhillers @flutter/infra
# coverage @godofredoc @flutter/infra
# flutter_plugins @stuartmorgan @flutter/plugin
# framework_tests @HansMuller @flutter/framework
# tool_integration_tests @zanderso @flutter/tool
Expand Down