atul-astronomer opened a new issue, #48390:
URL: https://github.com/apache/airflow/issues/48390
### Apache Airflow version
main (development)
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
Not able to create a connection via CLI with argument '--conn-uri'
airflow connections add xyz --conn-uri xyz_uri
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 10, in <module>
sys.exit(main())
File "/opt/airflow/airflow-core/src/airflow/__main__.py", line 58, in main
args.func(args)
File "/opt/airflow/airflow-core/src/airflow/cli/cli_config.py", line 49,
in command
return func(*args, **kwargs)
File "/opt/airflow/airflow-core/src/airflow/utils/cli.py", line 94, in
wrapper
metrics = _build_metrics(f.__name__, args[0])
File "/opt/airflow/airflow-core/src/airflow/utils/cli.py", line 186, in
_build_metrics
netloc,
UnboundLocalError: local variable 'netloc' referenced before assignment
### What you think should happen instead?
_No response_
### How to reproduce
Run the CLI command to create a connection with argument --conn-uri
**airflow connections add xyz --conn-uri xyz_uri**
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]