zui icon indicating copy to clipboard operation
zui copied to clipboard

Make sure new release notifications work on Linux post-v0.29.0

Open philrz opened this issue 2 years ago • 2 comments

I was doing some install tests before proposing updates to the Brim Installation article. I had v0.28.0 installed and and running on both Ubuntu and CentOS Linux VMs, but even after a long wait, I never was shown any kind of pop-up about the availability of the newer v0.29.0 release. This used to work in the past.

I'm no JavaScript pro, but peeking at: https://github.com/brimdata/brim/blob/709e5fe137437855053d8938621ab35bc7847993/src/js/electron/autoUpdater.ts#L23 ...if that name is a reference to the one in package.json, and case sensitivity is a factor in the logic for checking for newer releases, this change between releases might explain it:

$ git checkout v0.28.0
grep Previous HEAD position was a3581b83 Pin zed at 1.0
HEAD is now at f217c651 Query timeout extension (#1969)

$ grep '"name"' package.json 
  "name": "Brim",

$ git checkout v0.29.0
Previous HEAD position was f217c651 Query timeout extension (#1969)
HEAD is now at a3581b83 Pin zed at 1.0

$ grep '"name"' package.json 
  "name": "brim",

I bounced this off @jameskerr and he agreed it seems like a plausible explanation. In any case, on the assumption the name will not be changing again going forward, I'll propose to keep the text in the article that tells the user to expect the notifications to appear going forward. But this issue can serve as a reminder to confirm that it does indeed work when the next release comes out. If it doesn't, it'd be good to dig deeper into why & change the article in the meantime to set expectations that the user would be responsible for doing their own manual checks.

philrz avatar Apr 20 '22 21:04 philrz

When I saw a new GA v0.30.0 release came out today, I thought of this open issue and went in to verify it. I started with an Ubuntu 21.10 VM where I already had v0.29.0 installed and launched it expecting to now see a pop-up notification about the availability of v0.30.0. No pop-up appeared, and when I checked the main.log it looks like there's an error that may explain it:

[2022-05-17 14:31:48.246] [error] Error: Invalid latest version format: Version 0.30.0
    at getLatestVersion (/opt/Brim/resources/app.asar/dist/js/electron/autoUpdater.js:35:76)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async autoUpdateLinux (/opt/Brim/resources/app.asar/dist/js/electron/autoUpdater.js:40:27)
[2022-05-17 14:31:48.247] [error] TypeError: Invalid Version: Version 0.30.0
    at new SemVer (/opt/Brim/resources/app.asar/node_modules/semver/classes/semver.js:41:13)
    at compare (/opt/Brim/resources/app.asar/node_modules/semver/functions/compare.js:3:32)
    at Object.gte (/opt/Brim/resources/app.asar/node_modules/semver/functions/gte.js:2:30)
    at autoUpdateLinux (/opt/Brim/resources/app.asar/dist/js/electron/autoUpdater.js:42:26)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

@jameskerr or @mason-fish: You might want to take a look.

philrz avatar May 17 '22 21:05 philrz

Thank you for reporting and following up on this @philrz !

jameskerr avatar May 17 '22 21:05 jameskerr

I'm pleased to report that I was able to figure this one out and fix it without changing any code. Here's what's up.

It turned out the root cause of the problem was how the past few releases were titled in GItHub, e.g. "Version 0.31.0", which matches up with how it's referenced in the error message of the last comment above. By comparison, our older releases had the more official Semver format, e.g. "v0.28.0":

image

Seeing the reference to Semver in the errors, I took a shot at modifying the titles of the past few releases, and sure enough, on Linux when running GA Brim tagged v0.30.0, I do now get the pop-up notification.

image

That's good news because it means we didn't actually ship any broken releases. Users who have been running the past few releases that have been unaware that there's newer ones available should start getting notified when they next relaunch. This is especially important given the whole Brim/Zui rename that's revealed in GA Brim tagged v0.31.0.

Closing as fixed.

philrz avatar Aug 17 '22 23:08 philrz