Thread: [pgAdmin][RM5455] Cleanup pgAdmin.py
Hi Hackers,
Attached is the patch to restructure pgAdmin4.py so that the startup code can be imported by setup_pip.py.
Code is also changed to tidy and restructure the code a bit. Changes won't affect other runners like runtime, WSGI, etc.
Please review.
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachment
Hi Dave
Can you please review it and check whether it fulfills your requirement or not.
On Thu, Apr 30, 2020 at 7:01 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,Attached is the patch to restructure pgAdmin4.py so that the startup code can be imported by setup_pip.py.Code is also changed to tidy and restructure the code a bit. Changes won't affect other runners like runtime, WSGI, etc.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246
Hi
On Thu, Apr 30, 2020 at 2:31 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,Attached is the patch to restructure pgAdmin4.py so that the startup code can be imported by setup_pip.py.Code is also changed to tidy and restructure the code a bit. Changes won't affect other runners like runtime, WSGI, etc.Please review.
Looks good structure-wise. Here's an updated patch with a couple of very minor tweaks.
It seems to work fine from the wheel entry point, and as a top-level script. However, in testing under Debian 10, having built and installed the .deb packages:
- Desktop mode just times out during startup with the following error in the application log:
2020-05-01 09:54:56,839: ERROR flask.app: Error starting the app server: (<class 'PermissionError'>, PermissionError(13, 'Permission denied'), <traceback ob
ject at 0x7fd8f982b788>)
ject at 0x7fd8f982b788>)
- In server mode on the same system (setup using the setup-web.sh), upon login I'm redirected to / which displays the default Apache index.html. Manually navigating to /pgadmin4 again does the right thing. Unlike the desktop error, this one is not resolved if I revert your patch, so I think we must have broken this elsewhere (which is worrying, as we've just done a release).
Can you look into these issues ASAP please?
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company