Skip to content

Commit

Permalink
[Application] Log a warning when building image without command entry…
Browse files Browse the repository at this point in the history
…point (#5672)
  • Loading branch information
alonmr committed Jun 2, 2024
1 parent f79df3c commit f869a55
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mlrun/runtimes/nuclio/application/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
APIGatewaySpec,
)
from mlrun.runtimes.nuclio.function import NuclioSpec, NuclioStatus
from mlrun.utils import logger


class ApplicationSpec(NuclioSpec):
Expand Down Expand Up @@ -447,6 +448,14 @@ def _build_application_image(
mlrun_version_specifier=None,
show_on_failure: bool = False,
):
if not self.spec.command:
logger.warning(
"Building the application image without a command. "
"Use spec.command and spec.args to specify the application entrypoint",
command=self.spec.command,
args=self.spec.args,
)

with_mlrun = self._resolve_build_with_mlrun(with_mlrun)
return self._build_image(
builder_env=builder_env,
Expand Down

0 comments on commit f869a55

Please sign in to comment.