Skip to content

Conversation

AJ0070
Copy link
Contributor

@AJ0070 AJ0070 commented Jul 12, 2025

Closes #36
claim #36

Description

This pull request introduces a new Coder module for pgAdmin. This module allows users to easily add a pgAdmin web interface to their workspaces for managing PostgreSQL databases.

  • The pgAdmin module under the AJ0070 namespace.
  • A main.tf file to define the Coder app and script resources.
  • A run.sh script to handle the installation and launch of pgAdmin.
  • A README.md with usage instructions and prerequisites.
  • A basic test file main.test.ts to ensure the module loads correctly.

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/AJ0070/modules/pgadmin
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

/claim #36

@DevelopmentCats DevelopmentCats self-requested a review July 16, 2025 02:51
@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Jul 16, 2025

@AJ0070

I went to test this module. It was having issues with installation, and the app was not being proxied.

I forked the registry and made a branch to see if I can understand what is going wrong here.

The main things that I changed on my side to get this working, was I introduced a variable for the pgadmin config, introduced locals to do joins and formatting, and I utilized the venv for pgadmin.

I then added a step to write the configuration to a file so that pgadmin loads with the ideal settings for coder.

Here is the fork if you would like to take a look. https://github.com/DevelopmentCats/registry/tree/cat/AJ0070-pgadmin-fix/registry/AJ0070

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 16, 2025

@AJ0070

I went to test this module. It was having issues with installation, and the app was not being proxied.

I forked the registry and made a branch to see if I can understand what is going wrong here.

The main things that I changed on my side to get this working, was I introduced a variable for the pgadmin config, and introduced locals to format the url and healthcheck.

I then added a step to write the configuration to a file so that pgadmin loads with the ideal settings for coder.

Here is the fork if you would like to take a look. https://github.com/DevelopmentCats/registry/tree/cat/AJ0070-pgadmin-fix/registry/AJ0070

Thanks for the details!
I'll look into this

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 17, 2025

Thank you so much for taking the time to test the module and provide such detailed feedback. I really appreciate you forking the repository and creating a working example it was incredibly helpful for understanding the issues with installation and proxying.
Your solution is much more stable. With your permission, I would love to incorporate the changes from your cat/AJ0070-pgadmin-fix branch into my PR to get this merged.

Please let me know @DevelopmentCats if that's okay with you. Thanks again for your help!

@DevelopmentCats
Copy link
Contributor

Thank you so much for taking the time to test the module and provide such detailed feedback. I really appreciate you forking the repository and creating a working example it was incredibly helpful for understanding the issues with installation and proxying. Your solution is much more stable. With your permission, I would love to incorporate the changes from your cat/AJ0070-pgadmin-fix branch into my PR to get this merged.

Please let me know @DevelopmentCats if that's okay with you. Thanks again for your help!

No worries.

That's totally fine with me. I'm happy to provide in whatever way I can. Sorry I couldn't point out the exact issues right out of the gate. I had never really worked with pgadmin-web before now and it took me a minute to get it myself lol.

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 17, 2025

Thanks for the confirmation!

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 17, 2025

I've implemented the changes. Let me know if there's anything else you'd like adjusted.

@matifali
Copy link
Member

@AJ0070, please link a video demo of the module wokring in a Coder workspace. Thanks,

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 17, 2025

@AJ0070, please link a video demo of the module wokring in a Coder workspace. Thanks,

I'll do that right after I fix the workflow failure.

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 19, 2025

pg-admin-test.mp4

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 19, 2025

@DevelopmentCats, could you please review the recent changes when you have a moment?

@bpmct
Copy link
Member

bpmct commented Jul 19, 2025

Hey @AJ0070. that video doesn't show pgadmin with coder. the agent doesn't start and there is no pgadmin button in the dashboard

@AJ0070
Copy link
Contributor Author

AJ0070 commented Jul 24, 2025

Now pgAdmin icon is visible:

image

but I am not sure why the connection is refusing:

2025-07-24 13:47:00.932 [debu]  apphealth: error checking app health  id=9830f5f2-bf28-4ef1-981a-090ccaf65dbb  slug=pgadmin  now_unhealthy=true  error="Get \"http://localhost:5050/\": dial tcp [::1]:5050: connect: connection refused"

@DevelopmentCats Did you encounter anything like this during your local testing? Let me know if you have any suggestions for resolving it.

@DevelopmentCats
Copy link
Contributor

Now pgAdmin icon is visible:

image but I am not sure why the connection is refusing:
2025-07-24 13:47:00.932 [debu]  apphealth: error checking app health  id=9830f5f2-bf28-4ef1-981a-090ccaf65dbb  slug=pgadmin  now_unhealthy=true  error="Get \"http://localhost:5050/\": dial tcp [::1]:5050: connect: connection refused"

@DevelopmentCats Did you encounter anything like this during your local testing? Let me know if you have any suggestions for resolving it.

Even in my version, it still took forever to build.

PGAdmin seems to be pretty heavy overall, and I doubt there is much to be done to speed the install up. In my testing though I was able to get pgadmin installed, and available over the coder app button.

@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Aug 7, 2025

It seems to be loading fine for me when I just pulled it. @AJ0070

Can you upload the icon for this and pull the svg for pgadmin instead of postgres like its referencing right now. Make sure to also make a PR in coder/coder to upload the icon in site/static/icons so that it shows up properly in coder.

Also there is a typo in your avatar image please fix that.

Lastly I notice that you have changes in here for the filebrowser module. Please remove that. I will review this after you take care of those things

@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 7, 2025

@DevelopmentCats added logo on coder: coder/coder#19210

@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 7, 2025

It seems to be loading fine for me when I just pulled it. @AJ0070

Can you upload the icon for this and pull the svg for pgadmin instead of postgres like its referencing right now. Make sure to also make a PR in coder/coder to upload the icon in site/static/icons so that it shows up properly in coder.

Also there is a typo in your avatar image please fix that.

Lastly I notice that you have changes in here for the filebrowser module. Please remove that. I will review this after you take care of those things

@DevelopmentCats Ready for review

@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Aug 7, 2025

@DevelopmentCats added logo on coder: coder/coder#19210

I would use this logo instead. but the file name and upload looks good to me.

Please make sure you sign the CLA on coder/coder#19210

@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 7, 2025

I would use this logo instead. but the file name and upload looks good to me.

As @aslilac mentioned here do we have proper license to redistribute it?

@DevelopmentCats

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Coder module for pgAdmin, allowing users to easily deploy a web-based PostgreSQL database management interface in their workspaces. The module provides automated installation, configuration, and startup of pgAdmin 4 with customizable settings.

Key changes:

  • New pgAdmin module under the AJ0070 namespace with complete implementation
  • Automated pgAdmin installation and configuration through shell scripts and Terraform
  • Configurable deployment options including subdomain support and custom configuration

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
registry/AJ0070/modules/pgadmin/main.tf Terraform configuration defining Coder app and script resources with pgAdmin setup
registry/AJ0070/modules/pgadmin/run.sh Shell script handling pgAdmin installation, virtual environment setup, and service startup
registry/AJ0070/modules/pgadmin/main.test.ts Basic test file ensuring the module loads correctly with required variables
registry/AJ0070/modules/pgadmin/README.md Documentation with usage instructions and module metadata
registry/AJ0070/README.md Author profile information for the AJ0070 namespace

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

matifali
matifali previously approved these changes Aug 18, 2025
@matifali
Copy link
Member

@AJ0070, can you update your PR body to comment on the `/claim thing again?

@algora-pbc algora-pbc bot mentioned this pull request Aug 18, 2025
@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 20, 2025

@matifali Do you see any changes needed? I’m planning to wrap this up as soon as possible.

@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 28, 2025

@matifali let me know if you’d like me to make any changes.

@matifali
Copy link
Member

@AJ0070 Run bun fmt and commit

@AJ0070 AJ0070 dismissed stale reviews from matifali and DevelopmentCats via 7d65ac3 August 28, 2025 16:35
@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 28, 2025

@matifali Done

@matifali matifali enabled auto-merge (squash) August 28, 2025 16:38
@AJ0070
Copy link
Contributor Author

AJ0070 commented Aug 28, 2025

@matifali From what I can tell, the failing tests aren’t related to the pgadmin module. Should I do anything about them?

@matifali matifali merged commit 35e64f2 into coder:main Aug 28, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PG Admin module
4 participants