Skip to content

Private Custom providers in Airflow3 are linked to non existing documentation page #59576

@florian-meyrueis-al

Description

@florian-meyrueis-al

Apache Airflow version

Other Airflow 3 version (please specify below)

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

3.1.3

What happened?

Hi,

When creating a private custom provider in airflow 3, the providers pages have a non existing documentation link associated with this provider :

Image

Here the link is :
https://apache.airflow.com/docs/custom-provider/0.0.0

The provider doc specify that :
If you want Airflow to link to documentation of your Provider in the providers page, make sure to add “project-url/documentation” metadata to your package. This will also add link to your documentation in PyPI.

My pyproject has :

[project.urls]
documentation = "https://your-documentation-url.com"
homepage = "https://your-homepage.com"
repository = "https://github.com/your/repo"

But i didn't change anything, the link is still the apache-airflow-doc url above.

What you think should happen instead?

We should be able to specify a custom url for this .

It looks like that in provider-info.schema, nothing is ready for that :
https://airflow.apache.org/docs/apache-airflow-providers/howto/create-custom-providers.html

How to reproduce

use this get_provider_info :

import importlib.metadata


__version__ = importlib.metadata.version("custom-provider")


def get_provider_info():
    return {
        "package-name": "custom-provider",  # Required
        "name": "custom-provider",  # Required
        "description": "custom-provider",  # Required
        "versions": [__version__],  # Required
        "dependencies": ["apache-airflow>=3.1.3"],
        "config": {
            "custom-section": {
                "description": "Custom settings",
                "options": {
                    "just-for-test": {
                        "description": (
                            "Just for test setting"
                        ),
                        "type": "string",
                        "version_added": "0.0.0",
                        "example": "none",
                        "default": "all",
                    },
                }
            }
        }
    }

And a package pyproject like :

[project]
name = "custom-provider"
version = "0.0.0"
description = "custom provider"
classifiers = [
    "Framework :: Apache Airflow",
    "Framework :: Apache Airflow :: Provider",
]
requires-python = ">=3.12,<3.13"
readme = "README.md"

[project.urls]
documentation = "https://your-documentation-url.com"
homepage = "https://your-homepage.com"
repository = "https://github.com/your/repo"

[tool.poetry]
requires-poetry = ">=2.0"
packages = [{ include = "custom_provider"}]


[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"

[tool.poetry-dynamic-versioning]
enable = true
bump = true
pattern-prefix = "custom-provider-"
pattern = "default-unprefixed"

[project.entry-points."apache_airflow_provider"]
_ = "custom_provider.provider:get_provider_info"

[tool.black]
line-length = 120

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

I guess the problem lies in the code :

airlfow-core/src/ui/src/pages/Providers.tsx
Where i can see something like :

{
    accessorKey: "package_name",
    cell: ({ row: { original } }) => (
      <Link
        aria-label={original.package_name}
        color="fg.info"
        href={`https://airflow.apache.org/docs/${original.package_name}/${original.version}/`}
        rel="noopener noreferrer"
        target="_blank"
      >
        {original.package_name}
      </Link>
    ),
    enableSorting: false,
    header: translate("providers.columns.packageName"),
  },

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions