-
Notifications
You must be signed in to change notification settings - Fork 2
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
default_test
option
#4
Comments
@mgibowski Thanks for trying it out and giving the feedback 🙌 Currently the Having said that, I'm still contemplating what could be the best way to allow setting mix environment specific defaults since mix environments can be any number of custom values. I'm thinking of introducing a unified |
In my case, I just need a different default value for test, different for dev, and no default for prod (always set from env variable).
|
@mgibowski I have added the configuration option Side note: I have also soft deprecated the |
thanks @emadalam just tried the feature branch, and it works great for me! |
@emadalam I was a bit too quick. Something doesn't work. Here is the code fragment:
When I invoke I get the error:
Is it a bug in mahaul, or did I make some mistake? |
@mgibowski For consistency reasons, the parsing of values to correct data types happen only from string values like how you set in the actual environment variables. So the correct way to set any defaults is to set the string values exactly like how you would do while setting the environment variables. So in your example you should do, use Mahaul,
REDPANDA_NUM_PARTITIONS: [
type: :int,
defaults: [dev: "1"]
] Regardless of the type, you always should set string values for defaults, I have it in the documentation, but maybe I'd need to reemphasize that and improve documentation. Also I could improve this through a compile time validation in future. |
Alright, makes sense - thanks! |
@mgibowski In retrospect, this should have been implemented with the new Nonetheless I have added those compile time checks in |
Hi, cool library :)
It would be great to have a
default_test
option, similar todefault_dev
.The text was updated successfully, but these errors were encountered: