Lee-W commented on code in PR #59339:
URL: https://github.com/apache/airflow/pull/59339#discussion_r2626174989
##########
airflow-core/src/airflow/models/connection.py:
##########
@@ -331,14 +335,23 @@ def get_uri(self) -> str:
if self.extra:
try:
- query: str | None = urlencode(self.extra_dejson)
- except TypeError:
- query = None
- if query and self.extra_dejson == dict(parse_qsl(query,
keep_blank_values=True)):
- uri += ("?" if self.schema else "/?") + query
- else:
+ extra_dict = self.extra_dejson
+ can_flatten = True
+ for _, value in extra_dict.items():
Review Comment:
```suggestion
for value in extra_dict.values():
```
##########
airflow-core/src/airflow/models/connection.py:
##########
@@ -252,6 +251,11 @@ def _parse_from_uri(self, uri: str):
if self.EXTRA_KEY in query:
self.extra = query[self.EXTRA_KEY]
else:
+ for key, value in query.items():
+ try:
+ query[key] = json.loads(value)
+ except (JSONDecodeError, TypeError):
+ pass
Review Comment:
Worth adding a log here. probably debug or info
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]