Re: Require suggestions on feature #5766 - Mailing list pgadmin-hackers

From Anil Sahoo
Subject Re: Require suggestions on feature #5766
Date
Msg-id CAO+oWtAizZMgEAHfQ5A5-X_DwXrVU2Gsx1yq9oDNjp9ZE6EY1Q@mail.gmail.com
Whole thread Raw
In response to Re: Require suggestions on feature #5766  (Dave Page <dpage@pgadmin.org>)
Responses Re: Require suggestions on feature #5766
List pgadmin-hackers
Hi Dave,

As discussed I moved with auto-update of pgAdmin 4 application in macOs system locally. It is successful. 
So now I have to do some additional user experience improvements.

Listing down some ways we can show the user that a new version is available and he can download and install it.

Option 1: 
Show a dialog with the released features and fixes(mentioned in the release note) with "Download & Restart" and "Cancel"  buttons. This dialog will be shown only when the application starts for the first time of the day.

Benefits of showing this dialog will help users to know about the new features and bugs fixed available in the latest version. 

"Download & Restart" button will download the latest version and quit the app and install and open the latest app. "Cancel" will cancel the notification.
Option 2:
We are currently showing a warning notification of the latest version available, if the older version is being used by the user, we can add "Download & Restart" and "Cancel"  buttons. And those buttons will work the way they are working in Option 1.

Additionally we will add "Check for updates" option in pgAdmin 4 native menu, if any time a user wants to check for updates manually then can prefer this and if update is available then the "Restart to update" option will show and if clicked will quit the app and install the latest version.

Let me know in which way we can proceed.

Thanks
Anil


On Thu, Dec 5, 2024 at 5:11 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, 4 Dec 2024 at 05:19, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:

Hi Dave,

For Windows, I checked how pgAdmin works for machine-wide installations as admin1 (Administrator), and there is another admin user like admin2 (Administrator), and normal users are user1 and user2. When logged in as other mentioned users, I was able to use pgAdmin, but when I tried to upgrade pgAdmin as admin2 from v8.12 to v8.13, I faced the below error:

"An error occurred while trying to replace the existing file:

DeleteFile failed; code 5.

Access is denied."

 And if I cancel installation, then run pgAdmin, v8.12 is getting corrupted and giving

"The pgAdmin 4 server could not be contacted:
C:\Program Files (x86)\pgAdmin 4\python\python.exe: can't open file ‘ C:\\ Program Files (x86)\\pgAdmin

4\\web\\pgAdmin4.py: [Errno 2] No such file or directory."

For user-level installation, everything is working fine for different users.

I have checked some of the desktop applications that are being built with Electron, like VS Code and Postman.

How VS Code works is,

They have 2 different installers, one for user level and another for system level.

When I installed the VS Code system installer on admin1, it was working fine, and I was able to check for updates, and for admin2 and user1, it is available, working fine and able to check for updates, not able to update as I am in the latest version. (Note: not found system installers for older versions, but user installers are available)

When I installed the VS Code user installer on admin1, it was working fine, and VS Code says when running it as an administrator in a user setup installation, updates will be disabled.

When I tried to install the user installer on user1, it was working fine and able to check for updates.

How Postman works is,

When I installed Postman on admin1, it was available for admin2 also. It was working fine, and checking for auto updates was also working fine for both admins. It is not available for normal users when installed for admins.

When I installed Postman for user1, it was available only for the current user, and checking for updates was working fine.

So please give your suggestions on which approach to follow.

Postman seems to be a nice model to follow, though it will require us to check if the current user has permissions to update the installation. That might be tricky to get right.

I would suggest that for the initial version we simply disable auto-update for machine wide installations, and think about supporting them for admin users in the future when we can properly check that we have the desired permissions. We should also consider changes to the installer - e.g. perhaps make the per-user installation the default, and (if possible) add a note under the machine-wide option to warn the user that auto updates would be disabled.

Thanks, Dave. 

--


--


Anil Sahoo

Software Development Engineer II

LinkedIn || Blog || GitHub

enterprisedb.com

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Role based access control discussion
Next
From: Akshay Joshi
Date:
Subject: Regarding Feature #5305