-
Notifications
You must be signed in to change notification settings - Fork 16.6k
[v3-1-test] Fix config list output for multi-line values (#58115)#58378
[v3-1-test] Fix config list output for multi-line values (#58115)#58378potiuk merged 1 commit intoapache:v3-1-testfrom
Conversation
Closes: #57355
When a user runs airflow config list --include-descriptions --include-examples, multi-line values (like dag_bundle_config_list) would cause a configparser.ParsingError due to improper indentation.
This fix pretty-prints the JSON value using json.dumps(indent=4) and then adds an additional four-space indent to each new line. This ensures the INI parser treats the entire block as a single, valid multi-line value.
(cherry picked from commit d009b64)
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen
164be65 to
c286ab1
Compare
|
Thanks! |
Closes: #57355
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen
Closes: #57355
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen
Closes: #57355
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen
Closes: #57355
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen
Closes: #57355
When a user runs `airflow config list --include-descriptions --include-examples`,
multi-line values (like `dag_bundle_config_list`) would cause a
`configparser.ParsingError` due to improper indentation.
This fix pretty-prints the JSON value using `json.dumps(indent=4)`
and then adds an additional four-space indent to each new line.
This ensures the INI parser treats the entire block as a
single, valid multi-line value.
(cherry picked from commit d009b64)
Co-authored-by: Aaron Chen