Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] KeyError: 'latestVersion' #478

Open
fabianvf opened this issue Nov 8, 2024 · 0 comments
Open

[bug] KeyError: 'latestVersion' #478

fabianvf opened this issue Nov 8, 2024 · 0 comments
Assignees

Comments

@fabianvf
Copy link
Contributor

fabianvf commented Nov 8, 2024

When the dependency agent ran, for whatever reason it was unable to get the expected metadata from the response.

TRACEBACK

Traceback (most recent call last):
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/main.py", line 172, in <module>
    main()
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/main.py", line 125, in main
    result = task_manager.execute_task(task)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/task_manager/task_manager.py", line 66, in execute_task
    result: TaskResult = agent.execute_task(self.rcm, task)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/task_runner/dependency/task_runner.py", line 61, in execute_task
    maven_dep_response = self._agent.execute(
                         ^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/agent/dependency_agent/dependency_agent.py", line 236, in execute
    result = _search_fqdn(a.code)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/agent/dependency_agent/util.py", line 44, in search_fqdn
    return search_fqdn_query(query)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fabian/projects/github.com/konveyor-ecosystem/kai/kai/reactive_codeplanner/agent/dependency_agent/util.py", line 38, in search_fqdn_query
    artifact_id=doc["a"], group_id=doc["g"], version=doc["latestVersion"]
                                                     ~~~^^^^^^^^^^^^^^^^^
KeyError: 'latestVersion'

LOGS

DEBUG - 2024-11-07 17:53:13,104 - kai.kai.reactive_codeplanner.task_manager.priority_queue - [   priority_queue.py:37   -                  pop()] - Popped task PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist> from priority 2 stack.
DEBUG - 2024-11-07 17:53:13,104 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:136  -        get_next_task()] - Popped task from stack: PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist>
DEBUG - 2024-11-07 17:53:13,104 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:206  -     should_skip_task()] - Should skip task PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist>: False
INFO - 2024-11-07 17:53:13,105 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:141  -        get_next_task()] - Yielding task: PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist>
INFO - 2024-11-07 17:53:13,105 - kai.__main__ - [             main.py:159  -  timed_get_next_task()] - PERFORMANCE: 25.444628 seconds to receive next task: PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist> (priority=1, depth=3)
INFO - 2024-11-07 17:53:13,105 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:63   -         execute_task()] - Executing task: PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist>
DEBUG - 2024-11-07 17:53:13,105 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:74   -   get_agent_for_task()] - Agent <kai.reactive_codeplanner.task_runner.dependency.task_runner.DependencyTaskRunner object at 0x7f287f5f53d0> can handle task PackageDoesNotExistError<loc=/home/fabian/projects/github.com/konveyor-ecosystem/kai/example/coolstore/src/main/java/com/redhat/coolstore/service/ShoppingCartOrderProcessor.java:13:35, message=package io.quarkus.qpid.jms.runtime does not exist>
INFO - 2024-11-07 17:53:13,105 - kai.kai.reactive_codeplanner.task_manager.task_manager - [     task_manager.py:65   -         execute_task()] - Agent selected for task: <kai.reactive_codeplanner.task_runner.dependency.task_runner.DependencyTaskRunner object at 0x7f287f5f53d0>
DEBUG - 2024-11-07 17:53:14,689 - kai.kai.reactive_codeplanner.agent.dependency_agent.dependency_agent - [ dependency_agent.py:232  -              execute()] - running search for FQDN

Additional info

It would probably be good to add some extra info in the dependency agent logging just so we can tell exactly what it's searching for/response it's getting in the debug logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants