Skip to content

Conversation

@Seltsamsel
Copy link
Contributor

This adds an upgrade rule as described in #12672 to rename the max_threads configuration to parsing_processes.

I created this rule on the example of the LoggingConfigurationRule, which doesn't suggest any changes if the old configuration exists but has the default value. I assume, that the idea behind this is, that if the configuration is not set by the user, a default configuration is taken. However, if a user explicitly copied the default configuration in his or her own configuration, in my opinion, a change should be suggested but isn't. But maybe I misunderstood something.

Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

Thanks @mcepok for the PR, 1 change in test suggested

Comment on lines 36 to 38
# Remove the fallback option
conf.deprecated_options.get("scheduler", {}).pop("parsing_processes", "")
conf.remove_option("scheduler", "parsing_processes")
Copy link
Member

Choose a reason for hiding this comment

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

Yeah we should not do this and mock it instead as it causes side effects and other tests are failing, example: https://github.com/apache/airflow/pull/14913/checks?check_run_id=2155532411#step:6:960

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, thanks for the feedback. I adjusted the tests with mocks.

@kaxil kaxil added this to the Airflow Upgrade Check - 1.4.0 milestone Mar 22, 2021
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @mcepok

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