dheerenmohta opened a new pull request, #71930: URL: https://github.com/apache/airflow/pull/71930
airflow.cfg has no machine-readable schema, so editors and third-party validators can't check a config file's values or offer autocompletion; users have asked for one. A prior attempt hand-wrote a schema separately from config.yml and was rejected for drifting from reality and for not demonstrating that the schema actually validates a real config. Building the schema from retrieve_configuration_description() -- the same data structure the Sphinx docs build already reads -- keeps every option's type, default, and version metadata sourced from config.yml itself rather than duplicated by hand. AirflowConfigParser.enums_options is layered in separately because it is the one class of constraint (e.g. dag_ignore_file_syntax, logging_level) that config.yml does not encode as data. Value patterns for boolean/integer/float options are derived from AirflowConfigParser's actual getboolean/getint/getfloat/gettimedelta grammars rather than assumed, since airflow.cfg is ini and every raw value is a string until Airflow's own parser coerces it. dev/generate_config_json_schema.py regenerates the checked-in airflow.cfg.schema.json artifact; airflow-core/tests/unit/config_templates/test_schema.py validates the schema is well-formed, matches per-option behavior (types, enums, deprecation, sensitivity, empty-string defaults), and -- the strongest evidence the schema is actually usable -- validates a real materialized AirflowConfigParser configuration against it end to end. closes: #42850 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Sonnet 5) Generated-by: Claude Code (Sonnet 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
