-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
traefik: unify TOML generation #89744
Conversation
As a side effect, the dynamic config file is now indented
@GrahamcOfBorg test traefik |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
[matt@servnerr-3:~/src/nixpkgs]$ cat /nix/store/ifi9fh33m7ysxzdx0qfzhldi7ix3sdjb-config.toml
[entryPoints]
[entryPoints.web]
address = ":80"
[global]
checkNewVersion = false
sendAnonymousUsage = false
[providers]
[providers.docker]
exposedByDefault = false
[providers.file]
filename = "/nix/store/c9v743dlz0x900y1rxf7g6ws3qbggdy2-config.toml"
This file should be the same, I haven't touched its generation. You are probably interested in the file provider - |
This patch seems to break my existing traefik configuration. The underlying problem is that json doesn't distinguish between integers and floats, but both toml and nix do. So if I specify an integer value in While surprising, this is probably correct behavior on For example, lets take a look at the following traefik configuration:
the above is converted to the following (dynamic) configuration file:
As you can see, the |
This broke my config also, and was a nightmare to hunt down. @alyssais please revert |
Reverted in 5b8b201 |
This is addressed in yj v5.0.0 (even though the previous behavior technically adheres to the spec). onyx:yj stephen$ echo '{"a": 1}'|./yj -jt
a = 1
onyx:yj stephen$ echo '{"a": 1.0}'|./yj -jt
a = 1.0 |
As a side effect, the dynamic config file is now indented
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)