Skip to content
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

Enum + event constructor for pub result events #194

Closed

Conversation

eliasyishak
Copy link
Contributor

Related to the tracker issue:

Implementing the class below from flutter/flutter in this package

class PubResultEvent extends UsageEvent {
  PubResultEvent({
    required String context,
    required String result,
    required Usage usage,
  }) : super('pub-result', context, label: result, flutterUsage: usage);
}

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link

github-actions bot commented Nov 6, 2023

Package publishing

Package Version Status Publish tag (post-merge)
package:unified_analytics 5.3.0 ready to publish unified_analytics-v5.3.0
package:graphs 2.3.2-wip WIP (no publish necessary)
package:cli_config 0.1.2 already published at pub.dev
package:extension_discovery 2.0.1-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Comment on lines +261 to +263
///
/// Note: This will only return surveys that are within the start and end
/// periods of a given survey.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated dartdoc update that i wanted to include for my own reference

@eliasyishak eliasyishak marked this pull request as ready for review November 6, 2023 17:45
@@ -56,6 +56,11 @@ enum DashEvent {
description: 'Information for a flutter build invocation',
toolOwner: DashTool.flutterTool,
),
flutterPubResult(
label: 'flutter_pub_result',
Copy link
Member

Choose a reason for hiding this comment

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

not a blocker for this PR, but just wondering, do you know if long-term we would need this flutter tool event once pub has its own analytics via unified_analytics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm that's a good question, and i would think it may still be useful to know which pub subcommands users are running within the flutter context? so yes we can track usage of dart pub get when we migrate pub, but is it also helpful to track flutter pub get?... if the answer is no, then this event likely won't be useful

From what I can see, context is just the lists from here

And result is always either "success" or "failure"

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a question for the pub team--I don't know that anyone else uses these numbers.

Note, today we're intentionally suppressing pub's own analytics (https://github.com/christopherfujino/flutter/blob/disable-flutter-build-aar-plugins/packages/flutter_tools/lib/src/dart/pub.dart#L562), so flutter pub ONLY sends Flutter analytics, but I seem to recall that not being our intended final state.

cc @jonasfj @sigurdm

Copy link
Contributor

@sigurdm sigurdm Nov 7, 2023

Choose a reason for hiding this comment

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

We suppressed the analytics because we were unclear if the pdd covered sending dart analytics from the flutter tool.

I think with the unified analytics all should be good, and we can stop suppressing those, and potentially get actual useful data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh that's good to know, given that we now have the approvals, @christopherfujino are you in favor of deprecating this event? I think there may still be value in tracking successes/failures across different pub invocations from the flutter tool over time... while the pub team can collect more in depth analytics as well on their end.

Copy link
Member

Choose a reason for hiding this comment

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

I am in favor of deleting it, but I will leave the final decision to the pub team, IDK if they use it or potentially would.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, I'll just close this PR for now and check offline. Will reopen if it's still necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to loop back after conversation with @sigurdm and @jonasfj

This event can remain deprecated since we are already collecting success/failure events from the Event.flutterCommandResult call site in flutter_command.dart

Copy link
Member

@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

@eliasyishak
Copy link
Contributor Author

Closing as this event may not be necessary from the flutter tool itself since pub will soon be sending its own analytics from package:unified_analytics

@eliasyishak eliasyishak deleted the add-events-for-pub-result branch November 7, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants