-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
pgadmin4: init at 6.3 #154764
pgadmin4: init at 6.3 #154764
Conversation
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.
Please split your PRs into smaller ones if you want them to be merged in time.
Please add a pythonImportsCheck to all packages.
Also can we identify the commit that causes 500+ rebuilds and push that to staging? I guess it is eventlet.
@mkg20001 do you want to maintain the packages in this PR? Also your commits are not verified.
pkgs/tools/admin/pgadmin/default.nix
Outdated
# pgadmin offers a wide range of tests in web/regression | ||
# unfortunately most of them require a PostgresServer in the | ||
# test environment. Also, the data and log directories need | ||
# to exist in the test environment. |
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.
This can be done in a VM test. We should probably do that to make sure dependency updates do not cause regressions.
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.
How would you go about it?
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.
I didn't write a test yet but I would go into https://github.com/NixOS/nixpkgs/tree/master/nixos/tests and look at other ones and try to find something similar to my use case.
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.
Hi @SuperSandro2000
I added the test suite which runs all python related tests. I'd love to have your feedback on them 👍
fb5f890
to
4955bfb
Compare
Hi @SuperSandro2000 thanks for your quick and very thorough review! Do you want me to split this PR into the separate packages? Or can we leave it as one? I reverted the chages to eventlet, but it still evaluates to 547 updated packages. Also some of those changes break packages with very narrow requirements (e.g. mcstatus has dnspython==2.1.0 as requirement). How do I find the commit that causes the mass-rebuild? Should I split the updated packages into isolated PR's and fix any downstream breakages? How is this usually managed? Thanks for your time! |
needed for pgadmin4 init NixOS#154764
pgadmin3 commit message needs adjustement, should be pgadmin4 version 6.5 came out, we could update it in this pr or leave that for later |
fixed.
I'd leave it for later. Let's first get a working pgadmin into nixpkgs and update it to 6.5 in a later PR |
I think maybe squash the pgadmin4 commits, it's common to just have one init commit on package creation. Then I'll merge it, seems good as is. |
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
moved pgadmin3 to pgadmin4 and renamed to 3.nix added an alias for pgadmin->pgadmin4 Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
done. I also (re-)added the alias. It must have gone lost on a rebase to master.. |
awesome! Thanks for your help 🥳 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/cant-install-postgres4-from-unstable/18068/1 |
pgadmin = callPackage ../applications/misc/pgadmin { | ||
pgadmin4 = callPackage ../tools/admin/pgadmin { }; | ||
|
||
pgadmin3 = callPackage ../tools/admin/pgadmin/3.nix { |
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.
I know this is already merged, but what were the reasons for keeping pgadmin3
around?
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.
in case someone needs it. I think we should get rid of it after 22.05 gets released tho.
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.
pgadmin3 was last updated in 2017 and currently doesn't build due to an openssl insecurity.
We are basically accumulating literal trash.
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.
in case someone needs it. I think we should get rid of it after 22.05 gets released tho.
What does pgadmin3 provide that pgadmin4 doesn't? This is NixOS unstable, remove insecure software and add a changelog entry if necessary.
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.
I say prune abandonware, and leave a release note.
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.
In case someone needs it, they can use nixpkgs 21.11, IMO.
The package will be as broken, depending on an openssl that has been EOL since 2019, on any further release as it was in 21.11.
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.
I am for removing it with a release note, too.
Motivation for this change
pgadmin3 was last updated in 2017 and currently doesn't build due to an openssl insecurity.
pgadmin4 is the replacement to it, but isn't yet available in nixpkgs.
Building on the work of @mkg20001 at #128986 I finished the work on the pgadmin4 derivation.
This PR also includes some updates to recent python packages (either due to requirements by pgadmin4 or due to build errors).
Due to the way the pgadmin4 build process works, the derivation primarily builds a python wheel and includes a bundle from yarn build files.
One major thing that needs to be discussed is the way pgadmin4 in itself works: It opens a webserver on port 5050 on localhost and needs to save state in /var/lib/pgadmin4 and saves logs to /var/log/pgadmin4. One needs to either run as root, or create the directories with user permissions. The data directory can be overwritten (either at build time, or later by placing a config file in /etc/pgadmin/config_system.py). See here.
In the long run, it probably will make sense to implement a system module with a configurable port, listen address and state directory.
Right now, pgAdmin4 builds and runs (as long as the directories above have been created).
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes