Repository: konflux-ci/release-service-catalog
Pull request #846: fix(RELEASE-1475): handling of previousRelease
Author: login: scoheb
Labels: name: lgtm
Created: 2025-03-13T19:37:41Z | Merged: 2025-03-17T15:53:37Z

## Describe your changes
- handle previousRelease in collectors in case where the controller sets an empty value for the namespaced-name
- make the previousRelease json file available to collector implementations

## Relevant Jira
- [RELEASE-1475](https://issues.redhat.com//browse/RELEASE-1475)

## Checklist before requesting a review
- [X] I have marked as draft or added `do not merge` label if there's a dependency PR
  - If you want reviews on your draft PR, you can add reviewers or add the `release-service-maintainers` handle if you are unsure who to tag
- [X] My commit message includes `Signed-off-by: My name <email>`
- [X] I have bumped the task/pipeline version string and updated changelog in the relevant README
- [X] I read CONTRIBUTING.MD and [commit formatting](CONTRIBUTING.md#commit-message-formatting-and-standards)




Diff:
diff --git a/.github/scripts/install_crds.sh b/.github/scripts/install_crds.sh
index 8133499b88..38ec611c06 100755
--- a/.github/scripts/install_crds.sh
+++ b/.github/scripts/install_crds.sh
@@ -9,7 +9,7 @@
 install_appstudio_repo_crds () {
     git clone https://github.com/$1/$2
     pushd $2
-    kubectl apply -f config/crd/bases
+    kubectl create -f config/crd/bases
     popd
 }
 
diff --git a/pipelines/run-collectors/README.md b/pipelines/run-collectors/README.md
index b609da311a..a7f0db73cd 100644
--- a/pipelines/run-collectors/README.md
+++ b/pipelines/run-collectors/README.md
@@ -16,6 +16,8 @@ save the required resources to the workspace, execute the collectors, then updat
 | taskGitUrl                   | The url to the git repo where the release-service-catalog tasks to be used are stored                             | Yes      | https://github.com/konflux-ci/release-service-catalog.git    |
 | taskGitRevision              | The revision in the taskGitUrl repo to be used                                                                    | No       | -                                                            |
 
+## Changes in 0.4.0
+* Add previousReleasePath parameter to run-collectors task
 
 ## Changes in 0.3.0
 * Add new parameters to define the collectors repository and revision
diff --git a/pipelines/run-collectors/run-collectors.yaml b/pipelines/run-collectors/run-collectors.yaml
index ee7104fbda..f849c98c94 100644
--- a/pipelines/run-collectors/run-collectors.yaml
+++ b/pipelines/run-collectors/run-collectors.yaml
@@ -4,7 +4,7 @@ kind: Pipeline
 metadata:
   name: run-collectors
   labels:
-    app.kubernetes.io/version: "0.3.0"
+    app.kubernetes.io/version: "0.4.0"
   annotations:
     tekton.dev/pipelines.minVersion: "0.12.1"
     tekton.dev/tags: release
@@ -94,6 +94,8 @@ spec:
           value: $(params.collectorsRepositoryRevision)
         - name: resultsDir
           value: $(tasks.collect-collectors-resources.results.resultsDir)
+        - name: previousReleasePath
+          value: $(tasks.collect-collectors-resources.results.previousRelease)
       workspaces:
         - name: data
           workspace: release-workspace
diff --git a/tasks/collectors/collect-collectors-resources/README.md b/tasks/collectors/collect-collectors-resources/README.md
index 2729c882fa..1c4494cb72 100644
--- a/tasks/collectors/collect-collectors-resources/README.md
+++ b/tasks/collectors/collect-collectors-resources/README.md
@@ -18,5 +18,8 @@ A task result is returned for each resource with the relative path to the stored
 | collectorsResource     | The namespaced name of the resource that contains the collectors | No       | -             |
 | subdirectory           | Subdirectory inside the workspace to be used                     | Yes      | ""            |
 
+## Changes in 0.3.0
+* Handle the case where the previousRelease value is empty
+
 ## Changes in 0.2.0
-* Stop passing releasePlan and releasePlanAdmission and pass instead a reference to a resource
\ No newline at end of file
+* Stop passing releasePlan and releasePlanAdmission and pass instead a reference to a resource
diff --git a/tasks/collectors/collect-collectors-resources/collect-collectors-resources.yaml b/tasks/collectors/collect-collectors-resources/collect-collectors-resources.yaml
index 63ffbd9fc2..bbf8e01c9b 100644
--- a/tasks/collectors/collect-collectors-resources/collect-collectors-resources.yaml
+++ b/tasks/collectors/collect-collectors-resources/collect-collectors-resources.yaml
@@ -4,7 +4,7 @@ kind: Task
 metadata:
   name: collect-collectors-resources
   labels:
-    app.kubernetes.io/version: "0.2.0"
+    app.kubernetes.io/version: "0.3.0"
   annotations:
     tekton.dev/pipelines.minVersion: "0.12.1"
     tekton.dev/tags: release
@@ -72,7 +72,11 @@ spec:
 
         PREVIOUS_RELEASE_PATH="$(params.subdirectory)/previous_release.json"
         echo -n "$PREVIOUS_RELEASE_PATH" > "$(results.previousRelease.path)"
-        get-resource "release" "${PREVIOUS_RELEASE}" | tee "$(workspaces.data.path)/$PREVIOUS_RELEASE_PATH"
+        if [ -z "${PREVIOUS_RELEASE}" ]; then
+          echo -n "{}" | tee "$(workspaces.data.path)/$PREVIOUS_RELEASE_PATH"
+        else
+          get-resource "release" "${PREVIOUS_RELEASE}" | tee "$(workspaces.data.path)/$PREVIOUS_RELEASE_PATH"
+        fi
         
         RELEASE_PATH="$(params.subdirectory)/release.json"
         echo -n "$RELEASE_PATH" > "$(results.release.path)"
diff --git a/tasks/collectors/collect-collectors-resources/tests/test-collect-collectors-data-empty-previous-release-value.yaml b/tasks/collectors/collect-collectors-resources/tests/test-collect-collectors-data-empty-previous-release-value.yaml
new file mode 100644
index 0000000000..b07e773bd7
--- /dev/null
+++ b/tasks/collectors/collect-collectors-resources/tests/test-collect-collectors-data-empty-previous-release-value.yaml
@@ -0,0 +1,112 @@
+---
+apiVersion: tekton.dev/v1
+kind: Pipeline
+metadata:
+  name: test-collect-collectors-data-empty-previous-release-value
+spec:
+  description: |
+    Run the collect-collectors-resources task without a value for the PreviousRelease cr and verify that
+    the task succeeds as expected by producing an empty valid json file.
+  workspaces:
+    - name: tests-workspace
+  tasks:
+    - name: setup
+      taskSpec:
+        steps:
+          - name: create-crs
+            image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
+            script: |
+              #!/usr/bin/env bash
+              set -eux
+              
+              cat > release << EOF
+              apiVersion: appstudio.redhat.com/v1alpha1
+              kind: Release
+              metadata:
+                name: release-missing-cr-sample
+                namespace: default
+              spec:
+                snapshot: foo
+                releasePlan: foo
+              EOF
+              kubectl apply -f release
+
+              cat > releaseplan << EOF
+              apiVersion: appstudio.redhat.com/v1alpha1
+              kind: ReleasePlan
+              metadata:
+                name: releaseplan-missing-cr-sample
+                namespace: default
+              spec:
+                application: foo
+                target: foo
+              EOF
+              kubectl apply -f releaseplan
+    - name: run-task
+      taskRef:
+        name: collect-collectors-resources
+      params:
+        - name: previousRelease
+          value: ""
+        - name: release
+          value: default/release-missing-cr-sample
+        - name: collectorsResourceType
+          value: releaseplan
+        - name: collectorsResource
+          value: default/releaseplan-missing-cr-sample
+        - name: subdirectory
+          value: $(context.pipelineRun.uid)
+      runAfter:
+        - setup
+      workspaces:
+        - name: data
+          workspace: tests-workspace
+    - name: check-result
+      params:
+        - name: resultsDir
+          value: $(tasks.run-task.results.resultsDir)
+        - name: previousRelease
+          value: $(tasks.run-task.results.previousRelease)
+        - name: release
+          value: $(tasks.run-task.results.release)
+        - name: collectorsResource
+          value: $(tasks.run-task.results.collectorsResource)
+      workspaces:
+        - name: data
+          workspace: tests-workspace
+      runAfter:
+        - run-task
+      taskSpec:
+        params:
+          - name: resultsDir
+            type: string
+          - name: previousRelease
+            type: string
+          - name: release
+            type: string
+          - name: collectorsResource
+            type: string
+        workspaces:
+          - name: data
+        steps:
+          - name: check-result
+            image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
+            script: |
+              #!/usr/bin/env bash
+              set -eux
+
+              echo Test that previous Release CR json file is empty and saved workspace
+              test "$(jq -r '.' < "$(workspaces.data.path)/$(params.previousRelease)")" == "{}"
+
+  finally:
+    - name: cleanup
+      taskSpec:
+        steps:
+          - name: delete-crs
+            image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f
+            script: |
+              #!/usr/bin/env bash
+              set -eux
+
+              kubectl delete release release-missing-cr-sample
+              kubectl delete releaseplan releaseplan-missing-cr-sample
diff --git a/tasks/collectors/run-collectors/README.md b/tasks/collectors/run-collectors/README.md
index 7a031e7d51..998b9db1ee 100644
--- a/tasks/collectors/run-collectors/README.md
+++ b/tasks/collectors/run-collectors/README.md
@@ -5,13 +5,17 @@ one file per collector.
 
 ## Parameters
 
-| Name                         | Description                                                                             | Optional | Default value |
-|------------------------------|-----------------------------------------------------------------------------------------|----------|---------------|
-| collectorsPath               | Path to the JSON string of the resource containing the collectors in the data workspace | No       | -             |
-| collectorsResourceType       | The type of resource that contains the collectors                                       | No       | -             |
-| resultsDir                   | The relative path in the workspace to save the collector results to                     | No       | -             |
-| collectorsRepository         | Git repository where the collectors will be defined                                     | No       | -             |
-| collectorsRepositoryRevision | Git repository revision                                                                 | Yes      | main          |
+| Name                         | Description                                                                              | Optional | Default value |
+|------------------------------|------------------------------------------------------------------------------------------|----------|---------------|
+| collectorsPath               | Path to the JSON string of the resource containing the collectors in the data workspace  | No       | -             |
+| collectorsResourceType       | The type of resource that contains the collectors                                        | No       | -             |
+| resultsDir                   | The relative path in the workspace to save the collector results to                      | No       | -             |
+| collectorsRepository         | Git repository where the collectors will be defined                                      | No       | -             |
+| collectorsRepositoryRevision | Git repository revision                                                                  | Yes      | main          |
+| previousReleasePath          | Path to the json data file of the previous successful Release prior to the current one   | No       | -             |
+
+## Changes in 1.0.0
+* Add previousReleasePath parameter
 
 ## Changes in 0.3.0
 * Add new parameters to define the collectors repository and revision
diff --git a/tasks/collectors/run-collectors/run-collectors.yaml b/tasks/collectors/run-collectors/run-collectors.yaml
index fcfa85b185..2865205fcc 100644
--- a/tasks/collectors/run-collectors/run-collectors.yaml
+++ b/tasks/collectors/run-collectors/run-collectors.yaml
@@ -4,7 +4,7 @@ kind: Task
 metadata:
   name: run-collectors
   labels:
-    app.kubernetes.io/version: "0.3.0"
+    app.kubernetes.io/version: "1.0.0"
   annotations:
     tekton.dev/pipelines.minVersion: "0.12.1"
     tekton.dev/tags: release
@@ -28,6 +28,10 @@ spec:
       type: string
       default: main
       description: Git repository revision
+    - name: previousReleasePath
+      type: string
+      description:  >-
+        Path to the json data file of the previous successful Release prior to the current one
   workspaces:
     - name: data
       description: Workspace where the CRs are stored
@@ -45,6 +49,7 @@ spec:
         COLLECTORS_RESOURCE_TYPE="$(params.collectorsResourceType)"
         RESULTS_DIR="$(workspaces.data.path)/$(params.resultsDir)"
         CONCURRENT_LIMIT=4
+        PREVIOUS_RELEASE_FILE="$(workspaces.data.path)/$(params.previousReleasePath)"
 
         execute_collector() { # Expected arguments are [collector json, type of collector]
             collector="$1"
@@ -60,6 +65,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --previousRelease "${PREVIOUS_RELEASE_FILE}")
             # Execute collector
             timeout "$TIMEOUT" python3 "lib/${type}.py" "${ARGS[@]}" "${collector_type}" | tee \
               "$RESULTS_DIR"/"$2"-"$name".json
diff --git a/tasks/collectors/run-collectors/tests/mocks.sh b/tasks/collectors/run-collectors/tests/mocks.sh
index d950950cae..48b26a3a37 100644
--- a/tasks/collectors/run-collectors/tests/mocks.sh
+++ b/tasks/collectors/run-collectors/tests/mocks.sh
@@ -21,13 +21,15 @@ function timeout() {
   echo Mock timeout called with: $* >&2
   echo $* >> $(workspaces.data.path)/mock_timeout.txt
 
-  if [[ "$*" == *"python3 lib/dummy-collector.py --test-arg test-value tenant" ]]
+  if [[ "$*" == \
+    *"python3 lib/dummy-collector.py --test-arg test-value --previousRelease /workspace/data/previous_release.json tenant" ]]
   then
     echo '{"name": "dummy", "example-argument": "test-value", "issues": ["RELEASE-1", "RELEASE-2"]}'
     return
   fi
 
-  if [[ "$*" == *"python3 lib/parallel-collector.py --test-arg test-value tenant" ]]
+  if [[ "$*" == \
+    *"python3 lib/parallel-collector.py --test-arg test-value --previousRelease /workspace/data/previous_release.json tenant" ]]
   then
     date +%s >> $(workspaces.data.path)/parallel-time.txt
     sleep 5
@@ -36,7 +38,8 @@ function timeout() {
     return
   fi
 
-  if [[ "$*" == *"python3 lib/timeout-collector.py --test-arg test-value tenant" ]]
+  if [[ "$*" == \
+    *"python3 lib/timeout-collector.py --test-arg test-value --previousRelease /workspace/data/previous_release.json tenant" ]]
   then
     exit 124 # timeout exits 124 if it times out
   fi
diff --git a/tasks/collectors/run-collectors/tests/test-run-collectors-fail-no-results-dir.yaml b/tasks/collectors/run-collectors/tests/test-run-collectors-fail-no-results-dir.yaml
index 49afa8811e..ea01a03ff0 100644
--- a/tasks/collectors/run-collectors/tests/test-run-collectors-fail-no-results-dir.yaml
+++ b/tasks/collectors/run-collectors/tests/test-run-collectors-fail-no-results-dir.yaml
@@ -23,6 +23,8 @@ spec:
           value: releaseplan
         - name: resultsDir
           value: results
+        - name: previousReleasePath
+          value: previous_release.json
       workspaces:
         - name: data
           workspace: tests-workspace
diff --git a/tasks/collectors/run-collectors/tests/test-run-collectors-fail-timeout.yaml b/tasks/collectors/run-collectors/tests/test-run-collectors-fail-timeout.yaml
index 1c2ad070a0..4af883ddf5 100644
--- a/tasks/collectors/run-collectors/tests/test-run-collectors-fail-timeout.yaml
+++ b/tasks/collectors/run-collectors/tests/test-run-collectors-fail-timeout.yaml
@@ -52,6 +52,10 @@ spec:
                 }
               }
               EOF
+
+              cat > "$(workspaces.data.path)"/previous_release.json << EOF
+              {}
+              EOF
       workspaces:
         - name: data
           workspace: tests-workspace
@@ -67,6 +71,8 @@ spec:
           value: releaseplan
         - name: resultsDir
           value: results
+        - name: previousReleasePath
+          value: previous_release.json
       runAfter:
         - setup
       workspaces:
diff --git a/tasks/collectors/run-collectors/tests/test-run-collectors-no-resource.yaml b/tasks/collectors/run-collectors/tests/test-run-collectors-no-resource.yaml
index 3c8986ddb1..cb2c43855e 100644
--- a/tasks/collectors/run-collectors/tests/test-run-collectors-no-resource.yaml
+++ b/tasks/collectors/run-collectors/tests/test-run-collectors-no-resource.yaml
@@ -19,6 +19,10 @@ spec:
               set -eux
 
               mkdir "$(workspaces.data.path)"/results
+
+              cat > "$(workspaces.data.path)"/previous_release.json << EOF
+              {}
+              EOF
       workspaces:
         - name: data
           workspace: tests-workspace
@@ -34,6 +38,8 @@ spec:
           value: releaseplan
         - name: resultsDir
           value: results
+        - name: previousReleasePath
+          value: previous_release.json
       runAfter:
         - setup
       workspaces:
diff --git a/tasks/collectors/run-collectors/tests/test-run-collectors-parallel.yaml b/tasks/collectors/run-collectors/tests/test-run-collectors-parallel.yaml
index 3029e21bf5..12efbc2323 100644
--- a/tasks/collectors/run-collectors/tests/test-run-collectors-parallel.yaml
+++ b/tasks/collectors/run-collectors/tests/test-run-collectors-parallel.yaml
@@ -50,6 +50,10 @@ spec:
                 }
               }
               EOF
+
+              cat > "$(workspaces.data.path)"/previous_release.json << EOF
+              {}
+              EOF
       workspaces:
         - name: data
           workspace: tests-workspace
@@ -65,6 +69,8 @@ spec:
           value: releaseplan
         - name: resultsDir
           value: results
+        - name: previousReleasePath
+          value: previous_release.json
       runAfter:
         - setup
       workspaces:
diff --git a/tasks/collectors/run-collectors/tests/test-run-collectors.yaml b/tasks/collectors/run-collectors/tests/test-run-collectors.yaml
index bb4c4c016f..dac0868a53 100644
--- a/tasks/collectors/run-collectors/tests/test-run-collectors.yaml
+++ b/tasks/collectors/run-collectors/tests/test-run-collectors.yaml
@@ -49,6 +49,10 @@ spec:
                 }
               }
               EOF
+
+              cat > "$(workspaces.data.path)"/previous_release.json << EOF
+              {}
+              EOF
       workspaces:
         - name: data
           workspace: tests-workspace
@@ -64,6 +68,8 @@ spec:
           value: releaseplan
         - name: resultsDir
           value: results
+        - name: previousReleasePath
+          value: previous_release.json
       runAfter:
         - setup
       workspaces:


Reviews:
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T10:14:56Z
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T10:15:41Z
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T10:17:07Z
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T10:20:42Z
user: login: scoheb
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T13:49:10Z
user: login: scoheb
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T14:07:30Z
user: login: scoheb
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T14:07:44Z
user: login: scoheb
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-14T14:08:56Z
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T13:40:10Z
user: login: mmalina
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T13:41:24Z
user: login: scoheb
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-17T13:45:47Z
user: login: mmalina
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T13:50:45Z

Review comments:
diff_hunk: @@ -0,0 +1,112 @@
+---
+apiVersion: tekton.dev/v1
+kind: Pipeline
+metadata:
+  name: test-collect-collectors-data-fail-empty-previous-release-value
+spec:
+  description: |
+    Run the collect-collectors-resources task without a value for the PreviousRelease cr and verify that
+    the task fails as expected.
path: tasks/collectors/collect-collectors-resources/tests/test-collect-collectors-data-fail-empty-previous-release-value.yaml
user: login: mmalina
body: It doesn't fail, does it? It just saves an empty json.
created_at: 2025-03-14T10:14:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -4,7 +4,7 @@ kind: Task
 metadata:
   name: run-collectors
   labels:
-    app.kubernetes.io/version: "0.3.0"
+    app.kubernetes.io/version: "0.4.0"
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: mmalina
body: Nit: It's a breaking change, so should be 5.0.0
created_at: 2025-03-14T10:15:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -60,6 +64,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --"previousRelease" "$(params.previousReleasePath)")
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: mmalina
body: Nit: No need for `""` in `--"previousRelease"` - here it's a literate string, no substitution. Just saying, ok to keep.
created_at: 2025-03-14T10:17:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -60,6 +64,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --"previousRelease" "$(params.previousReleasePath)")
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: mmalina
body: But also, what about the scenario where it's empty? Is that the responsibility of the collector python script to handle that?

And also, you should add the `$(workspaces.data.path)` prefix, no?
created_at: 2025-03-14T10:20:42Z
author_association: CONTRIBUTOR
diff_hunk: @@ -60,6 +64,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --"previousRelease" "$(params.previousReleasePath)")
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: scoheb
body: > Nit: No need for `""` in `--"previousRelease"` - here it's a literate string, no substitution. Just saying, ok to keep.

yep. thanks. bad copy/paste

created_at: 2025-03-14T13:49:10Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,112 @@
+---
+apiVersion: tekton.dev/v1
+kind: Pipeline
+metadata:
+  name: test-collect-collectors-data-fail-empty-previous-release-value
+spec:
+  description: |
+    Run the collect-collectors-resources task without a value for the PreviousRelease cr and verify that
+    the task fails as expected.
path: tasks/collectors/collect-collectors-resources/tests/test-collect-collectors-data-fail-empty-previous-release-value.yaml
user: login: scoheb
body: yes. renamed test and updated description.
created_at: 2025-03-14T14:07:30Z
author_association: MEMBER
diff_hunk: @@ -4,7 +4,7 @@ kind: Task
 metadata:
   name: run-collectors
   labels:
-    app.kubernetes.io/version: "0.3.0"
+    app.kubernetes.io/version: "0.4.0"
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: scoheb
body: changed to be `1.0.0`
created_at: 2025-03-14T14:07:44Z
author_association: MEMBER
diff_hunk: @@ -60,6 +64,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --"previousRelease" "$(params.previousReleasePath)")
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: scoheb
body: > And also, you should add the `$(workspaces.data.path)` prefix, no?

right again! thanks. amended.
created_at: 2025-03-14T14:08:56Z
author_association: MEMBER
diff_hunk: @@ -94,6 +94,8 @@ spec:
           value: $(params.collectorsRepositoryRevision)
         - name: resultsDir
           value: $(tasks.collect-collectors-resources.results.resultsDir)
+        - name: previousReleasePath
path: pipelines/run-collectors/run-collectors.yaml
user: login: mmalina
body: README entry and version bump for this change missing.
created_at: 2025-03-17T13:40:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -60,6 +64,8 @@ spec:
                 arg_value="$(jq -r '.value' <<< "$param")"
                 ARGS=("${ARGS[@]}" --"${arg_name}" "${arg_value}")
             done
+            # add the previous release json path as an arg
+            ARGS=("${ARGS[@]}" --"previousRelease" "$(params.previousReleasePath)")
path: tasks/collectors/run-collectors/run-collectors.yaml
user: login: mmalina
body: Thanks.
created_at: 2025-03-17T13:41:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +94,8 @@ spec:
           value: $(params.collectorsRepositoryRevision)
         - name: resultsDir
           value: $(tasks.collect-collectors-resources.results.resultsDir)
+        - name: previousReleasePath
path: pipelines/run-collectors/run-collectors.yaml
user: login: scoheb
body: thanks. fixed
created_at: 2025-03-17T13:45:47Z
author_association: MEMBER

PR comments: