Skip to content
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

extract postgres class & test on multiple architectures #2837

Closed
ltalirz opened this issue May 4, 2019 · 2 comments · Fixed by #3892
Closed

extract postgres class & test on multiple architectures #2837

ltalirz opened this issue May 4, 2019 · 2 comments · Fixed by #3892
Assignees
Labels
type/feature request status undecided

Comments

@ltalirz
Copy link
Member

ltalirz commented May 4, 2019

There've always been issues with our Postgres class that is used in verdi quicksetup to try and "autodetect" how to:

  • connect to an existing postgres cluster as the postgres superuser
  • create a database user newuser (no special rights, in particular no rights to create databases)
  • create a database owned by newuser

This task simply depends a lot on the operating system and the particular setup encountered, so the only way I can see to make real progress here is to extract this part out of AiiDA and test it on

  • multiple operating systems
  • multiple ways of setting up postgres (e.g. apt, docker, conda, ...)
  • (potentially) multiple postgres versions (if there are differences)

I've already prepared the stage for this by creating an azure pipeline for pgtest, which has a similar but still significantly different purpose.
The pipeline runs pgtest on windows, macos and ubuntu and I expect it to work quite similarly for this purpose.

@ltalirz ltalirz self-assigned this May 4, 2019
@ltalirz ltalirz added the type/feature request status undecided label May 4, 2019
@ltalirz
Copy link
Member Author

ltalirz commented May 5, 2019

I've started this here, which has already helped significantly with figuring out the core of what we are actually trying to achieve here.
There are still some things to be fixed in the azure pipeline and I'm not yet entirely sure whether the current name (pgsu) & API are the one we want to keep for making this an official package.

So, in the meanwhile, I'll copy the updated code back into aiida-core, hopefully providing a fix for #2836 in time for the tutorial.

@ltalirz
Copy link
Member Author

ltalirz commented Apr 3, 2020

@sphuber You find the package here: https://github.com/ltalirz/pgsu

I've moved the CI tests to github actions - it is testing on Ubuntu, Macos and Windows.
The main question I have is:

  • does the name seem fine? (pgsu is not currently taken on PyPI)
  • does the interface look reasonable (it's quite basic - you create the class and you start executing SQL commands as the superuser)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature request status undecided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant