regen-memo-files: use the --db argument when supplied #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 topostgresql://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.