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

Skip to content

Update outdated runners in the benchmarks folder #91126

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 2 commits into from
Oct 19, 2021

Conversation

gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Oct 1, 2021

Description

This PR updates the platform runners in the benchmarks subdir.

I've attempted to replace the entire group with new code as if the project were recreated with flutter create so that they don't become a Frankenstein of minor changes to make it work again, but just plain old generated code that can be replaced and updated in place.

Tests

  • No tests because we're just updating boilerplate here.

@flutter-dashboard flutter-dashboard bot added f: integration_test The flutter/packages/integration_test plugin c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Oct 1, 2021
@google-cla google-cla bot added the cla: yes label Oct 1, 2021
@gspencergoog gspencergoog force-pushed the update_embeddings_2 branch 2 times, most recently from ab61685 to 4b60e29 Compare October 5, 2021 18:46
@gspencergoog gspencergoog changed the title Update outdated embeddings in the benchmarks folder Update outdated runners in the benchmarks folder Oct 5, 2021
@gspencergoog gspencergoog marked this pull request as ready for review October 5, 2021 21:41
@gspencergoog gspencergoog requested a review from blasten October 5, 2021 21:41
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

@Hixie
Copy link
Contributor

Hixie commented Oct 5, 2021

test-exempt: refactor with no semantic change (applying new boilerplate)

repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:4.1.0'
Copy link

Choose a reason for hiding this comment

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

I think this was intentionally migrated to Gradle 7.0.0. This change may conflict with #90642

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, OK, I'll revert this. Is someone migrating the template too?

Copy link

Choose a reason for hiding this comment

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

yep. #90642 migrates templates too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I think I'll wait for #90642 to land, and then update this and the other PR. It's likely to conflict in other ways too, and I don't want make Taha have to merge even more files.

@@ -2,25 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is auto generated.
// To update all the build.gradle files in the Flutter repo,
// See dev/tools/bin/generate_gradle_lockfiles.dart.
Copy link

Choose a reason for hiding this comment

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

nit: this file is auto-generated

@@ -2,14 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is auto generated.
// To update all the settings.gradle files in the Flutter repo,
// See dev/tools/bin/generate_gradle_lockfiles.dart.
Copy link

Choose a reason for hiding this comment

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

ditto

@blasten
Copy link

blasten commented Oct 5, 2021

Thinking this through, I wonder if we should have a more general purpose script that keeps the boilerplate in sync.
This script was an attempt to auto-generate build.gradle files that have locked dependencies.

Potentially, the new script could run flutter create . in each directory, and then patch certain files on top (if necessary).

@gspencergoog
Copy link
Contributor Author

Thinking this through, I wonder if we should have a more general purpose script that keeps the boilerplate in sync.

I think that's an excellent idea.

@gspencergoog
Copy link
Contributor Author

In doing this, I found there were a few directories that needed to be exempt (there's a test for the outdated embeddings, and there's an android test where it has a custom runner, for instance), but in general I think that should be possible.

My basic methodology was to remove all of the boilerplate directories entirely, and then regenerate using flutter create . with the appropriate platforms and arguments, and then git add the new boilerplate directories.

@blasten
Copy link

blasten commented Oct 6, 2021

got it. We don't have a well defined pattern for testing older project files, or even showing good error messages in the tool when the current project files are out-dated.

@gspencergoog
Copy link
Contributor Author

Once we have a migration script, we could have a CI test that runs the script and sees if there is any difference, though. That would at least catch the runners that are out of date in the repo when we update the templates.

@gspencergoog
Copy link
Contributor Author

Even if we just ran generate_gradle_lockfiles.dart as part of a CI script, we could catch old embeddings earlier.

@gspencergoog gspencergoog force-pushed the update_embeddings_2 branch 2 times, most recently from d076fff to 54c8af9 Compare October 8, 2021 01:09
@gspencergoog
Copy link
Contributor Author

@blasten OK, I think I've merged this with #90642 now, and I re-ran the dev/tools/bin/generate_gradle_lockfile.dart script after the merge to take care of any inconsistencies in the lockfiles, but I noticed that it was advocating version 4.1.3, whereas the files on master had been updated to 7.0.1. I think I did the right thing by updating it in the script to 7.0.1 and re-running, but I really have no idea. If you could check that I didn't just revert someone else's work, that would be great.

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

@gspencergoog gspencergoog merged commit 31e3364 into flutter:master Oct 19, 2021
@gspencergoog gspencergoog deleted the update_embeddings_2 branch October 19, 2021 15:27
zanderso added a commit that referenced this pull request Oct 19, 2021
zanderso added a commit that referenced this pull request Oct 19, 2021
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
This change updates the platform runners in the benchmarks subdir.

I've attempted to replace the entire group with new code as if the project were recreated with flutter create so that they don't become a Frankenstein of minor changes to make it work again, but just plain old generated code that can be replaced and updated in place.
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
gspencergoog added a commit to gspencergoog/flutter that referenced this pull request Nov 8, 2021
zanderso added a commit that referenced this pull request Nov 9, 2021
zanderso added a commit that referenced this pull request Nov 9, 2021
WizzXu pushed a commit to WizzXu/flutter that referenced this pull request Nov 19, 2021
WizzXu pushed a commit to WizzXu/flutter that referenced this pull request Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. f: integration_test The flutter/packages/integration_test plugin tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants