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

use postgresql as database for gateway and repository-server #508

Merged
merged 1 commit into from
May 12, 2023

Conversation

akihikokuroda
Copy link
Collaborator

Summary

Fix #315

Details and comments

@akihikokuroda akihikokuroda marked this pull request as draft May 6, 2023 01:51
@akihikokuroda akihikokuroda force-pushed the database branch 4 times, most recently from 49a287c to 4995db1 Compare May 6, 2023 21:14
@akihikokuroda akihikokuroda marked this pull request as ready for review May 6, 2023 21:29
@pacomf pacomf requested review from Tansito and IceKhan13 May 8, 2023 12:16
Copy link
Member

@IceKhan13 IceKhan13 left a comment

Choose a reason for hiding this comment

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

LGTM

@Tansito be aware of this in your PR #447

},
"root": {
"handlers": ["console"],
"level": "DEBUG",
Copy link
Member

Choose a reason for hiding this comment

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

We can open an issue and do it later but we should be able to modify the level of the LOGs through an environment variable, for example.

}

if "test" in sys.argv:
Copy link
Member

Choose a reason for hiding this comment

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

Just as a doubt @akihikokuroda , now if we want to use sqlite what command do we need to use: python manage.py runserver test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn't give the choice to use sqlite for runtime. It is for using the sqlite for the unit tests.

initContainers:
- name: waitpostresql
image: actions/pg_isready
command: ['sh', '-c', 'until pg_isready -U {{ .Values.database.user | quote }} -d "dbname={{ .Values.database.name }}" -h {{ .Release.Name }}-postgresql -p {{ .Values.database.port | quote }}; do echo waiting for myservice; sleep 2; done']
Copy link
Member

@Tansito Tansito May 8, 2023

Choose a reason for hiding this comment

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

Correct me if I'm wrong @akihikokuroda , @psschwei but now from #505 we are not using or requiring the use of {{ .Release.Name }}, right?

Copy link
Member

@Tansito Tansito May 8, 2023

Choose a reason for hiding this comment

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

And thinking in loud. I would suggest to pass the host entirely as we are doing with the user and so on, I don't know what do you think (thinking that we are going to have the DBs outside the cluster, initially).

Copy link
Member

Choose a reason for hiding this comment

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

by the way, won't it be required in this case the password?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Tansito Thanks for review. I made this change based on the main on Friday. I'll adjust the -h for the latest main.

The pg_isready doesn't need the password according to samples.

use SQLite for unit test

Signed-off-by: Akihiko Kuroda <[email protected]>
@@ -84,10 +84,16 @@ services:
- SITE_HOST=http://gateway:8000
# - SETTINGS_AUTH_MECHANISM=default #custom_token
# - SETTINGS_TOKEN_AUTH_URL=<URL_FOR_TOKEN_VERIFICATION>
Copy link
Member

Choose a reason for hiding this comment

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

Just as a last comment @akihikokuroda I don't know if we can remove these lines commented if we are not going to need them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These lines were added in #524. I'll leave them there.

@akihikokuroda akihikokuroda merged commit 0a6a04f into Qiskit:main May 12, 2023
@akihikokuroda akihikokuroda deleted the database branch May 12, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure API projects to use Postgres
4 participants