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.

Unknown connection types fail in cryptic ways

See original GitHub issue

Apache 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

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
potiukcommented, Mar 31, 2022

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 generic type if the connection type is not valid.

And Valid means two things:

  • it is on the list of built-in connection tupes
  • you can query the Providers Manager to see which connection types are present via providers. It has “hooks” property that has list of HookInfo objects which contains connection_type

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.

1reaction
Bowrnacommented, Mar 27, 2022

Shall I fix this issue?

Read more comments on GitHub >

github_iconTop 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 >

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