这是indexloc提供的服务,不要输入任何密码
Skip to content

Suppress analytics flag pass through to analysis server #123235

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 14 commits into from
Mar 24, 2023

Conversation

jcollins-g
Copy link
Contributor

This allows flutter analyze to pass through the new --suppress-analytics flag in analysis server when --suppress-analytics is on the flutter command line.

Issue: dart-lang/sdk#49445

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 22, 2023
@jcollins-g jcollins-g marked this pull request as ready for review March 22, 2023 17:35
@jcollins-g jcollins-g requested a review from andrewkolos March 22, 2023 17:40
@@ -179,6 +182,44 @@ void main() {
await server.dispose();
});

testUsingContext('Can run AnalysisService without suppressing analytics', () async {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is largely a cut and paste from a different test. I'm not happy about how complicated it is, but my attempts to simplify it resulted in puzzling errors and hangs. Suggestions welcome.

@jcollins-g jcollins-g requested a review from eliasyishak March 22, 2023 18:23
Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

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

LGTM; but, if this change can wait, I'd consider getting a review from @eliasyishak or @christopherfujino since they are likely more familiar with the context of this change

@christopherfujino
Copy link
Contributor

@jcollins-g is this part of the unified analytics project? That is, relying on https://pub.dev/packages/unified_analytics. I thought that the idea was that the analyzer would have direct access to whether or not the user has opted in to analytics?

@jcollins-g
Copy link
Contributor Author

@jcollins-g is this part of the unified analytics project? That is, relying on https://pub.dev/packages/unified_analytics. I thought that the idea was that the analyzer would have direct access to whether or not the user has opted in to analytics?

Yes, and you are correct in the common case. This change is for the edge case when a flutter user is opted in to analytics generally, but has passed in --suppress-analytics on the command line for a one-time disabling of analytics and expects that to apply to analyze as well as other Flutter tools.

@christopherfujino
Copy link
Contributor

@jcollins-g is this part of the unified analytics project? That is, relying on https://pub.dev/packages/unified_analytics. I thought that the idea was that the analyzer would have direct access to whether or not the user has opted in to analytics?

Yes, and you are correct in the common case. This change is for the edge case when a flutter user is opted in to analytics generally, but has passed in --suppress-analytics on the command line for a one-time disabling of analytics and expects that to apply to analyze as well as other Flutter tools.

Ahh, ok, TIL the flutter tool implements that flag :) SGTM

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@christopherfujino
Copy link
Contributor

@jcollins-g any time you're ready to merge this, you can add the "autosubmit" label to this PR, and a bot will merge it once the tree is green.

@jcollins-g jcollins-g added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 22, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 23, 2023

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

@jcollins-g jcollins-g added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 23, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 23, 2023

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

@jcollins-g jcollins-g added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 23, 2023
@auto-submit auto-submit bot merged commit 81e9060 into flutter:master Mar 24, 2023
@jcollins-g jcollins-g deleted the suppress-analytics-flag branch March 24, 2023 20:00
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants