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

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[ci] Removes unnecessary overrides. #6669

Merged
merged 4 commits into from
Nov 4, 2022
Merged

Conversation

pq
Copy link
Contributor

@pq pq commented Nov 3, 2022

Fix some diagnostics that will be reported by a pending update to the linter.

See: https://dart-review.googlesource.com/c/sdk/+/264961

@pq pq requested a review from goderbauer November 3, 2022 20:35
@pq pq changed the title remove unnecessary overrides [cleanup] remove unnecessary overrides Nov 3, 2022
@pq
Copy link
Contributor Author

pq commented Nov 3, 2022

It looks like this requires a "no changelog change required" override... I think that should be safe in this case?

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@pq pq added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 3, 2022
@pq
Copy link
Contributor Author

pq commented Nov 3, 2022

(Confirmed w/ @goderbauer that no changelog updates are needed since this is sample code.)

@pq pq added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2022
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2022
@auto-submit
Copy link

auto-submit bot commented Nov 3, 2022

auto label is removed for flutter/plugins, pr: 6669, due to - The status or check suite Windows plugin_tools_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux plugin_tools_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@pq pq requested a review from stuartmorgan-g November 4, 2022 00:10
@pq
Copy link
Contributor Author

pq commented Nov 4, 2022

@stuartmorgan (or anyone): I'd love an assist landing this one. It's blocking a roll of the linter in the Dart SDK.

@ditman
Copy link
Member

ditman commented Nov 4, 2022

It seems that this is failing because something is changing some API that is being mocked:

+2 -1 : loading test/make_deps_path_based_command_test.dart [E]
Failed to load "test/make_deps_path_based_command_test.dart":
  test/common/package_command_test.mocks.dart:114:33: Error: The method 'MockGitDir.runCommand' has fewer named arguments than those of overridden method 'GitDir.runCommand'.
    _i6.Future<_i4.ProcessResult> runCommand(Iterable<String>? args,
                                  ^
  /root/.pub-cache/hosted/pub.dev/git-2.2.0/lib/src/git_dir.dart:254:25: Context: This is the overridden method ('runCommand').
    Future<ProcessResult> runCommand(
                          ^
  test/common/package_command_test.mocks.dart:114:33: Error: The method 'MockGitDir.runCommand' doesn't have the named parameter 'echoOutput' of overridden method 'GitDir.runCommand'.
    _i6.Future<_i4.ProcessResult> runCommand(Iterable<String>? args,
                                  ^
  /root/.pub-cache/hosted/pub.dev/git-2.2.0/lib/src/git_dir.dart:254:25: Context: This is the overridden method ('runCommand').
    Future<ProcessResult> runCommand(
                          ^
To run this test again:
 /sdks/flutter/bin/cache/dart-sdk/bin/dart test test/make_deps_path_based_command_test.dart -p vm --plain-name 'loading test/make_deps_path_based_command_test.dart'

The solution is probably to update the Mockito mocks in this package:

(Giving this a quick shot)

@ditman
Copy link
Member

ditman commented Nov 4, 2022

After doing a flutter pub upgrade, the issue reproduces locally

$ flutter pub upgrade
Resolving dependencies...
> _fe_analyzer_shared 50.0.0 (was 49.0.0)
> analyzer 5.2.0 (was 5.1.0)
  args 2.3.1
> async 2.10.0 (was 2.9.0)
> boolean_selector 2.1.1 (was 2.1.0)
  build 2.3.1
  build_config 1.1.1
  build_daemon 3.1.0
> build_resolvers 2.1.0 (was 2.0.10)
  build_runner 2.3.2
> build_runner_core 7.2.7 (was 7.2.6)
  built_collection 5.1.1
> built_value 8.4.2 (was 8.4.1)
  checked_yaml 2.0.1
  code_builder 4.3.0
  collection 1.17.0
  colorize 3.0.0
  convert 3.1.1
  coverage 1.6.1
  crypto 3.0.2
  dart_style 2.2.4
  file 6.1.4
  fixnum 1.0.1
  frontend_server_client 3.1.0
> git 2.2.0 (was 2.0.0)
  glob 2.1.0
> graphs 2.2.0 (was 2.1.0)
  http 0.13.5
  http_multi_server 3.2.1
  http_parser 4.0.2
  io 1.0.3
  js 0.6.5
  json_annotation 4.7.0
  logging 1.1.0
> matcher 0.12.13 (was 0.12.12)
  meta 1.8.0
  mime 1.0.2
  mockito 5.3.2
  node_preamble 2.0.1
  package_config 2.1.0
  path 1.8.2
  platform 3.1.0
  pool 1.5.1
  pub_semver 2.1.2
  pubspec_parse 1.2.1
  quiver 3.1.0
  shelf 1.4.0
  shelf_packages_handler 3.0.1
  shelf_static 1.1.1
> shelf_web_socket 1.0.3 (was 1.0.2)
  source_gen 1.2.6
  source_map_stack_trace 2.1.1
  source_maps 0.10.11
  source_span 1.9.1
  stack_trace 1.11.0
  stream_channel 2.1.1
> stream_transform 2.1.0 (was 2.0.1)
> string_scanner 1.2.0 (was 1.1.1)
  term_glyph 1.2.1
> test 1.22.0 (was 1.21.6)
> test_api 0.4.16 (was 0.4.14)
> test_core 0.4.20 (was 0.4.18)
  timing 1.0.0
  typed_data 1.3.1
  uuid 3.0.6
  vm_service 9.4.0
  watcher 1.0.2
  web_socket_channel 2.2.0
  webkit_inspection_protocol 1.2.0
  yaml 3.1.1
  yaml_edit 2.0.3
Changed 16 dependencies!

The API change seems to come from this update: > git 2.2.0 (was 2.0.0).

@ditman ditman removed the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 4, 2022
@ditman
Copy link
Member

ditman commented Nov 4, 2022

Needs the override: no changelog needed because this is tripping in unrelated packages

I've added a NEXT entry to the changed packages CHANGELOG.md files. I think the tool is tripping because we're updating source within the example, and that is deemed to need to be published in pub.dev (however those files outside main.dart are not).

(This should now pass without the changelog exemption, btw)

No CHANGELOG change found.
If this PR needs an exemption from the standard policy of listing all changes in the CHANGELOG, 
comment in the PR to explain why the PR is exempt, and add (or ask your reviewer to add) the
"override: no changelog needed" label. 
Otherwise, please add a NEXT entry in the CHANGELOG as described in the contributing guide.

@ditman ditman added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 4, 2022
@ditman ditman removed the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 4, 2022
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

LGTM!

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2022
@ditman ditman changed the title [cleanup] remove unnecessary overrides [ci] Removes unnecessary overrides. Nov 4, 2022
@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 (don't just cc him here, he won't see it! He's on Discord!).

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.

@pq
Copy link
Contributor Author

pq commented Nov 4, 2022

Thanks a million @ditman!

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2022
@auto-submit
Copy link

auto-submit bot commented Nov 4, 2022

auto label is removed for flutter/plugins, pr: 6669, due to - The status or check suite legacy_version_analyze CHANNEL:3.0.5 DART_VERSION:2.17.6 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@ditman
Copy link
Member

ditman commented Nov 4, 2022

Hmmm, apologies @pq! This is now breaking our "legacy versions" analysis because I rolled the dependencies too close to the present :P

I think that if I update the mocks but don't roll the dependencies, it's likely that the "downgraded analysis" check is going to fail...

/cc @stuartmorgan how can we get out of this pickle? What's the most correct escape hatch for this tools check? Maybe pinning package:git to >= 2.0.0 <2.1.0 until our legacy analysis rolls forward enough? (I'm going to test this but not autosubmit the package until Stuart has time to see it)

@stuartmorgan-g
Copy link
Contributor

I think the tool is tripping because we're updating source within the example, and that is deemed to need to be published in pub.dev (however those files outside main.dart are not).

The tool knows what parts of example are published, which is why it didn't request a version change. The CHANGELOG flag is consistent with our policy:

This policy exists because some changes (e.g., updates to examples) that do not need to be published may still be of interest to clients of a package.

Overriding in this case would have been fine since the details of the change aren't likely to be very interesting, but we err on the side of failing and requiring human judgement.

@stuartmorgan-g
Copy link
Contributor

/cc @stuartmorgan how can we get out of this pickle? What's the most correct escape hatch for this tools check? Maybe pinning package:git to >= 2.0.0 <2.1.0 until our legacy analysis rolls forward enough? (I'm going to test this but not autosubmit the package until Stuart has time to see it)

This seems like a reasonable option. Thanks for the investigation and fix!

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2022
@auto-submit auto-submit bot merged commit 897ec59 into flutter:main Nov 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 4, 2022
@pq pq deleted the lint_fixes branch November 4, 2022 16:11
@pq
Copy link
Contributor Author

pq commented Nov 4, 2022

Thanks for all your help!

auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 4, 2022
* f8122dc89 [ci]Temporarily disable starqlteue on firebase device lab (flutter/plugins#6657)

* 38c93242a [video_player]add integration test for inverted aspect ratio bug (flutter/plugins#6662)

* dd8245e32 Roll Flutter (stable) from 6928314 to e99c9c7 (2 revisions) (flutter/plugins#6667)

* 8cfa2652c Roll Flutter from 0e98194 to e6300da (46 revisions) (flutter/plugins#6668)

* 897ec59cd [ci] Removes unnecessary overrides. (flutter/plugins#6669)

* a279b9dd8 Roll Flutter from e6300da to 55e8cd1 (17 revisions) (flutter/plugins#6670)
@ditman
Copy link
Member

ditman commented Nov 4, 2022

Thanks for keeping the repo tidy and checks passing! @pq 🙏

@ditman ditman self-assigned this Nov 4, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Nov 7, 2022
Downstream fixes:

* flutter/flutter#113794
* flutter/plugins#6669
* flutter/engine#37321
* dart-archive/linter#3775
* dart-archive/linter#3776

* cl/482614222
* cl/482654980
* cl/482744309
* cl/485129394
* cl/485139323
* ...

Upstream:

* #50263

Change-Id: I259cb0c28464b1e513d9a1931b7c680a2a04a0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264961
Commit-Queue: Phil Quitslund <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
IVLIVS-III pushed a commit to IVLIVS-III/flutter_plugins_fork that referenced this pull request Nov 11, 2022
* remove unnecessary overrides

* Update mock so tools_tests checks pass.

* Update CHANGELOG NEXT entries.

* Pin git to 2.0.x

Co-authored-by: David Iglesias Teixeira <[email protected]>
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 21, 2022
* remove unnecessary overrides

* Update mock so tools_tests checks pass.

* Update CHANGELOG NEXT entries.

* Pin git to 2.0.x

Co-authored-by: David Iglesias Teixeira <[email protected]>
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…#114689)

* f8122dc89 [ci]Temporarily disable starqlteue on firebase device lab (flutter/plugins#6657)

* 38c93242a [video_player]add integration test for inverted aspect ratio bug (flutter/plugins#6662)

* dd8245e32 Roll Flutter (stable) from 6928314 to e99c9c7 (2 revisions) (flutter/plugins#6667)

* 8cfa2652c Roll Flutter from 0e98194 to e6300da (46 revisions) (flutter/plugins#6668)

* 897ec59cd [ci] Removes unnecessary overrides. (flutter/plugins#6669)

* a279b9dd8 Roll Flutter from e6300da to 55e8cd1 (17 revisions) (flutter/plugins#6670)
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* remove unnecessary overrides

* Update mock so tools_tests checks pass.

* Update CHANGELOG NEXT entries.

* Pin git to 2.0.x

Co-authored-by: David Iglesias Teixeira <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests p: video_player platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants