Skip to content

Cli export / import roles including permissions Part 2 (refinement) #36580

@gbonazzoli

Description

@gbonazzoli

Apache Airflow version

main (development)

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

No response

What happened?

This is the refinement of: #36128

The CLI command airflow roles export now in the main branch exports roles along with their associated permissions.

Good !

There is only a little aesthetic inaccuracy as you can see form the airflow roles export output:

airflow@airflow-kube-worker-848886d894-gv4wn:~$ airflow roles export b.json
38 roles with permissions successfully exported to b.json

it says 38 roles, actually they are only 4 roles but the permissions associated have multiplied them.

I looked at the code and I think we have the same problem also in the import phase.

What you think should happen instead?

My suggestion is that the command should print out: 4 roles exported with 38 linked/granted permissions.

linked in export and granted in import

How to reproduce

gives the command above.

Operating System

branch main

Versions of Apache Airflow Providers

apache-airflow                           2.8.0
apache-airflow-providers-amazon          8.13.0
apache-airflow-providers-celery          3.5.0
apache-airflow-providers-cncf-kubernetes 7.11.0
apache-airflow-providers-common-io       1.1.0
apache-airflow-providers-common-sql      1.9.0
apache-airflow-providers-docker          3.8.2
apache-airflow-providers-elasticsearch   5.3.0
apache-airflow-providers-ftp             3.7.0
apache-airflow-providers-google          10.12.0
apache-airflow-providers-grpc            3.4.0
apache-airflow-providers-hashicorp       3.6.0
apache-airflow-providers-http            4.8.0
apache-airflow-providers-imap            3.5.0
apache-airflow-providers-microsoft-azure 8.4.0
apache-airflow-providers-mysql           5.5.0
apache-airflow-providers-odbc            4.2.0
apache-airflow-providers-openlineage     1.3.0
apache-airflow-providers-postgres        5.9.0
apache-airflow-providers-redis           3.5.0
apache-airflow-providers-salesforce      5.6.0
apache-airflow-providers-sendgrid        3.4.0
apache-airflow-providers-sftp            4.8.0
apache-airflow-providers-slack           8.5.0
apache-airflow-providers-snowflake       5.2.0
apache-airflow-providers-sqlite          3.6.0
apache-airflow-providers-ssh             3.9.0
google-cloud-orchestration-airflow       1.10.0

Deployment

Official Apache Airflow Helm Chart

Deployment details

kubernetes v1.28.4

helm v3.13.1

Anything else?

kubernetes v1.28.4

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