astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
334 stars 70 forks source link

`astro dev object import` ignores `conn_extras` field #1591

Open zach-nicoll-wcq opened 4 months ago

zach-nicoll-wcq commented 4 months ago

Describe the bug

Our airflow_settings.yaml file contains connections that make use of the conn_extra field (we are using the aws connection type).

However, when attempting to import these values into the UI via astro dev object import, the conn_extra field is ignored and the key/value pairs are not uploaded.

The terminal output makes no indication that something has gone wrong:

astro dev object import
Updating Connection "athena-transformed-dev"...
Added Connection: athena-transformed-dev
Updating Connection "athena-trusted-dev"...
Added Connection: athena-trusted-dev

What CLI Version did you experience this bug?

1.24.1

This CLI bug is related to which Astronomer Platform?

What Operating System is the above CLI installed on?

🪜 Steps To Reproduce

  1. Create an airflow_settings.yaml file that looks like this:
airflow:
  connections:
  - conn_extra:
      aws_session_token: some_token
      role_arn: some_role
    conn_id: conn_1
    conn_login: some_login
    conn_password: some_password
    conn_type: aws
  - conn_extra:
      aws_session_token: some_token
      role_arn: some_role
    conn_id: conn_1
    conn_login: some_login
    conn_password: some_password
    conn_type: aws
  1. Run astro dev object import
  2. Observe the 'Extra' field to be an empty JSON object

📸 Screenshots

image

sunkickr commented 2 months ago

@zach-nicoll-wcq the extra field could be just hidden in the UI. Can you tell if the extra field is actually not there when running the DAG?