Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Nov 16, 2025

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.

Closes: apache#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 <nailo2c@gmail.com>
@potiuk potiuk force-pushed the backport-d009b64-v3-1-test branch from 164be65 to c286ab1 Compare November 16, 2025 19:22
@nailo2c
Copy link
Contributor

nailo2c commented Nov 16, 2025

Thanks!

@potiuk potiuk merged commit 2ffe483 into apache:v3-1-test Nov 16, 2025
62 checks passed
@potiuk potiuk deleted the backport-d009b64-v3-1-test branch November 16, 2025 22:43
ephraimbuddy pushed a commit that referenced this pull request Nov 18, 2025
…8378)

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 <nailo2c@gmail.com>
ephraimbuddy pushed a commit that referenced this pull request Nov 19, 2025
…8378)

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 <nailo2c@gmail.com>
ephraimbuddy pushed a commit that referenced this pull request Nov 19, 2025
…8378)

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 <nailo2c@gmail.com>
ephraimbuddy pushed a commit that referenced this pull request Nov 20, 2025
…8378)

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 <nailo2c@gmail.com>
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Dec 1, 2025
@ephraimbuddy ephraimbuddy added this to the Airflow 3.1.4 milestone Dec 2, 2025
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
…8378)

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 <nailo2c@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants