-
Notifications
You must be signed in to change notification settings - Fork 212
feat(connections): warn then connecting to an end-of-life server COMPASS-9083 #6888
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
base: main
Are you sure you want to change the base?
Conversation
😬 I just realized (and remembered) that @alenakhineika had already made a draft PR adding this #6805 🙈 I'll pick some of her ideas into this branch (as this has tests) and add a call to the update server. |
export function isEndOfLifeVersion(version: string) { | ||
try { | ||
const [major, minor] = version.split('.').map((part) => parseInt(part, 10)); | ||
return (major === 4 && minor <= 4) || major < 4; |
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 we're already taking this from the buildInfo
output, is there any reason not to use versionArray
directly?
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.
Mostly that I wasn't aware that this was included in the build info.
Never the less, I expect these lines to go away and instead I'll be using "semver" like Alena did in her PR:
compass/packages/compass-connections/src/stores/connections-store-redux.ts
Lines 1459 to 1470 in f5fffe5
export function isEndOfLifeServer( | |
serverVersion: string | undefined | null | |
): boolean { | |
if (!serverVersion) { | |
return true; | |
} | |
try { | |
return semver.satisfies(serverVersion, `<=${getEoLServerVersion()}`); | |
} catch (e) { | |
return true; | |
} | |
} |
const { HADRON_AUTO_UPDATE_ENDPOINT, HADRON_AUTO_UPDATE_ENDPOINT_OVERRIDE } = | ||
process.env; |
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.
I wonder if there's a better place to put these. Some package intended to share constants across the main and renderer processes.
Description
Merging this PR will:
isEndOfLife
property on theBuildInfo
returned byt thedata-service
, derived from the version.Screen.Recording.2025-05-02.at.10.11.41.mov
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes