feedback-to-code/mozzarella huggingface dataset:
Repository: kestra-io/kestra
Issue: Flow task error message when not found
Labels: bug

### Explain the bug

It displays namespace.taskId instead of namespace.flowId in the error message

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/core/src/main/java/io/kestra/core/tasks/flows/Flow.java b/core/src/main/java/io/kestra/core/tasks/flows/Flow.java
index 1869e6d99e..cedce2ebb7 100644
--- a/core/src/main/java/io/kestra/core/tasks/flows/Flow.java
+++ b/core/src/main/java/io/kestra/core/tasks/flows/Flow.java
@@ -143,7 +143,7 @@ public Execution createExecution(RunContext runContext, FlowExecutorInterface fl
             flowVars.get("namespace"),
             flowVars.get("id")
         )
-            .orElseThrow(() -> new IllegalStateException("Unable to find flow '" + namespace + "." + id + "' with revision + '" + revision + "'"));
+            .orElseThrow(() -> new IllegalStateException("Unable to find flow '" + namespace + "'.'" + flowId + "' with revision + '" + revision + "'"));
 
         if (flow.isDisabled()) {
             throw new IllegalStateException("Cannot execute disabled flow");


Test patch:
Repository: kestra-io/kestra
Issue: DBT subtasks logs don't have icon
Labels: bug

### Explain the bug

![image](https://github.com/kestra-io/kestra/assets/37618489/4918d457-aa68-47f5-afae-44a984b49a3b)

Should fallback on the parentTaskRunId when retrieving icon if we don't have an actual task linked

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/logs/LogList.vue b/ui/src/components/logs/LogList.vue
index 3e0fd8a5f2..bfd453518f 100644
--- a/ui/src/components/logs/LogList.vue
+++ b/ui/src/components/logs/LogList.vue
@@ -10,8 +10,8 @@
                             class="task-icon me-1"
                         >
                             <task-icon
-                                :cls="taskIcon(currentTaskRun.taskId)"
-                                v-if="taskIcon(currentTaskRun.taskId)"
+                                :cls="taskIcon(currentTaskRun)"
+                                v-if="taskIcon(currentTaskRun)"
                                 only-icon
                             />
                         </div>
@@ -550,9 +550,13 @@
             uniqueTaskRunDisplayFilter(currentTaskRun) {
                 return !(this.taskRunId && this.taskRunId !== currentTaskRun.id);
             },
-            taskIcon(taskId) {
-                let findTaskById = FlowUtils.findTaskById(this.flow, taskId);
-                return findTaskById ? findTaskById.type : undefined;
+            taskIcon(taskRun) {
+                const task = FlowUtils.findTaskById(this.flow, taskRun.taskId);
+                const parentTaskRunId = taskRun.parentTaskRunId;
+                if(task === undefined && parentTaskRunId) {
+                    return this.taskIcon(this.taskRunById[parentTaskRunId])
+                }
+                return task ? task.type : undefined;
             },
             loadLogs(executionId) {
                 this.$store.dispatch("execution/loadLogsNoCommit", {


Test patch:
Repository: kestra-io/kestra
Issue: Home Dashboard: unresponsive display of tiles displaying the number of Successful, Failed and Running Executions
Labels: bug
frontend

### Expected Behavior

_No response_

### Actual Behaviour

Display is not responsive for digits in dashboard
![image](https://github.com/kestra-io/kestra/assets/46634684/83a11b25-5420-4989-8011-08a38ecce9d5)
![image](https://github.com/kestra-io/kestra/assets/46634684/741f3631-6c3e-4067-9206-4a10bae6999e)



### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version:
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:
Video showing the issue: https://share.descript.com/view/bgxZPEqDn55 

The entire tile displaying those numbers would need to be adjusted based on the screen resolution

Pull request review comments:
Please remove any mb / me & use 
```
column-gap: calc(var(--spacer) * 1.5);
row-gap: calc(var(--spacer) / 2);
```

Patch that resolved the issue:
diff --git a/ui/src/components/home/HomeSummaryStatusLabel.vue b/ui/src/components/home/HomeSummaryStatusLabel.vue
index c634272b26..7d7ffc65c2 100644
--- a/ui/src/components/home/HomeSummaryStatusLabel.vue
+++ b/ui/src/components/home/HomeSummaryStatusLabel.vue
@@ -1,12 +1,12 @@
 <template>
     <div class="list">
         <template v-for="[status, count] of sorted">
-            <div v-if="count > 0" :key="status" class="d-flex w-100 justify-content-between mb-2">
-                <div class="me-4 icon">
+            <div v-if="count > 0" :key="status" class="d-flex justify-content-around mb-4 column-gap-4 row-gap-2 flex-wrap">
+                <div class="icon">
                     <status :label="false" :status="status" />
                 </div>
 
-                <div class="me-4 center">
+                <div class="center">
                     <h6>
                         {{ status.toLowerCase().capitalize() }}
                     </h6>
@@ -15,7 +15,7 @@
                     </div>
                 </div>
 
-                <div class="big-number">
+                <div class="big-number text-break">
                     {{ count }}
                 </div>
             </div>
@@ -84,11 +84,9 @@
 
             .big-number {
                 vertical-align: middle;
-                font-size: 150%;
                 font-weight: bold;
             }
         }
     }
-
 </style>
 


Test patch:
Repository: kestra-io/kestra
Issue: New execution-Prefill treats empty inputs as `"null"` values
Labels: bug

### Explain the bug

Starting a new execution using _New execution - Prefill_ provides the literal value `"null"` for blank inputs - optional inputs with no default value. This leads to unexpected consequences during flow logic execution.

Request body using _New execution - Prefill_:
```
-----------------------------427174669639266022113998627081
Content-Disposition: form-data; name="foo"

null
-----------------------------427174669639266022113998627081--
```

Request body using just _New execution_:

```
-----------------------------120578406022738925912912645969--
```

Example flow:
```
id: hello-world-inputs
namespace: dev

inputs:
  - name: foo
    type: STRING
    required: false

tasks:
  - id: valid-value-or-not
    type: io.kestra.core.tasks.log.Log
    message: "{{ inputs.foo ?? inputs.foo ?? 'no valid value' }}"
```

### Environment Information

- Kestra Version: 0.12.0 as of Sep 26th 2023
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/flows/FlowRun.vue b/ui/src/components/flows/FlowRun.vue
index a66721107d..f36eefcf1e 100644
--- a/ui/src/components/flows/FlowRun.vue
+++ b/ui/src/components/flows/FlowRun.vue
@@ -86,6 +86,7 @@
                 :label="$t('execution labels')"
             >
                 <label-input
+                    :key="executionLabels"
                     v-model:labels="executionLabels"
                 />
             </el-form-item>
@@ -196,9 +197,15 @@
                                 inputValue = JSON.stringify(inputValue).toString()
                             }
 
+                            if(inputValue === null) {
+                                inputValue = undefined;
+                            }
+
                             return [inputName, inputValue]
                         })
                 );
+                // add all labels except the one from flow to prevent duplicates
+                this.executionLabels = this.execution.labels.filter(label => !this.flow.labels.some(flowLabel => flowLabel.key === label.key && flowLabel.value === label.value));
             },
             onSubmit(formRef) {
                 if (this.$tours["guidedTour"].isRunning.value) {


Test patch:
Repository: kestra-io/kestra
Issue: New execution-Prefill doesn't prefill the Execution labels
Labels: bug

### Explain the bug

Using the _New execution-Prefill_ is designed to easily allow starting a new execution using selected execution with modified "input set". The "set" includes both flow inputs and execution labels.

The labels are currently not prefilled. This leads to errors due to mislabeled executions.

### Environment Information

- Kestra Version: 0.12.0 as of Sep 26th 2023
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/flows/FlowRun.vue b/ui/src/components/flows/FlowRun.vue
index a66721107d..f36eefcf1e 100644
--- a/ui/src/components/flows/FlowRun.vue
+++ b/ui/src/components/flows/FlowRun.vue
@@ -86,6 +86,7 @@
                 :label="$t('execution labels')"
             >
                 <label-input
+                    :key="executionLabels"
                     v-model:labels="executionLabels"
                 />
             </el-form-item>
@@ -196,9 +197,15 @@
                                 inputValue = JSON.stringify(inputValue).toString()
                             }
 
+                            if(inputValue === null) {
+                                inputValue = undefined;
+                            }
+
                             return [inputName, inputValue]
                         })
                 );
+                // add all labels except the one from flow to prevent duplicates
+                this.executionLabels = this.execution.labels.filter(label => !this.flow.labels.some(flowLabel => flowLabel.key === label.key && flowLabel.value === label.value));
             },
             onSubmit(formRef) {
                 if (this.$tours["guidedTour"].isRunning.value) {


Test patch:
Repository: kestra-io/kestra
Issue: Running executions are not shown with default date filter
Labels: bug

### Explain the bug

Due to end date filter, we should remove it

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:
Can I offer a PR ?
@aballiet To fix that we need to remove the forced `endDate`, you can give it a try.
Later we plan on improving the way the date filter works.
In the end, I will not have the time to do it. I let you @Skraye 👍 

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/executions/Executions.vue b/ui/src/components/executions/Executions.vue
index 6cb6dc08ca..1b6fb23df1 100644
--- a/ui/src/components/executions/Executions.vue
+++ b/ui/src/components/executions/Executions.vue
@@ -286,7 +286,7 @@
             endDate() {
                 // used to be able to force refresh the base interval when auto-reloading
                 this.recomputeInterval;
-                return this.$route.query.endDate ? this.$route.query.endDate : this.$moment().toISOString(true);
+                return this.$route.query.endDate ? this.$route.query.endDate : undefined;
             },
             startDate() {
                 // used to be able to force refresh the base interval when auto-reloading
diff --git a/ui/src/components/logs/LogsWrapper.vue b/ui/src/components/logs/LogsWrapper.vue
index 81dc5c72d7..929dcce440 100644
--- a/ui/src/components/logs/LogsWrapper.vue
+++ b/ui/src/components/logs/LogsWrapper.vue
@@ -107,7 +107,7 @@
             endDate() {
                 // used to be able to force refresh the base interval when auto-reloading
                 this.recomputeInterval;
-                return this.$route.query.endDate ? this.$route.query.endDate : this.$moment().toISOString(true);
+                return this.$route.query.endDate ? this.$route.query.endDate : undefined;
             },
             startDate() {
                 // used to be able to force refresh the base interval when auto-reloading


Test patch:
Repository: kestra-io/kestra
Issue: Failing task with error handler in a DAG will hang forever leading to zombie execution
Labels: bug
backend

### Expected Behavior

_No response_

### Actual Behaviour

See https://demo.kestra.io/ui/executions/io.kestra.bmu/dag-test-error/2lJMuZsJdIvt7GqobvxeQR/gantt
It only happens if we add an error handler, without it a failing task will stop the execution properly

### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.12.0-SNAPSHOT
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

```
id: dag-test-error
namespace: io.kestra.bmu
tasks:
- id: dag
  type: io.kestra.core.tasks.flows.Dag
  tasks:
  - task:
      id: Log
      type: io.kestra.core.tasks.log.Log
      message: Some log
    dependsOn:
    - failing
  - task:
      id: failing
      type: io.kestra.core.tasks.executions.Fail
  errors:
  - id: error
    type: io.kestra.core.tasks.log.Log
    message: error handler
```

Issue comments:

Pull request review comments:
You can use `.map(...).orElse()` it would be more compact
You can use `.map(...).orElse()` it would be more compact

Patch that resolved the issue:
diff --git a/core/src/main/java/io/kestra/core/runners/FlowableUtils.java b/core/src/main/java/io/kestra/core/runners/FlowableUtils.java
index 9f50132f3b..419d5de819 100644
--- a/core/src/main/java/io/kestra/core/runners/FlowableUtils.java
+++ b/core/src/main/java/io/kestra/core/runners/FlowableUtils.java
@@ -15,7 +15,6 @@
 
 import java.util.*;
 import java.util.function.BiFunction;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -166,7 +165,8 @@ public static List<NextTaskRun> resolveDagNexts(
     ) {
         return resolveParallelNexts(
             execution,
-            tasks, errors,
+            tasks,
+            errors,
             parentTaskRun,
             concurrency,
             (nextTaskRunStream, taskRuns) -> nextTaskRunStream
@@ -180,8 +180,8 @@ public static List<NextTaskRun> resolveDagNexts(
                             .equals(task.getId())
                         )
                         .findFirst()
-                        .get()
-                        .getDependsOn();
+                        .map(Dag.DagTask::getDependsOn)
+                        .orElse(null);
 
                     // Check if have no dependencies OR all dependencies are terminated
                     return taskDependIds == null ||


Test patch:
Repository: kestra-io/kestra
Issue: Bad usage of path instead of route
Labels: bug

### Explain the bug

Route should be use instead of path
![image](https://github.com/kestra-io/kestra/assets/37600690/6ecbf063-758a-4fe4-a249-abc03e13de8c)


### Environment Information

0.13.0

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/override/components/LeftMenu.vue b/ui/src/override/components/LeftMenu.vue
index 173ee29bfd..04823a82ea 100644
--- a/ui/src/override/components/LeftMenu.vue
+++ b/ui/src/override/components/LeftMenu.vue
@@ -206,7 +206,7 @@
                                 }
                             },
                             {
-                                href: "/admin/workers",
+                                href: {name: "admin/workers"},
                                 title: this.$t("workers"),
                                 icon: {
                                     element: AccountHardHatOutline,


Test patch:
Repository: kestra-io/kestra
Issue: [UI] Something broke Cross-flow dependency view 
Labels: bug
frontend

### Explain the bug

![image](https://github.com/kestra-io/kestra/assets/86264395/a6ab5d25-e7e1-4dae-b06b-17ab0e5c7185)

![image](https://github.com/kestra-io/kestra/assets/86264395/7c98fd58-d592-4e0b-b379-ccdf24427ac7)


### Environment Information

- Kestra Version: 0.13.0
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/package-lock.json b/ui/package-lock.json
index 30d9fe71db..12a32910d5 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -8,7 +8,7 @@
       "name": "kestra",
       "version": "0.1.0",
       "dependencies": {
-        "@kestra-io/ui-libs": "^0.0.28",
+        "@kestra-io/ui-libs": "^0.0.29",
         "@popperjs/core": "npm:@sxzz/popperjs-es@2.11.7",
         "@vue-flow/background": "^1.2.0",
         "@vue-flow/controls": "1.0.6",
@@ -630,9 +630,9 @@
       "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
     },
     "node_modules/@kestra-io/ui-libs": {
-      "version": "0.0.28",
-      "resolved": "https://registry.npmjs.org/@kestra-io/ui-libs/-/ui-libs-0.0.28.tgz",
-      "integrity": "sha512-Hvi8ACLElFdP9NDbl1o5o99sbQkxDb6YGWSx3ITLCYBGPjxjEMdl5lDbgCE0uAgTzfebbjKDwAIiBh74LVJSXw==",
+      "version": "0.0.29",
+      "resolved": "https://registry.npmjs.org/@kestra-io/ui-libs/-/ui-libs-0.0.29.tgz",
+      "integrity": "sha512-ZVWQ5k1M0C4ZMCoparMBAOWdtQ0CMKaDdeQz8y/yqNKxtekGl3bOnSFvzwTotGzHhjC+6B77192IgefQTp9faw==",
       "peerDependencies": {
         "@vue-flow/background": "^1.2.0",
         "@vue-flow/controls": "1.0.6",
diff --git a/ui/package.json b/ui/package.json
index c3cba2e1ae..2e4ba93407 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -11,7 +11,7 @@
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path ../.gitignore"
   },
   "dependencies": {
-    "@kestra-io/ui-libs": "^0.0.28",
+    "@kestra-io/ui-libs": "^0.0.29",
     "@popperjs/core": "npm:@sxzz/popperjs-es@2.11.7",
     "@vue-flow/background": "^1.2.0",
     "@vue-flow/controls": "1.0.6",


Test patch:
Repository: kestra-io/kestra
Issue: Different failed execution count on the Homepage dashboard
Labels: bug
frontend

### Explain the bug

For example, on the demo, when filtering on 7 days.

On the homepage dashboard, execution count is 31147
![image](https://github.com/kestra-io/kestra/assets/1819009/bb7692ee-6e48-4185-a43e-7fa0c52045f4)

But the failed execution widget shows more than 10000 failed execution
![image](https://github.com/kestra-io/kestra/assets/1819009/90330409-cc2a-468e-b102-ca49319174ee)

And same for the execution page when listing only FAILED execution
![image](https://github.com/kestra-io/kestra/assets/1819009/af964b77-17d0-44b9-8f68-83cbb1162645)



### Environment Information

- Kestra Version: 0.13.0-SNAPSHOT
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:
related to https://github.com/kestra-io/kestra/issues/2383

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/home/Home.vue b/ui/src/components/home/Home.vue
index 7d24d7e804..6e0aef1777 100644
--- a/ui/src/components/home/Home.vue
+++ b/ui/src/components/home/Home.vue
@@ -258,8 +258,8 @@
                         let sorted = data.sort((a, b) => {
                             return new Date(b.date) - new Date(a.date);
                         });
-                        this.today = sorted.shift();
-                        this.yesterday = sorted.shift();
+                        this.today = sorted.at(sorted.length - 1);
+                        this.yesterday = sorted.length >= 2 ? sorted.at(sorted.length - 2) : {};
                         this.alls = this.mergeStats(sorted);
                         this.dailyReady = true;
                     });


Test patch:
Repository: kestra-io/kestra
Issue: Add the Python Kestra library to the Kestra full image
Labels: enhancement

### Feature description

The Kestra full image installs binaries (python3 python3-venv python-is-python3 nodejs npm curl zip unzip) and all plugins but not the Kestra library.
User that wanted to use the Python tasks with the PROCESS runner will need to install it (or use a custom Kestra image).

If possible, we should install the Kestra Python library inside the Kestra full image.

Issue comments:
Hi,
we have very simple Python scripts, like for example parsing the date or creating an s3 bucket path from different variables and we are trying to do that in python script and run it as a PROCESS. The only thing that we are missing is the Kestra library on our runtime environment and we would expect that Kestra will have Kestra in it environment.

Pull request review comments:

Patch that resolved the issue:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bd2ca58288..1ae79840ec 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -157,6 +157,7 @@ jobs:
           - name: ""
             plugins: ""
             packages: ""
+            python-libs: ""
           - name: "-full"
             plugins: >-
               io.kestra.plugin:plugin-airbyte:LATEST
@@ -231,7 +232,8 @@ jobs:
               io.kestra.storage:storage-gcs:LATEST
               io.kestra.storage:storage-minio:LATEST
               io.kestra.storage:storage-s3:LATEST
-            packages: python3 python3-venv python-is-python3 nodejs npm curl zip unzip
+            packages: python3 python3-venv python-is-python3 python3-pip nodejs npm curl zip unzip
+            python-libs: kestra
     steps:
       - uses: actions/checkout@v4
 
@@ -293,6 +295,7 @@ jobs:
           build-args: |
             KESTRA_PLUGINS=${{ steps.vars.outputs.plugins }}
             APT_PACKAGES=${{ matrix.image.packages }}
+            PYTHON_LIBRARIES=${{ matrix.image.python-libs }}
 
   maven:
     name: Publish to Maven
diff --git a/Dockerfile b/Dockerfile
index dfdfdbacc7..d332ef30a7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,6 +2,7 @@ FROM eclipse-temurin:17-jre
 
 ARG KESTRA_PLUGINS=""
 ARG APT_PACKAGES=""
+ARG PYTHON_LIBRARIES=""
 
 WORKDIR /app
 
@@ -16,6 +17,7 @@ RUN apt-get update -y && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* && \
     if [ -n "${KESTRA_PLUGINS}" ]; then /app/kestra plugins install ${KESTRA_PLUGINS} && rm -rf /tmp/*; fi && \
+    if [ -n "${PYTHON_LIBRARIES}" ]; then pip install ${PYTHON_LIBRARIES}; fi && \
     chown -R kestra:kestra /app
 
 USER kestra


Test patch:
Repository: kestra-io/kestra
Issue: [UI] Topology form shows an error message about any trigger added from the form as invalid trigger type
Labels: bug
frontend

### Explain the bug

![image](https://github.com/kestra-io/kestra/assets/86264395/67f878ba-d441-48f5-8508-a564a1d0d6cb)

the flow can be saved and everything works fine, only UI form shows this error 

## Reproducer

any flow - just add a trigger from the UI

```yaml
id: hello-world
namespace: dev
tasks:
  - id: hello
    type: io.kestra.core.tasks.log.Log
    message: Kestra team wishes you a great day! 👋
triggers:
  - id: everyMin
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "*/1 * * * *"
```


### Environment Information

- Kestra Version: 0.13.0
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:
Just checked and the validation error is triggered for all triggers so apparently editing any type of trigger shows this error.

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/inputs/LowCodeEditor.vue b/ui/src/components/inputs/LowCodeEditor.vue
index 6356afe52a..5463c9b339 100644
--- a/ui/src/components/inputs/LowCodeEditor.vue
+++ b/ui/src/components/inputs/LowCodeEditor.vue
@@ -332,7 +332,7 @@
             is-hidden
             :emit-task-only="true"
             class="node-action"
-            :section="SECTIONS.TASKS"
+            :section="taskEditData?.section"
             :task="taskObject"
             :flow-id="flowId"
             size="small"


Test patch: