boomerang-io / community

The Boomerang community, roadmap, planning, and architecture repository. The central place for information on joining, contributing, and governance.
https://useboomerang.io
Apache License 2.0
11 stars 0 forks source link

IndexOutOfBounds on viewing log of task that had error creating #289

Closed tlawrie closed 2 years ago

tlawrie commented 2 years ago

Describe the bug

When a task has an error spinning up, you can still request the log from the front end.

Using the default Kubernetes Log retrieval option causes an IndexOutOfBounds if the task hasn't successfully been creating in Tekton

What project does this issue relate to?

Boomerang Flow

To Reproduce

  1. Run a workflow with at least 1 task
  2. Task cannot spin up due to various issues such as invalid rights
  3. Attempt to view the tasks log in the activity window

Environment

Flow 3.4.1 on GCP 1.20

Additional Contenxt

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
    at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) ~[?:?]
    at java.util.Objects.checkIndex(Objects.java:372) ~[?:?]
    at java.util.ArrayList.get(ArrayList.java:458) ~[?:?]
    at io.boomerang.kube.service.LogKubeServiceImpl.streamPodLog(LogKubeServiceImpl.java:63) ~[classes!/:2.4.3]
    at io.boomerang.service.LogServiceImpl.streamLogForTask(LogServiceImpl.java:60) ~[classes!/:2.4.3]
    at io.boomerang.controller.LogController.streamLogForTask(LogController.java:28) ~[classes!/:2.4.3]
tlawrie commented 2 years ago

Fixed in 6.4.5