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

Enable updating the default config parser even after loading luigi #3135

Merged
merged 2 commits into from Jan 3, 2022

Conversation

tarohi24
Copy link
Contributor

Description

This PR enables updating the default config parser by updating LUIGI_CONFIG_PARSER.

Motivation and Context

You can change the default config parser by updating the environment variable LUIGI_CONFIG_PARSER.
However, you cannot change it after importing luigi.configuration because the environment variable is evaluated when loading the module.
get_config is used in many modules, many of which don't allow passing the parser argument to it.
So I changed luigi.configuration to allow users to change the default parser even after the module is loaded.

Have you tested this? If so, how?

I added a test : https://github.com/spotify/luigi/compare/master...tarohi24:enable_changing_default_parser?expand=1#diff-057c25ffc6418870df3cf372c8de2cf04dd57256dad785ca96ff3eb3046e3ee3R101

@tarohi24 tarohi24 requested review from dlstadther and a team as code owners December 30, 2021 09:04
Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dlstadther dlstadther merged commit c3b66f4 into spotify:master Jan 3, 2022
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 this pull request may close these issues.

None yet

2 participants