Skip to content

Commit

Permalink
Send appVersion as string, not semver object, in payload to UR
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Pickering <adam.pickering@suse.com>
  • Loading branch information
adamkpickering committed May 9, 2023
1 parent e41e9db commit 66af8d0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/rancher-desktop/main/update/LonghornProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ export interface LonghornUpdateInfo extends UpdateInfo {
unsupportedUpdateAvailable: boolean;
}

type UpgradeResponderRequestPayload = {
appVersion: string;
extraInfo: {
platform: string;
platformVersion: string;
},
};

/**
* LonghornUpgraderResponse describes the response from the Longhorn Upgrade
* Responder service.
Expand Down Expand Up @@ -242,8 +250,8 @@ async function getPlatformVersion(): Promise<string> {
* things, from the Upgrade Responder server.
*/
export async function queryUpgradeResponder(url: string, currentVersion: semver.SemVer): Promise<UpgradeResponderQueryResult> {
const requestPayload = {
appVersion: currentVersion,
const requestPayload: UpgradeResponderRequestPayload = {
appVersion: currentVersion.toString(),
extraInfo: {
platform: `${ process.platform }-${ os.arch() }`,
platformVersion: await getPlatformVersion(),
Expand Down

0 comments on commit 66af8d0

Please sign in to comment.