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

Tool version reporting #902

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Tool version reporting #902

merged 1 commit into from
Jan 8, 2024

Conversation

ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Dec 20, 2023

Checklist

Version

Requires a MAJOR/MINOR/PATCH version update

Context

Telemetry for how tool version managers are used, what are the active versions during the build, etc.

Changes

  • Define an interface for tool version reporting
  • Implement this reporting logic for ASDF, the version manager that we use on the stacks. We could extend or replace this impl if needed

Investigation details

Decisions

@ofalvai
Copy link
Contributor Author

ofalvai commented Dec 20, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@ofalvai ofalvai force-pushed the BE-1221-tool-version-telemetry branch from 0d761fb to 0c03dd7 Compare December 20, 2023 10:46
@ofalvai ofalvai mentioned this pull request Dec 20, 2023
2 tasks
@ofalvai ofalvai force-pushed the BE-1221-tool-version-telemetry branch from 0c03dd7 to abb8e46 Compare December 20, 2023 15:35
}

func (r *ASDFVersionReporter) CurrentToolVersions() (map[string]ToolVersion, error) {
cmd := r.cmdFactory.Create("asdf", []string{"current"}, &command.Opts{})
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens to default tools (e.g. Flutter) that aren't set by asdf but available in our stack? Do we capture them ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet, but we are constantly trying to move more and more tools under ASDF (or any other version manager in the future).
But @godrei had a good analysis of Flutter versions recently that you might find interesting: https://bitrise.atlassian.net/wiki/spaces/ENGI/pages/2734293197/RFC+Flutter+SDK+version+on+stacks

@ofalvai
Copy link
Contributor Author

ofalvai commented Jan 8, 2024

Merge activity

  • Jan 8, 6:14 AM: @ofalvai started a stack merge that includes this pull request via Graphite.
  • Jan 8, 6:15 AM: Graphite rebased this pull request as part of a merge.
  • Jan 8, 6:23 AM: @ofalvai merged this pull request with Graphite.

@ofalvai ofalvai force-pushed the BE-1221-tool-version-telemetry branch from abb8e46 to 9800c02 Compare January 8, 2024 11:14
@ofalvai ofalvai merged commit 17c0537 into master Jan 8, 2024
6 checks passed
@ofalvai ofalvai deleted the BE-1221-tool-version-telemetry branch January 8, 2024 11:23
ofalvai added a commit that referenced this pull request Jan 8, 2024
<!--
  Thanks for contributing to the Bitrise CLI!
  Please fill this template with the details of your change.
-->

### Checklist
<!--
  Put an `x` in the boxes that apply. You can also fill these out after
  creating the PR. This is simply a reminder of what we are going to look
  for before merging your code.
-->
- [ ] I've read and followed the [Contribution Guidelines](https:/bitrise-io/bitrise/blob/master/.github/CONTRIBUTING.md)
- [ ] `README.md` is updated with the changes (if needed)

### Version
<!-- Leave this untouched if you don't know, we'll help -->
Requires a *MAJOR/MINOR/PATCH* [version update](https://semver.org/)

### Context

Follow up to #902 

### Changes

- Send the collected tool version report as a standard telemetry event.
- Add a few more useful properties to the event

### Investigation details

<!-- Please share any alternative solutions that were considered along with investigation details. -->

### Decisions

As the tool version map contains arbitrary key-value pairs and we'll add more tools under ASDF, I decided to just serialize everything as JSON. We can process the JSON at query-time easily.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants