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

Dotenv 3.1.5 breaks kamal deploy #1294

Closed
marciotoshio opened this issue Dec 13, 2024 · 7 comments · Fixed by #1296
Closed

Dotenv 3.1.5 breaks kamal deploy #1294

marciotoshio opened this issue Dec 13, 2024 · 7 comments · Fixed by #1296

Comments

@marciotoshio
Copy link

Maybe not a kamal problem but I'd like to let people aware, my latest deploys were broken and seems like the culprit is the new version of dotenv.

ERROR (Kamal::ConfigurationError): Exception while executing on host x.x.x.x: Secret 'DATABASE_URL' not found in .kamal/secrets.staging

I installed the previous gem version 3.1.4 before installing kamal in the CI

@marciotoshio
Copy link
Author

An issue is already open in dotenv repo bkeepers/dotenv#518

@zaddy6
Copy link

zaddy6 commented Dec 13, 2024

How did you fix, this completely broke my entire CI/CD workflow

@marciotoshio
Copy link
Author

Install dotenv pinned to the previous version before Kamal

gem install dotenv -v '3.1.4' 
gem install kamal

@frenkel
Copy link

frenkel commented Dec 13, 2024

@marciotoshio thanks for pointing this out! I have been debugging my Github Action the whole morning and finally came to the conclusion something in Kamal or it's dependencies was broken. Will lock dotenv for now.

@frenkel
Copy link

frenkel commented Dec 13, 2024

The issue is because https://github.com/bkeepers/dotenv/blob/962641232d379472af77908dfed3f2f0a5c234dc/lib/dotenv/parser.rb#L56 is executed for environment variables that are already set. Seems like Kamal is using it incorrectly somehow as it expected that to be replaced.

@frenkel
Copy link

frenkel commented Dec 13, 2024

@djmb thank you!

@AxelTheGerman
Copy link
Contributor

Big +1, thank you djmb for this super quick resolution!

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 a pull request may close this issue.

4 participants