Unknown connection types fail in cryptic ways
See original GitHub issueApache Airflow version
2.2.4 (latest released)
What happened
I created a connection like:
airflow connections add fsconn --conn-host /tmp --conn-type File
When I really should have created it like:
airflow connections add fsconn --conn-host /tmp --conn-type fs
While using this connection, I found that FileSensor would only work if I provided absolute paths. Relative paths would cause the sensor to timeout because it couldn’t find the file. Using fs instead of File caused the FileSensor to start working like I expected.
What you think should happen instead
Ideally I’d have gotten an error when I tried to create the connection with an invalid type.
Or if that’s not practical, then I should have gotten an error in the task logs when I tried to use the FileSensor with a connection of the wrong type.
How to reproduce
No response
Operating System
debian (in docker)
Versions of Apache Airflow Providers
n/a
Deployment
Astronomer
Deployment details
astro dev start
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Cryptic or Silent? The Known Unknowns ... - ASM Journals
Progress has been made in identifying these kinds of truly cryptic gene clusters using evolutionary mining methods to identify the expansion ...
Read more >Indiana Jones and the Crypt of Cryptic Error Messages
Let's begin! AN ERROR MESSAGE HAS APPEARED AND IS COMPLETELY BLOCKING YOUR WAY. Read (don't skim) the entire message before jumping to the ......
Read more >Cryptic pregnancy: What to know - Medical News Today
A cryptic pregnancy is when a woman is unaware that she is pregnant. Learn about the symptoms, causes, complications, and more.
Read more >What Is a Cryptic Pregnancy? Symptoms, Length, and More
A cryptic pregnancy, also called a stealth pregnancy, is a pregnancy that conventional medical testing methods may fail to detect.
Read more >Connection closed by UNKNOWN port 65535 when SSH ...
When I try to SSH using "ssh user@domainname@hostname" it asks for my password and as soon as I type my password, I get...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think we shoudl simply check - whenever connection is added/updated whether the type is “Valid” and print a warning in the CLI. As @eladkal suggested, it should set the type of the connection to
generictype if the connection type is not valid.And Valid means two things:
The warning likely should print the list of valid connection types.
This is important to use ProvidersManager for that, because it automatically discovers which providers are installed, so it will prevent (or rather warn) if you try to create a connection for a provider that you do not have installed.
Shall I fix this issue?