astro-cli icon indicating copy to clipboard operation
astro-cli copied to clipboard

`astro dev object import` ignores `conn_extras` field

Open zach-nicoll-wcq opened this issue 2 years ago • 1 comments

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?

  • [x] Astro
  • [ ] Software
  • [ ] None/Unknown

What Operating System is the above CLI installed on?

  • MacOS
  • Nobara (Fedora) Linux

🪜 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

zach-nicoll-wcq avatar Mar 08 '24 03:03 zach-nicoll-wcq

@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?

sunkickr avatar Apr 22 '24 15:04 sunkickr