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

[Feature Request] add mysql visibility db independent init params #100

Open
zengzilu opened this issue Feb 10, 2023 · 1 comment
Open

[Feature Request] add mysql visibility db independent init params #100

zengzilu opened this issue Feb 10, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zengzilu
Copy link

zengzilu commented Feb 10, 2023

Is your feature request related to a problem? Please describe.

in my case, databases are managed by a central team, they can't offer db "temporal" and "temporal_visibility" with same dbUrl, userName and password for some reason, it cause problem because the "auto-setup.sh" init db "temporal" and "temporal_visibility" with same env keys. "MYSQL_SEEDS", "MYSQL_USER", "MYSQL_PWD".

Describe the solution you'd like

I notice that when temporal-server generate config file, it has separate 2 db params to different env keys in config_template.yaml with "VISIBILITY_MYSQL_XXX", my solution is to add sub codes to auto-setup.sh

: "${VISIBILITY_MYSQL_SEEDS:=${MYSQL_SEEDS}}"
: "${VISIBILITY_MYSQL_USER:=${MYSQL_USER}}"
: "${VISIBILITY_MYSQL_PWD:=${MYSQL_PWD}}"

...

if [[ ${SKIP_DB_CREATE} != true ]]; then
    temporal-sql-tool --ep "${VISIBILITY_MYSQL_SEEDS}" -u "${VISIBILITY_MYSQL_USER}" -p "${DB_PORT}" "${MYSQL_CONNECT_ATTR[@]}" --db "${VISIBILITY_MYSQL_PWD}" create
fi
temporal-sql-tool --ep "${VISIBILITY_MYSQL_SEEDS}" -u "${VISIBILITY_MYSQL_USER}" -p "${DB_PORT}" "${MYSQL_CONNECT_ATTR[@]}" --db "${VISIBILITY_MYSQL_PWD}" setup-schema -v 0.0
temporal-sql-tool --ep "${VISIBILITY_MYSQL_SEEDS}" -u "${VISIBILITY_MYSQL_USER}" -p "${DB_PORT}" "${MYSQL_CONNECT_ATTR[@]}" --db "${VISIBILITY_MYSQL_PWD}" update-schema -d "${VISIBILITY_SCHEMA_DIR}"


Additional context

I'd like to submit a pr to fix it, may I join the repo

@zengzilu zengzilu added the enhancement New feature or request label Feb 10, 2023
@zengzilu zengzilu changed the title [Feature Request] add mysql visibility independent init params [Feature Request] add mysql visibility db independent init params Feb 10, 2023
@robholland
Copy link
Contributor

To submit a PR, you can fork this repo and PR from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants