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

regen-memo-files: use the --db argument when supplied #151

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Dec 10, 2024

The --db option was introduced to bypass the internal logic parsing the YAML configuration file and specify the PSQL connection URI directly via command-line.

As noticed during an upgrade with @erindiel, when --db is set, its value is ignored internally in the current release of the micro-service and the connection string is always set to postgresql://omero:omero@localhost:5432/omero.

Ideally testing this should happen in an environment where the connection string needs to overwritten e.g. to percent encode a character in the URI. Without this PR, ./regen-memo-files.sh --db postgresql://<db_user>:<db_pass>@<db_host>:<db_port>/<db_name> should fail at the CSV creation step. With this PR included, the connection should be successful.

Alternatively, in an environment where the database is stored using the default values (localhost, omero/omero),
./regen-memo-files.sh --db postgresql://omero:omero@localhost:5432/does_not_exist should unexpectedly complete without this PR included but fail as expected with this PR included.

@sbesson sbesson requested review from stick and erindiel December 10, 2024 17:47
Copy link
Member

@erindiel erindiel left a comment

Choose a reason for hiding this comment

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

This is consistent with the changes we made during the upgrade, which resolved the issue.

@sbesson sbesson merged commit a2c6e0d into glencoesoftware:master Jan 8, 2025
3 checks passed
@sbesson sbesson deleted the regen_memo_files_db_option branch January 26, 2025 08:47
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.

2 participants