-
Notifications
You must be signed in to change notification settings - Fork 915
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
Explicitly set the environment defaults in settings.py
#3326
Conversation
…dded in settings.py Signed-off-by: Merel Theisen <[email protected]>
Signed-off-by: Merel Theisen <[email protected]>
settings.py
settings.py
My preference goes to option 2 in the PR description, because IMO it’s more transparent to the user what happens here. No more magic treating of |
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.
Option 2 also seems to me more clear, thanks for PR @merelcht
+1 |
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.
💯 "Explicit is better than implicit"
Signed-off-by: Merel Theisen <[email protected]> Signed-off-by: Jo Stichbury <[email protected]>
Description
I think Remove the environment default for ConfigLoader might have an unexpected side effect. If you set
CONFIG_LOADER_ARGS
it will override the default set in_ProjectSettings
and so it will overridebase_env
anddefault_run_env
. I noticed this because in the starters using spark we have:If I don’t uncomment base/default env, I will get an error saying it can’t find spark config inside myproject/conf: https://app.circleci.com/pipelines/github/kedro-org/kedro-starters/889/workflows/f1376cb4-be57-4429-8a1b-a8b9a3a31150/jobs/10413
Development notes
Option 1:
Make sure the env defaults don't get overwritten when not explictly a…
This is a fix to check inside the session if
base_env
ordefault_run_env
has been specified and if not it shouldn’t overwrite the default.Option 2:
7ad31c8
Alternatively, we can just add the default
base_env
anddefault_run_env
tosettings.py
. If a user removes that, it's less unexpected that this will change the behaviour IMO. That way we don't need to change the session.Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file