Skip to content

version_added field in configuration option doesn't work correctly in providers documentation #34005

@Taragolis

Description

@Taragolis

Apache Airflow version

2.7.0

What happened

Initial finding: #33960 (comment)

Since Airflow 2.7.0 we have an ability to store configuration options in providers, everything works fine, except field version_added.

The logic around this field expect Airflow version and not Provider version. Any attempt to add in this field any value greater than current version of Airflow (2.7.0 at that moment) will result that configuration option won't rendered in documentation, seem like it not prevented to add this configuration at least airflow config get-value command return expected option.

What you think should happen instead

Various, depend on final solution and decision.

Option 1:
In case if we would not like use this field for providers we might ignore this field in providers configurations.
For Community Providers we could always set it to ~

Option 2:
Dynamically resolve depend on what a source of this configuration, Core/Provider

Option 3:
Add provider_version_added and use for show in which version of provider this configuration added
We could keep version_added if configuration option in provider related to Airflow Version

Option 4:
Suggest you own 😺

How to reproduce

Create configuration option with version_added greater than current version of Airflow, for stable it is 2.7.0 for dev 2.8.0

config:
  aws:
    description: This section contains settings for Amazon Web Services (AWS) integration.
    options:
      session_factory:
        description: |
          Full import path to the class which implements a custom session factory for
          ``boto3.session.Session``. For more details please have a look at
          :ref:`howto/connection:aws:session-factory`.
        default: ~
        example: my_company.aws.MyCustomSessionFactory
        type: string
        version_added: 3.1.1

Operating System

n/a

Versions of Apache Airflow Providers

n/a

Deployment

Other

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions