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

Refactor automatic update flow to use custom Sparkle user driver #3274

Open
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

quanganhdo
Copy link
Member

@quanganhdo quanganhdo commented Sep 13, 2024

Task/Issue URL: https://app.asana.com/0/1201037661562251/1208183525704010/f
Tech Design URL:
CC:

Description:

Refactors automatic update flow to use a custom Sparkle user driver.

Steps to test this PR:

  1. Refer to https://app.asana.com/0/1201037661562251/1208230039908704/f

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@quanganhdo
Copy link
Member Author

quanganhdo commented Sep 13, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @quanganhdo and the rest of your teammates on Graphite Graphite

Copy link

github-actions bot commented Sep 13, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.
Messages
📖

You seem to be updating localized strings. Make sure that you request translations and include translated strings before you ship your change. See Localization Guidelines for more information.

Generated by 🚫 dangerJS against ccfe27b

@quanganhdo quanganhdo changed the title Revert "Resolving automatic update edge cases (#3142)" Refactor automatic update flow to use custom Sparkle user driver Sep 13, 2024
@quanganhdo quanganhdo marked this pull request as ready for review September 13, 2024 19:10
This was referenced Sep 13, 2024
@quanganhdo quanganhdo force-pushed the anh/refactor/sparkle-user-driver branch from 608e991 to ce71bd1 Compare September 16, 2024 14:55
Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

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

The code looks really good. 💯 I'm going to test the solution now

func checkForUpdate() {
func checkForUpdateIfNeeded() {
guard let updater, !updater.sessionInProgress else { return }

Logger.updates.debug("Checking for updates")
Copy link
Contributor

Choose a reason for hiding this comment

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

There was a mistake when refactoring pixels and all update pixels are just debug pixels. Do you think it would be beneficial to make them available in release builds for potential debugging?

Copy link
Member Author

Choose a reason for hiding this comment

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

It may be beneficial to have pixels at different states to see if our users make it to the end of the update cycle. Have we defined those, or do they have to be created?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are couple of pixels and the error pixel in case something goes wrong. Monitoring various states as you suggested may be a good idea too 👍

Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

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

@quanganhdo, after installation of the build number 261, it says the app is up to date which is not expected. Am I missing something? I'm currently at the coffee shop with a low connection or maybe the phased rollout is the reason?
Screenshot 2024-09-18 at 09 53 10

Another minor thing is the empty box in the release notes which I suppose is caused by empty release notes in the appcast. Just flagging it in case not.

@quanganhdo
Copy link
Member Author

quanganhdo commented Sep 18, 2024

The test appcast pointed to internal-channel so internal user state was needed https://github.com/quanganhdo/playground/blob/main/appcast2.xml

I've removed that channel from the file. Update should show up now (along with the release note).

Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

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

LGMT! 👍 Works as expected including edge cases

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.

2 participants