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

Error in services.mysql with ensureUser and no password #1443

Closed
liammcdermott opened this issue Sep 13, 2024 · 3 comments · Fixed by #1656
Closed

Error in services.mysql with ensureUser and no password #1443

liammcdermott opened this issue Sep 13, 2024 · 3 comments · Fixed by #1656
Labels
bug Something isn't working

Comments

@liammcdermott
Copy link

Describe the bug
When using services.mysql.ensureUser without a password, devenv up returns an error:

       … while evaluating the option `processes.mysql-configure.exec':

       … while evaluating definitions from `/nix/store/r5vijlnhrsn07v9456i6z32i4033fj04-source/src/modules/services/mysql.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: cannot coerce null to a string: null

However, adding password to the ensureUser definition makes the error go away. I see the last commit of src/modules/services/mysql.nix altered the password handling, maybe that commit introduced this bug?

To reproduce
Here's a gist that reproduces the issue.

I believe the issue should be so easy to reproduce that a full backtrace/log isn't necessary. If not, just let me know, and I'll provide one.

Version

devenv 1.0.8 (x86_64-linux)
I am using Nix Flakes on Ubuntu 24.04.

$ nix flake --version
nix (Nix) 2.24.5
@liammcdermott liammcdermott added the bug Something isn't working label Sep 13, 2024
JoeDupuis added a commit to JoeDupuis/rails-contrib-nix that referenced this issue Sep 29, 2024
@amiryalsa
Copy link

Can you please check out main...seekingalpha:devenv:fix-mysql-null-password and let me know if I should proceed with formalising a PR from it? Thanks!

(FWIW, my fix works for me.)

@sandydoo
Copy link
Member

sandydoo commented Jan 2, 2025

Can you please check out main...seekingalpha:devenv:fix-mysql-null-password and let me know if I should proceed with formalising a PR from it? Thanks!

@amiryalsa, LGTM, open a PR and I'll merge.

@amiryalsa
Copy link

Thanks @sandydoo, I opened #1656.

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.

3 participants