You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vatsrahul1001 (via GitHub)" <gi...@apache.org> on 2025/03/26 13:30:45 UTC

[PR] Fix: Handle Invalid --conn-uri Gracefully in CLI [airflow]

vatsrahul1001 opened a new pull request, #48398:
URL: https://github.com/apache/airflow/pull/48398

   This PR improves the handling of invalid --conn-uri values in the Airflow CLI. Previously, providing an invalid URI (e.g., testing) would cause a failure due to netloc being unset.
   
   closes: [#ISSUE](https://github.com/apache/airflow/issues/48390)
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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: [PR] Fix: Handle Invalid --conn-uri Gracefully in CLI [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #48398:
URL: https://github.com/apache/airflow/pull/48398#discussion_r2014159308


##########
airflow-core/tests/unit/cli/commands/test_connection_command.py:
##########
@@ -334,6 +334,7 @@ def test_cli_connections_export_should_force_export_as_specified_format(self, tm
 
 
 TEST_URL = "postgresql://airflow:airflow@host:5432/airflow"
+INVALID_TEST_URL = "postgresql"

Review Comment:
   Where is this used?



-- 
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: [PR] Fix: Handle Invalid --conn-uri Gracefully in CLI [airflow]

Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on code in PR #48398:
URL: https://github.com/apache/airflow/pull/48398#discussion_r2014167901


##########
airflow-core/tests/unit/cli/commands/test_connection_command.py:
##########
@@ -334,6 +334,7 @@ def test_cli_connections_export_should_force_export_as_specified_format(self, tm
 
 
 TEST_URL = "postgresql://airflow:airflow@host:5432/airflow"
+INVALID_TEST_URL = "postgresql"

Review Comment:
   Yeah, we can remove this.



-- 
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: [PR] Fix: Handle Invalid --conn-uri Gracefully in CLI [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh merged PR #48398:
URL: https://github.com/apache/airflow/pull/48398


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