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

Correct Environment Variable in Helm Deployment Template #136

Closed
linkinn opened this issue Mar 11, 2024 · 1 comment · Fixed by #137
Closed

Correct Environment Variable in Helm Deployment Template #136

linkinn opened this issue Mar 11, 2024 · 1 comment · Fixed by #137
Labels
bug Something isn't working

Comments

@linkinn
Copy link

linkinn commented Mar 11, 2024

Describe the bug

Within the Helm template used to deploy our application, there is an environment variable named DATABASE that is incorrectly configured. It should be DATABASE_NAME.

While investigating an issue with the application not functioning correctly when using a database name other than unleash, we identified the root cause to be the misconfiguration in the Helm deployment template. Within this template, the DATABASE environment variable is set to an incorrect value. This causes issues when the database name is different from unleash, as the application expects an environment variable named DATABASE_NAME.

Steps to reproduce the bug

1 - Deploy the application using the Helm template.
2 - Change the database name to something other than unleash.
3 - Notice that the application does not function correctly due to expecting an environment variable DATABASE_NAME instead of DATABASE.

Expected behavior

No response

Logs, error output, etc.

[2024-03-11T19:26:22.801] [ERROR] server-impl.js - Locking error: database "unleash" does not exist
[2024-03-11T19:26:22.803] [ERROR] server-impl.js - Failed to migrate db Error: Connection terminated unexpectedly
    at /unleash/node_modules/pg/lib/client.js:526:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /unleash/node_modules/unleash-server/dist/lib/util/db-lock.js:30:9
    at async Object.start (/unleash/node_modules/unleash-server/dist/lib/server-impl.js:149:17)
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Connection terminated unexpectedly
    at /unleash/node_modules/pg/lib/client.js:526:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /unleash/node_modules/unleash-server/dist/lib/util/db-lock.js:30:9
    at async Object.start (/unleash/node_modules/unleash-server/dist/lib/server-impl.js:149:17)

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

None

Hosting type

None

SDK information (language and version)

No response

@linkinn linkinn added the bug Something isn't working label Mar 11, 2024
@thomasheartman thomasheartman moved this from New to Support rotation in Issues and PRs Mar 13, 2024
@chriswk
Copy link
Member

chriswk commented Mar 13, 2024

Hi @linkinn - You're absolutely correct, and we're sorry. I'll make a PR fixing this. Thank you for taking the time to file this bug.

chriswk added a commit that referenced this issue Mar 13, 2024
- Unleash looks for DATABASE_NAME, it does not look for DATABASE, so
  this has actually not been working earlier

fixes: #136
@chriswk chriswk linked a pull request Mar 13, 2024 that will close this issue
chriswk added a commit that referenced this issue Mar 13, 2024
- Unleash looks for DATABASE_NAME, it does not look for DATABASE, so
  this has actually not been working earlier

fixes: #136
@github-project-automation github-project-automation bot moved this from Support rotation to Done in Issues and PRs Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants