-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP] Migrate command usage values (#139383) #141019
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
[CP] Migrate command usage values (#139383) #141019
Conversation
Related to the tracker issue: - flutter#128251 This PR migrates the `Usage.command` static method that sent custom dimensions for each command (if applicable). The screenshot below shows the different places where the `usageValues` getter is overwritten to return the necessary custom dimensions for that command. <img width="285" alt="image" src="https://github.com/flutter/flutter/assets/42216813/e32d5100-0e17-4a4d-8f21-327a8c113a19">
Per discord discussion, building an AAR out of a plugin project has not worked for years, so let's just disable the functionality. Context: flutter#137564
| if (!manifest.isModule && !manifest.isPlugin) { | ||
| throwToolExit('AARs can only be built for plugin or module projects.'); | ||
| if (!manifest.isModule) { | ||
| throwToolExit('AARs can only be built for module projects.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this was brought in from your commit actually. There was a change you made that my CP was depending on. I thought originally that I would need to only merge previously committed PRs for a CP.
It's probably best to revert the changes from your commit and just make the necessary changes for this PR to work right?
| 'This cannot currently be configured.'; | ||
|
|
||
| @override | ||
| Future<void> validateCommand() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question, is this required for usage values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well turns out this was necessary for this test 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's delete the test rather than change the behavior of the tool in CP.
…alytics (flutter#134756) Part of: - flutter#128251 Currently, when we want to use the analytics instance from `package:unified_analytics`, we are just grabbing it from globals. However, with the legacy analytics instance, there are some things we check to return a no-op version of the instance.. for example, if we are running on bots or a non standard branch, we use a no-op instance This PR uses the same previous checks for the new analytics instance
|
@christopherfujino looks like this is ready for your review now |
| ); | ||
| }); | ||
|
|
||
| testUsingContext('will not build an AAR for a plugin', () async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the tested behavior did not already exist on the 3.16 branch, let's just delete this test, per https://github.com/flutter/flutter/pull/141019/files#r1445425246
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM once you remove the BuildAarCommand.validateCommand() override and the failing test.
Fixes: