Skip to content

Conversation

@chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Jun 25, 2021

Auto create issues if there is not already one or has closed one longer than 15 days.
create PR if the test is not already marked flaky and no existing pr to mark flaky

@google-cla google-cla bot added the cla: yes label Jun 25, 2021
@chunhtai chunhtai requested a review from keyonghan June 25, 2021 19:16
Copy link
Contributor

@keyonghan keyonghan left a comment

Choose a reason for hiding this comment

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

Nit: could we add tests for the newly added logics?

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry forgot to mention earlier, could we move corresponding logics to different services, like /lib/src/service/github_service.dart, or the bigquery.dart? The structure should be more clear and easier to follow that way. And it would be easier to add corresponding tests in separate locations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good

@keyonghan
Copy link
Contributor

Nit: could we add tests for the newly added logics?

Sorry missed the test.dart file. Tests look good to me. Thanks!

@chunhtai
Copy link
Contributor Author

Hi @keyonghan I factored out different services
This is a example report chunhtai/flutter#80
and pr chunhtai/flutter#82
Can you take another look? thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

The bringup property may have been added in other lines, rather than the line next to builder.

Copy link
Contributor Author

@chunhtai chunhtai Jun 29, 2021

Choose a reason for hiding this comment

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

Yes, this is a while loop and it only stop when it see the next builder: line

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC ApiRequestHandler already catches error, we may not need the try catch block here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: doc for the table schema will help understand the logic.

Copy link
Contributor

Choose a reason for hiding this comment

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

A friendly ping here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which table schema are you referring to? flutter-dashboard.datasite.luci_prod_build_status is the table the sql query from, or do you mean the schema of the sql result? Either way, These schemas are abstracted away because I return a dart class instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I meant the table luci_prod_build_status result. From the code here, it is not clear what f[0]-f[6] are referring to. Since the table is located in bigquery (internally?), it may be useful to list the basic schema here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to distinguish the two cases: exceeding slo and the top one below slo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the issueSummary getter does that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took a look at the original listPullRequests code, and looks like it does the same thing of what github.pullRequests.list is doing underneath. So I swap it out

Copy link
Contributor

Choose a reason for hiding this comment

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

Just recalled that for shard tests that contain thousands of unit tests, we may want to skip the step to create a PR. Test owner or the tree gardener will need to look into the flaky test and determine which sub test causes the flake, and then they need to create a PR to disable the sub test instead of marking the whole shard test suite as flaky.

From the auto process side, it will be challenging to find out the sub test and disable it based on current test framework.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is there a way to determine which tests are shard tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

most ones here: https://github.com/flutter/flutter/blob/master/TESTOWNERS#L198

build_tests @zanderso @flutter/tool
framework_tests @HansMuller @flutter/framework
tool_integration_tests @zanderso @flutter/tool
tool_tests @zanderso @flutter/tool
web_integration_tests @ferhatb @flutter/web
web_long_running_tests @ferhatb @flutter/web
web_tests @ferhatb @flutter/web
web_tool_tests @zanderso @flutter/tool

Each of them contains several subshards, which are mapped to the builder name in .ci.yaml. So we will check those subshards flakiness and only file flaky issues rather than create a PR to mark them flaky. (each subshard contains tons of unit tests).

@chunhtai chunhtai force-pushed the auto-flake-part1 branch 2 times, most recently from e004843 to 1c46192 Compare July 8, 2021 20:04
Copy link
Contributor

Choose a reason for hiding this comment

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

A friendly ping here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess a pr should also be filed for framework host only tests. The only exception is the shard tests, which contains multiple sub unit tests.

@chunhtai chunhtai requested a review from keyonghan July 8, 2021 23:49
Copy link
Contributor

@keyonghan keyonghan left a comment

Choose a reason for hiding this comment

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

LGTM!

@chunhtai chunhtai added the waiting for tree to go green Merge PR when tree becomes green via fluttergithubbot label Jul 13, 2021
@fluttergithubbot fluttergithubbot merged commit df29597 into flutter:master Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for tree to go green Merge PR when tree becomes green via fluttergithubbot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants