Add loggingconfig rule#11132
Conversation
There was a problem hiding this comment.
I would suggest checking if any of this key is used by users (not empty or different than default - this can be tricky) and then print a message for each incompatibility. See #11056 for reference. In this way, the message will be more precise. What do you think?
There was a problem hiding this comment.
Ah I was not thinking of this cause this change is backwards compatible and not something that can break if not moved but you are right, showing only the incompatibility really helps while taking actions, I can do a comparison and return only the actively used keys but what of the default/ empty keys is it right that they still remain in the old section ?
There was a problem hiding this comment.
what of the default/ empty keys is it right that they still remain in the old section ?
I think it will be ok to hardcode them in rule using default values from airflow.cfg of 1.10.x. WDYT @kaxil ?
There was a problem hiding this comment.
Yea default values can be hardcoded.
And also agree that showing a precise message for the used config will be better
There was a problem hiding this comment.
Will this work if the logging section is not present? Have you tested it?
There was a problem hiding this comment.
Yep has_option returns false when the section is not present
turbaszek
left a comment
There was a problem hiding this comment.
Look good to me 🚀
Logging configuration has been moved to new section
---------------------------------------------------
The logging configurations have been moved from [core] to the new [logging] section.
Problems:
1. task_log_prefix_template has been moved from [core] to a the new [logging] section.
bd4214b to
195f00d
Compare
|
Please rebase your PR, we added few changes that should fix the CI issues. Please do rebase and try to avoid merge commits, more information: |
9d6e7f9 to
a199d65
Compare
|
@Sangarshanan I think that the |
8424054 to
37a63fa
Compare
|
The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow, You can checks the status of those images in The workflow run |
|
@Sangarshanan it seems that one test is failing: Personally I would remove the |
|
@turbaszek This is an interesting problem that also occurs in other cases. I think that it is also worth solving separately. If you have a configuration file from Airflow 2 and you run it on Airflow 1.10, then you can't run: ʻairflow config` |
I agree, but as you said, this should be done in separate PR |
|
The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow, You can checks the status of those images in The workflow run |
|
All upgrade tests passed: |
(cherry picked from commit 80dc387)
(cherry picked from commit 80dc387)
Closes: #11046
Adds LoggingConfigurationRule rule to upgrade/rules as per:
https://github.com/apache/airflow/blob/master/UPDATING.md#logging-configuration-has-been-moved-to-new-section
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.