Skip to content

bug: Traceback in UI if URL does not contain a a tag #230

Closed

Description

@esnible

Describe the bug

To reproduce, go to http://kagenti-ui.localtest.me:8080/Import_New_Tool and Deploy from Existing Image.
For the image, choose mcp-test2.

The UI displays a traceback:

ValueError: URL must contain a tag (e.g., :latest)
Traceback:
File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 121, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 643, in code_to_exec
    _mpa_v1(self._main_script_path)
File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 164, in _mpa_v1
    page.run()
File "/app/.venv/lib/python3.12/site-packages/streamlit/navigation/page.py", line 297, in run
    exec(code, module.__dict__)
File "/app/pages/05_Import_New_Tool.py", line 36, in <module>
    render_import_form(
File "/app/lib/build_utils.py", line 1616, in render_import_form
    _repo, resource_name, _tag = parse_image_url(docker_image_url)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/build_utils.py", line 1649, in parse_image_url
    raise ValueError("URL must contain a tag (e.g., :latest)")

The UI should never display tracebacks.

Steps To Reproduce

To reproduce, go to http://kagenti-ui.localtest.me:8080/Import_New_Tool and Deploy from Existing Image.
For the image, choose mcp-test2.

Another way to reproduce is to use mcp-test2:latest for the image. In this case, the error is ValueError: URL must contain at least a repo and image name. This surprised me, because my Docker image was built without a repo and loaded onto the cluster with kind load -n agent-platform docker-image mcp-test2

Expected Behavior

A nicely formatted message, or default of ":latest" if no version is specified.

Additional Context

No response

cc @Alan-Cha

Activity

  1. added
    bug
    on Oct 1, 2025
  2. esnible commented on Oct 23, 2025

    @esnible
    MemberAuthor

    Similar problem if the image is trpc-reverse:v0.0.1.

    @cwiklik what are the rules for the image name used by the Kagenti operator? The code in build_utils.py shows the resource body being built with "imageRegistry": image_registry_prefix, but I don't know if it can be blank/null.

    ValueError: URL must contain at least a repo and image name
    Traceback:
    File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 121, in exec_func_with_error_handling
        result = func()
                 ^^^^^^
    File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 643, in code_to_exec
        _mpa_v1(self._main_script_path)
    File "/app/.venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 164, in _mpa_v1
        page.run()
    File "/app/.venv/lib/python3.12/site-packages/streamlit/navigation/page.py", line 297, in run
        exec(code, module.__dict__)
    File "/app/pages/04_Import_New_Agent.py", line 39, in <module>
        render_import_form(
    File "/app/lib/build_utils.py", line 1714, in render_import_form
        _repo, resource_name, _tag = parse_image_url(docker_image_url)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/lib/build_utils.py", line 1875, in parse_image_url
        raise ValueError("URL must contain at least a repo and image name")
    
  3. esnible commented on Oct 23, 2025

    @esnible
    MemberAuthor

    Note that the tag problem originally reported has been fixed by #256 . We should either close this issue or expand it to cover UI tracebacks when the container image URL does not include a repo/host.

  4. esnible commented on Oct 29, 2025

    @esnible
    MemberAuthor

    CAN WE RAISE THE PRIORITY OF THIS ISSUE? Or is there some docs or a work-around? I would like to be able to deploy container images on Kagenti!

  5. pdettori commented on Oct 29, 2025

    @pdettori
    Member

    @esnible seems like this is a blocker for your use case - can you clarify what the blocking issue is about ? the issue initially talk about "A nicely formatted message, or default of ":latest" if no version is specified"

  6. esnible commented on Oct 29, 2025

    @esnible
    MemberAuthor

    Closing in favor of #364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions