You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "genehynson (via GitHub)" <gi...@apache.org> on 2023/07/27 17:45:33 UTC
[GitHub] [airflow] genehynson opened a new issue, #32890: Airflow UI ignoring extra connection field during test connection
genehynson opened a new issue, #32890:
URL: https://github.com/apache/airflow/issues/32890
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
I have a custom Airflow provider with a custom connection type. We support providing fields in the `login`/`password` fields or in a json object with keys `mcd_id` and `mcd_token` in the `extra` field. Here's our code:
```
...
connection = self.get_connection(self.mcd_session_conn_id)
connection_extra = connection.extra_dejson
try:
return Session(
mcd_id=connection.login or connection_extra['mcd_id'],
mcd_token=connection.password or connection_extra['mcd_token'],
**self._get_session_extra(connection)
)
except KeyError as err:
raise AirflowException(f'Missing expected key {err} from connection extra.')
```
In Airflow 2.5.2 this works fine. I can provide the fields in the Airflow UI in either `login`/`password` or `extra` as expected.
However, in Airflow 2.6.1 this stopped working. I can supply the fields in `login`/`password` but when I provide them in `extra` I now get an error.
<img width="523" alt="image" src="https://github.com/apache/airflow/assets/6411855/e04a9c1d-cef9-4f56-8e66-96a9413a9268">
Inspecting the web request I see that the `extra` field is empty, even though I have data in there:
```json
{
"connection_id": "",
"conn_type": "mcd",
"extra": "{}"
}
```
<img width="457" alt="image" src="https://github.com/apache/airflow/assets/6411855/d6bab951-5d03-4695-a397-8bf6989d93a7">
I can reproduce this issue with the `http` connection type as well.
I saw [this issue](https://github.com/apache/airflow/issues/31330#issuecomment-1558315370) which seems related. It was closed because the opener worked around the issue by creating the connection in code instead of the Airflow UI.
I couldn't find any other issues mentioning this problem.
### What you think should happen instead
The `extra` field should be included in the connection created request.
### How to reproduce
Create an `http` connection in the Airflow UI using at least version 2.6.1. Put any value in the `extra` field and test the connection while inspecting the network request. Notice that the `extra` field value is not supplied in the request.
### Operating System
N/A
### Versions of Apache Airflow Providers
N/A
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] pankajkoti commented on issue #32890: Airflow UI ignoring extra connection field during test connection
Posted by "pankajkoti (via GitHub)" <gi...@apache.org>.
pankajkoti commented on issue #32890:
URL: https://github.com/apache/airflow/issues/32890#issuecomment-1662070475
Reopening this as the fix was reverted in https://github.com/apache/airflow/pull/33032
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Airflow UI ignoring extra connection field during test connection [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #32890: Airflow UI ignoring extra connection field during test connection
URL: https://github.com/apache/airflow/issues/32890
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal closed issue #32890: Airflow UI ignoring extra connection field during test connection
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #32890: Airflow UI ignoring extra connection field during test connection
URL: https://github.com/apache/airflow/issues/32890
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Airflow UI ignoring extra connection field during test connection [airflow]
Posted by "vchiapaikeo (via GitHub)" <gi...@apache.org>.
vchiapaikeo commented on issue #32890:
URL: https://github.com/apache/airflow/issues/32890#issuecomment-1774688409
Happy to take a second look at this. Feel free to assign.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #32890: Airflow UI ignoring extra connection field during test connection
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #32890:
URL: https://github.com/apache/airflow/issues/32890#issuecomment-1654104899
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org