Subject: v3.0 release on hold

From: Dave Page <[email-masked]>
Date: Wed, 21 Mar 2018 15:35:03 +0000

We've run into a number of unexpected issues with the v3.0 release that I
think we need to resolve before moving forwards. For the time being, only
patches critical to fix these issues should be committed.

I'll try to look at 1, though I do have another deadline I need to meet.
Akshay, can you look at 2 please?
Fahar is already looking at 3.
Khushboo, can you look at 4 please?

Thanks all.

1) There is no longer a system tray in Gnome 3.26 and later, and thus the
runtime won't initialise in Fedora 27 and later. We need an alternative for
this, either a tray replacement that the RPM can depend on, or better yet,
support whatever it is Gnome expect such apps to use these days.

2) Starting a second instance of the app bundle on Mac doesn't always open
a new pgAdmin window as it should. It works fine in the debugger, or if you
start the app with a command like: "/Applications/pgAdmin\
4.app/Contents/MacOS/pgAdmin4". It doesn't work if you double-click the
appbundle or use a command like "open /Applications/pgAdmin\ 4.app"

3) Fahar saw a crash on Windows 7. I couldn't reproduce this on my copy,
but apparently his is a fresh installation.

4) On my Windows 7 machine, after running a backup I get no status window,
and see the following in the logs:

Traceback (most recent call last):
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\werkzeug\serving.py", line 209, in run_wsgi
    execute(self.server.app)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\werkzeug\serving.py", line 197, in execute
    application_iter = app(environ, start_response)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1614, in
full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1517, in
handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1612, in
full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask_login.py", line 792, in decorated_view
    return func(*args, **kwargs)
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\misc\bgprocess\__init__.py", line 62, in index
    return make_response(response=BatchProcess.list())
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\misc\bgprocess\processes.py", line 584, in list
    details = desc.details(p.command, args)
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\tools\backup\__init__.py", line 190, in details
    res += html.safe_str(cmd + self.cmd)
AttributeError: 'BackupMessage' object has no attribute 'cmd'

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Khushboo Vashi <[email-masked]>
Date: Wed, 21 Mar 2018 21:08:34 +0530

On 21 Mar 2018 21:05, "Dave Page" <[email-masked]> wrote:

Sure.

Thanks all.

Traceback (most recent call last):
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\werkzeug\serving.py",
line 209, in run_wsgi
    execute(self.server.app)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\werkzeug\serving.py",
line 197, in execute
    application_iter = app(environ, start_response)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask\app.py",
line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Program Files (x86)\pgAdmin
4\v3\venv\Lib\site-packages\flask_login.py",
line 792, in decorated_view
    return func(*args, **kwargs)
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\misc\bgprocess\__init__.py",
line 62, in index
    return make_response(response=BatchProcess.list())
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\misc\bgprocess\processes.py",
line 584, in list
    details = desc.details(p.command, args)
  File "C:\Program Files (x86)\pgAdmin
4\v3\web\pgadmin\tools\backup\__init__.py",
line 190, in details
    res += html.safe_str(cmd + self.cmd)
AttributeError: 'BackupMessage' object has no attribute 'cmd'

---

From: Joao De Almeida Pereira <[email-masked]>
Date: Wed, 21 Mar 2018 16:22:06 +0000

Hello Dave,
For number 1:
https://blogs.gnome.org/aday/2017/08/31/status-icons-and-gnome/
We might need to build something like:
https://itsfoss.com/best-indicator-applets-ubuntu/
Not sure if it is wise to do it in such a short notice.

Thanks
Joao

---

From: Dave Page <[email-masked]>
Date: Wed, 21 Mar 2018 16:54:01 +0000

Hi

On Wed, Mar 21, 2018 at 4:22 PM, Joao De Almeida Pereira <
[email-masked]> wrote:

> Hello Dave,
> For number 1: https://blogs.gnome.org/aday/2017/08/31/status-icons-
> and-gnome/
> We might need to build something like: https://itsfoss.com/
> best-indicator-applets-ubuntu/

Yeah, the problem with the suggested solutions is that they rely on 3rd
party extensions that aren't "real" packages for the OS, so we can't just
add a dependency on them. Unfortunately I think this is going to cause
quite a bit of work to get 3.0 back on track.

>> 2) Starting a second instance of the app bundle on Mac doesn't always
>> open a new pgAdmin window as it should. It works fine in the debugger, or
>> if you start the app with a command like: "/Applications/pgAdmin\
>> 4) On my Windows 7 machine, after running a backup I get no status
>> window, and see the following in the logs:
>>
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\werkzeug\serving.py",
>> line 209, in run_wsgi
>>     execute(self.server.app)
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\werkzeug\serving.py",
>> line 197, in execute
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>> line 1997, in __call__
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>> line 1985, in wsgi_app
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>> line 1982, in wsgi_app
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask\app.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\venv\Lib\site-packages\flask_login.py",
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\web\pgadmin\misc\bgprocess\__init__.py",
>> line 62, in index
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\web\pgadmin\misc\bgprocess\processes.py",
>> line 584, in list
>>   File "C:\Program Files (x86)\pgAdmin 4\v3\web\pgadmin\tools\backup\__init__.py",
>> line 190, in details

---

From: Joao De Almeida Pereira <[email-masked]>
Date: Wed, 21 Mar 2018 17:52:58 +0000

Hi Dave,
I think that this Gnome issue should be addressed after the release of 3.0.
We should create a bug and see the best way to address it after. This is my
proposal, because I am not 100% sure where this application indicator
should live.
If we search the web for application indicators we can see that usually
these are developed by 3rd parties and is are present at the applications
repository, so this might be a side project that need to be undertaken, by
someone in the community or not, but it is not something that should live
inside our repository as it is not really part of the code source and it is
more like a Hack for Gnome.

The other issues I believe need to be addressed, specially if they are
crippling to the application like when you click it does not start, but if
they are edge cases, we can always release this week and have a new release
in 2 weeks or something with more fixes to these edge case problems.

I understand that the process of release at this point is a bit cumbersome
and take a lot of time, but  if we can get more tests around the new and
old feature we can have more confidence in our code and as a result of that
we can automate some of the steps in order to generate binaries more
frequently.

Thanks
Joao

On Wed, Mar 21, 2018 at 12:54 PM Dave Page <[email-masked]> wrote:

>>> We've run into a number of unexpected issues with the v3.0 release that
>>> I think we need to resolve before moving forwards. For the time being, only
>>> 1) There is no longer a system tray in Gnome 3.26 and later, and thus
>>> the runtime won't initialise in Fedora 27 and later. We need an alternative
>>> for this, either a tray replacement that the RPM can depend on, or better
>>> yet, support whatever it is Gnome expect such apps to use these days.
>>>

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 22 Mar 2018 09:02:48 +0530

Sure. I'll

Thanks all.

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 09:16:17 +0000

Hi

On Wed, Mar 21, 2018 at 5:52 PM, Joao De Almeida Pereira <
[email-masked]> wrote:

> Hi Dave,
> I think that this Gnome issue should be addressed after the release of
> 3.0. We should create a bug and see the best way to address it after. This
> is my proposal, because I am not 100% sure where this application indicator
> should live.

The problem is that users of Gnome 3.26 and later don't just lose the tray
icon, pgAdmin will exit with an error entirely. I've tried just removing
that exit() call, but it then takes ages to start, before crashing the
gnome shell and leaving you back at the login prompt.

There are 2 things we need to avoid here:

1) Shipping with a design that is then radically changed yet again in the
next release. This is akin to my concerns about shipping with this runtime
and then replacing it with Electron shortly afterwards.

2) Shipping a product that we know will not work for a potentially large
percentage of Linux users.

Both of those things, particularly the second point, will piss off users
and damage our reputation (which is already somewhat battered following the
performance issues on Windows).

>>>> 4.app/Contents/MacOS/pgAdmin4". It doesn't work if you double-click
>>>> the appbundle or use a command like "open /Applications/pgAdmin\ 4.app"
>>>>
>>>> 3) Fahar saw a crash on Windows 7. I couldn't reproduce this on my
>>>> copy, but apparently his is a fresh installation.
>>>>

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 22 Mar 2018 14:51:26 +0530

Hi Dave

> appbundle or use a command like "open /Applications/pgAdmin\ 4.app"

  Still working on this, not found any solution yet.

> but apparently his is a fresh installation.

    I have tried on Windows 7 and Windows 8.1 64 bit clean VM (created
using ISO file) and pgAdmin4 is working fine on both. I have given the same
ISO file to Khushboo and she has created VM for both the OS and it is
crashed on her machine (seems strange behaviour), only difference is
version of VMWare fusion. I have 6.0.6 and she has 7.0.1

-- 
*Akshay Joshi*

*Sr. Software Architect *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

---

From: Khushboo Vashi <[email-masked]>
Date: Thu, 22 Mar 2018 14:55:40 +0530

Hi Dave,

> and see the following in the logs:
We have tried to reproduce this issue on Windows 7 and Windows 8, but
couldn't reproduce it, It is working fine on both the environments.
Can you please provide the options which you have selected while taking a
backup?

Traceback (most recent call last):
> Thanks,
Khushboo

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 09:50:51 +0000

Hi

> Can you please provide the options which you have selected while taking a

They were all the default options - I just selected a database,
right-clicked to select backup, and entered a filename.

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 09:52:05 +0000

Hi

On Thu, Mar 22, 2018 at 9:21 AM, Akshay Joshi <[email-masked]
> wrote:

> version of VMWare fusion. I have 6.0.6 and she has 7.0.1

Is it possible that on one virtual machine VMware Tools were installed, but
not on the other? I ask because I believe they install a version of the
MSVC runtime.

> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-8246
> <+91%2097678%2088246>*
>

---

From: Khushboo Vashi <[email-masked]>
Date: Thu, 22 Mar 2018 15:28:05 +0530

> right-clicked to select backup, and entered a filename.
With the default options, it is working fine.

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 10:12:38 +0000

On Thu, Mar 22, 2018 at 9:58 AM, Khushboo Vashi <
[email-masked]> wrote:

>>> Can you please provide the options which you have selected while taking
>>> a backup?
>>>
>>

Can you see any  way in which the exception below could conceivably happen?
Perhaps if run on a system that has process logs from an older version of
pgAdmin?

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 22 Mar 2018 18:30:53 +0530

On Thu, Mar 22, 2018 at 3:22 PM, Dave Page <[email-masked]> wrote:

> Hi
>
> On Thu, Mar 22, 2018 at 9:21 AM, Akshay Joshi <
> [email-masked]> wrote:
>
>> Hi Dave
>>
         Not able to figure out the solution yet. I have tried to debug the
code, but every time it will create a new instance(tray icon). Do I need to
look into the code or something related to app bundle may be some settings
in info.plist or any other pointer?

> Is it possible that on one virtual machine VMware Tools were installed,
> but not on the other? I ask because I believe they install a version of the
> MSVC runtime.
>

    On both machine VMware tools were installed.

-- 
*Akshay Joshi*

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 13:13:25 +0000

Hi

On Thu, Mar 22, 2018 at 1:00 PM, Akshay Joshi <[email-masked]

>          Not able to figure out the solution yet. I have tried to debug
> the code, but every time it will create a new instance(tray icon). Do I
> need to look into the code or something related to app bundle may be some
> settings in info.plist or any other pointer?
>

Have a look at the code around line 85 an onwards of pgAdmin4.cpp. It
creates the shared memory interlock (and log/address files) based on the
current username and a hash of the executable name/path. My suspicion is
that the path hash (which is calculated from argv[0] on line 72) is for
some reason getting a different value each time when launched via the
Finder or "open", thus the interlock is failing.

>     On both machine VMware tools were installed.

Odd. Very odd.

>>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91
>>> 976-788-8246 <+91%2097678%2088246>*
>>>
>>
>>
>>
>> --
>> Dave Page

---

From: Dave Page <[email-masked]>
Date: Thu, 22 Mar 2018 16:54:11 +0000

Hi

> Finder or "open", thus the interlock is failing.

So I took a look at this, and it seems the code is just fine. What is
happening is that macOS only allows a single instance of an app to run at
once. Whilst that is what we want of course, macOS is causing the new
instance to exit before it has a change to open a new pgAdmin window. Using
"open -n ..." or calling the embedded executable directly resolves that
issue.

So, there's another challenge to figure out... :-(

---

From: Akshay Joshi <[email-masked]>
Date: Fri, 23 Mar 2018 11:06:31 +0530

> So, there's another challenge to figure out... :-(

    OK. Will try to figure that out.

-- 
*Akshay Joshi*

---

From: Khushboo Vashi <[email-masked]>
Date: Fri, 23 Mar 2018 11:13:44 +0530

On Thu, Mar 22, 2018 at 3:42 PM, Dave Page <[email-masked]> wrote:

>>>>> We've run into a number of unexpected issues with the v3.0 release
>>>>> that I think we need to resolve before moving forwards. For the time being,
>>>>> only patches critical to fix these issues should be committed.
>>>>>
> Can you see any  way in which the exception below could conceivably
> happen? Perhaps if run on a system that has process logs from an older
> version of pgAdmin?
>
>
Not sure as this issue was fixed by Ashesh 1 year back as per git logs.

---

From: Dave Page <[email-masked]>
Date: Fri, 23 Mar 2018 09:51:56 +0000

On Fri, Mar 23, 2018 at 5:43 AM, Khushboo Vashi <
[email-masked]> wrote:

>>>>> Can you please provide the options which you have selected while
>>>>> taking a backup?
>>>>>
>>>>

Well the VM I was testing in did have some process logs from over a year
ago. Removing them, and truncating the process table in the sqlite DB seems
to have resolved the issue.

So, I think that's something to watch for if people have backup issues and
have used older versions of pgAdmin...

---

From: Khushboo Vashi <[email-masked]>
Date: Fri, 23 Mar 2018 15:27:59 +0530

On Fri, Mar 23, 2018 at 3:21 PM, Dave Page <[email-masked]> wrote:

>>>>>>> 1) There is no longer a system tray in Gnome 3.26 and later, and
>>>>>>> thus the runtime won't initialise in Fedora 27 and later. We need an
>>>>>>> alternative for this, either a tray replacement that the RPM can depend on,
>>>>>>> or better yet, support whatever it is Gnome expect such apps to use these
>>>>>>> days.
>>>>>>>
>>>>>>> 2) Starting a second instance of the app bundle on Mac doesn't
>>>>>>> always open a new pgAdmin window as it should. It works fine in the
>>>>>>> debugger, or if you start the app with a command like:
>>>>>>> "/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". It doesn't
>>>>>>> work if you double-click the appbundle or use a command like "open
>>>>>>> /Applications/pgAdmin\ 4.app"
>>>>>>>
> yes, we should keep in mind this.

---

From: Ashesh Vashi <[email-masked]>
Date: Fri, 23 Mar 2018 16:57:23 +0530

> have used older versions of pgAdmin...
Should we have a job to purge them on a timely basis? (Of course -
configurable)

-- Thanks, Ashesh

---

From: Dave Page <[email-masked]>
Date: Fri, 23 Mar 2018 12:03:31 +0000

On Fri, Mar 23, 2018 at 11:27 AM, Ashesh Vashi <
[email-masked]> wrote:

>>>>>>> We have tried to reproduce this issue on Windows 7 and Windows 8,
>>>>>>> but couldn't reproduce it, It is working fine on both the environments.
>> So, I think that's something to watch for if people have backup issues
>> and have used older versions of pgAdmin...
>>

Hmm, not sure if it's worth it. We should make sure that future changes in
that code can cope with older format logs and DB entries though.

---

From: Akshay Joshi <[email-masked]>
Date: Fri, 23 Mar 2018 18:55:51 +0530

Hi Dave

>     OK. Will try to figure that out.

        After googled I have tried following solution:

   1. Create a shell script "launch.sh" and kept it in  "/Applications/pgAdmin\
   4.app/Contents/MacOS" folder. That shell script will contain the command
   "open -n /Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". Change
   the "CFBundleExecutable" parameter of Info.plist from "pgAdmin4" to
   "launch.sh".  It didn't work, shall script didn't launch.
   2. Create one apple script with command like "do shell execute
"/Applications/pgAdmin\
   4.app", compile it and save it as Application. It create the app bundle,
   copy contents of pgAdmin4 app to this newly created application. But the
   problem is it opens and having icon in the dock and no response on double
   click (second time).

       Will continue to figure out some other solutions tomorrow.

-- 
*Akshay Joshi*

---

From: Joao De Almeida Pereira <[email-masked]>
Date: Mon, 26 Mar 2018 13:59:53 +0000

Hi Hackers,

Did we had any progress on the things that are holding the release back?

Thanks
Joao

On Fri, Mar 23, 2018 at 9:26 AM Akshay Joshi <[email-masked]>
wrote:

>>>>>>>> "/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". It doesn't work if
>>>>>>>> you double-click the appbundle or use a command like "open
>>>>>          Not able to figure out the solution yet. I have tried to
>>>>> debug the code, but every time it will create a new instance(tray icon). Do
>>>>> I need to look into the code or something related to app bundle may be some
>    2. Create one apple script with command like "do shell execute "/Applications/pgAdmin\

---

From: Robert Eckhardt <[email-masked]>
Date: Tue, 3 Apr 2018 09:43:06 -0400

All,

Where are we with respect to cutting this release?

-- Rob

On Mon, Mar 26, 2018 at 9:59 AM, Joao De Almeida Pereira <
[email-masked]> wrote:

> On Fri, Mar 23, 2018 at 9:26 AM Akshay Joshi <
>>>>>>>>> "/Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4". It
>>>>>>>>> doesn't work if you double-click the appbundle or use a command like "open
>>    "open -n /Applications/pgAdmin\ 4.app/Contents/MacOS/pgAdmin4".
>>    Change the "CFBundleExecutable" parameter of Info.plist from "pgAdmin4" to

---

From: Dave Page <[email-masked]>
Date: Tue, 3 Apr 2018 16:04:42 +0100

I'm thinking build Monday, release Thursday.

Objections?

---

From: Robert Eckhardt <[email-masked]>
Date: Tue, 3 Apr 2018 11:16:45 -0400

> I'm thinking build Monday, release Thursday.

It we can make it happen faster I'd be all for it. If not that will work.
Thanks

-- Rob

>>>>>>> Have a look at the code around line 85 an onwards of pgAdmin4.cpp.
>>>>>>> It creates the shared memory interlock (and log/address files) based on the