Skip to content

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 a team and dlstadther 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.

2 participants