question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connections do not save since Airflow 2.1.0

See original GitHub issue

Apache Airflow version: Various - between 2.0.2 and 2.1.2

Kubernetes version (if you are using kubernetes) (use kubectl version): n.a.

Environment:

  • Docker running on Win 10 or Ubuntu 18.04 or Ubuntu 20.04 using the images
    • apache/airflow:2.0.2-python3.8
    • apache/airflow:2.1.0-python3.8
    • apache/airflow:2.1.1-python3.8
    • apache/airflow:2.1.2-python3.8

What happened:

Since Airflow 2.1.0, saving or changing connections using the UI does not work anymore. When creating a new connection or attempting to change an existing one, the click on the Save button does not do anything.

Step 1: Go the create connection page and fill out the form

image

Step 2: Click on `Save`. For a very short amount of time (milliseconds), the UI changes to one that seems to show `all` custom connection type extra fields (see next screenshot), and then reverts back to the previous layout, without any message or saving anything. Effectively, it is not possible to change existing or create new connections using the UI.

image

What you expected to happen:

I'd like to see this screen again

image

How to reproduce it:

It seems to me that if this was behavior was the case for everyone, this would have been picked up already. Likely, this is related to the fact that I am maintaining a provider package (ewah). Simply changing the base image to the Airflow 2.0.2 version makes it work as expected, and any version since 2.1.0 show this bug. I’m not sure how to best reproduce this other than using the ewah repository, building it locally and switching the image between those version, as I am doing.

Anything else we need to know:

There are a lot of custom connections in this package. While writing this issue down, I had the idea to check if I accidentally called two extra fields the same by copy pasting them, and that this may break something since 2.1.0. I’ll update this issue if I find something along those lines; either way, if that was the case, I’d prefer it to throw an error rather than have a hard to debug issue.

UPDATE: Negative, I went through all custom connections and found nothing of concern.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
potiukcommented, Jul 25, 2021

I think it’s a bit how the SelectField is validated in javascript which is run while submitting the form. From what I saw, there were some client-side pre-validation failures generated by FAB client-side. I do not know that much about it to dig into it (and taking into account future of Airlfow WebUI, it is probably not worth it) 😃. The check I’ve done on the server side will prevent from similar problems for others (With VERY explicit WARNING message and failing to load custom connection), so I think it’s good as it is 😃.

0reactions
soltanianalyticscommented, Jul 23, 2021

Very interesting, thank you for the support!

unless you would like to invest a little time and add support for it for example

What would be needed for that? Where should I start / where to look into?

I’ll probably phase them out for now, though, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing Connections — Airflow Documentation
Connections defined in environment variables will not show up in the ... Modify the connection properties and click the Save button to save...
Read more >
Managing Connections — Airflow ... - Apache Airflow
Connections can be created and managed using either the UI or environment ... Modify the connection properties and click the Save button to...
Read more >
Release Notes — Airflow Documentation
Re-configure/connect the ORM after forking to run a DAG processor (#26216) ... is running for a while, since all existing task logs have...
Read more >
Configuration Reference — Airflow Documentation
This page contains the list of all the available Airflow configurations that you can set in airflow.cfg file or using environment variables. Use...
Read more >
Securing Connections — Airflow Documentation
Securing Connections¶. By default, Airflow will save the passwords for the connection in plain text within the metadata database. The crypto package is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found