-
Notifications
You must be signed in to change notification settings - Fork 27
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
Check if remote server components actually needs an update #280
Conversation
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
Hello @sebjulliand. Just wondering if there was any update on this PR. We are hoping to update the DB2 extension in Merlin and would like this change as well since we were encountering similar issues. |
@SanjulaGanepola Nope, no news but I forgot to add reviewers back then. @worksofliam , @julesyan , have a look whenever you feel like it. Thanks! |
@sebjulliand sorry I missed this. I will review it today. |
Lovely, thanks! |
@sebjulliand I just tested this out. To be safe, I also deleted my When I checked back out to main, then it continued to install correctly. |
How did it fail for you? But I found an edge case: connecting, getting the install done, disconnecting, deleting the component, reconnecting: it does not reinstall the component. I'll fix that too. |
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
@worksofliam turns out the |
@sebjulliand Yup, that works now! Thanks for a lovely change. |
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.
Working as expected.
Related to this issue: codefori/vscode-ibmi#2267
If
Config.getServerComponentName
fails to return the currently installed version of the server component (probably happens when installing the extension on a new VSCode instance since it's taken from the extension global storage?), the update manager will try to overwrite the existing file that is not writable (becausechmod 400
is run on it after it's uploaded).To prevent the updater from failing, this PR adds a new check that will:
If the md5 hashes are different, the remote file is made writable to ensure the upload will not fail.
This should prevent issues like codefori/vscode-ibmi#2267 from happening.