Skip to content

No relabeling of connection fields #57555

@Dev-iL

Description

@Dev-iL

Apache Airflow version

3.1.1

If "Other Airflow 2/3 version" selected, which one?

No response

What happened?

I was experimenting with the git provider in an airflow standalone instance. When attempting to add a connection, I could not understand what configuration should be put in each field. Upon consulting the docs and source code, I noticed that the field should have different names (e.g. Repository URL instead of Host, Access Token instead of password, etc.).

Image

What you think should happen instead?

The behavior encoded in the hook should be applied:

    @classmethod
    def get_ui_field_behaviour(cls) -> dict[str, Any]:
        return {
            "hidden_fields": ["schema"],
            "relabeling": {
                "login": "Username or Access Token name",
                "host": "Repository URL",
                "password": "Access Token (optional)",
            },
            "placeholders": {
                "extra": json.dumps(
                    {
                        "key_file": "optional/path/to/keyfile",
                        "private_key": "optional inline private key",
                    }
                )
            },
        }

How to reproduce

  • Create a new venv
  • Install "apache-airflow[amazon,cloudpickle,ftp,git,google,postgres,sftp,smtp,slack]==3.1.1"
  • airflow standalone

Operating System

Rocky Linux 9.6 (Blue Onyx)

Versions of Apache Airflow Providers

apache-airflow-providers-amazon==9.14.0
apache-airflow-providers-common-compat==1.8.0
apache-airflow-providers-common-io==1.6.3
apache-airflow-providers-common-sql==1.28.1
apache-airflow-providers-ftp==3.13.2
apache-airflow-providers-git==0.0.9
apache-airflow-providers-google==18.0.0
apache-airflow-providers-http==5.3.4
apache-airflow-providers-postgres==6.3.0
apache-airflow-providers-sftp==5.4.0
apache-airflow-providers-slack==9.3.0
apache-airflow-providers-smtp==2.3.1
apache-airflow-providers-ssh==4.1.4
apache-airflow-providers-standard==1.9.1

Deployment

Virtualenv installation

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions