amoghrajesh commented on code in PR #53082:
URL: https://github.com/apache/airflow/pull/53082#discussion_r2216033879
##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -1633,12 +1633,18 @@ def supervise(
:param subprocess_logs_to_stdout: Should task logs also be sent to stdout
via the main logger.
:param client: Optional preconfigured client for communication with the
server (Mostly for tests).
:return: Exit code of the process.
+ :raises ValueError: If server URL is empty or invalid.
"""
# One or the other
from airflow.sdk.execution_time.secrets_masker import reset_secrets_masker
- if not client and ((not server) ^ dry_run):
- raise ValueError(f"Can only specify one of {server=} or {dry_run=}")
+ if not client:
+ if dry_run and server:
+ raise ValueError(f"Can only specify one of {server=} or
{dry_run=}")
+ if not dry_run and (not server or not server.startswith(("http://",
"https://"))):
Review Comment:
Fair, handled the parsing, protocol, scheme: 6352005679
--
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]