Passed resource not found in previous job

Hi,

Can someone explain what is considered as interacted resource. I have the resource in the get and in inputs. But i’m still getting this error when trying to used passed resource.
we are running concourse 5.7.0

    error: invalid pipeline config:
    invalid jobs:
    	jobs.deploy-to-preprod-saas.plan[0].in_parallel[1].get.trigger-release-pipeline.passed references a job ('scan-code') which doesn't interact with the resource ('trigger-release-pipeline')

here is my config:

- name: prepare-new-preproduction
  serial_groups: [ lock ]
  serial: true
  plan:
  - in_parallel:
    - get: trigger-release-pipeline
      trigger: true
    - get: release-trigger
    - get: concourse-docker
    - get: concourse-pipelines-src

  - task: bump-preproduction
    config:
      platform: linux
      inputs:
        - name: release-trigger
        - name: trigger-release-pipeline
        - name: concourse-pipelines-src


- name: scan-code
  serial: true
  plan:
  - in_parallel:
    - get: release-trigger
      trigger: true
      passed:
        - prepare-new-preproduction
    - get: trigger-release-pipeline
    - get: concourse-docker
    - get: concourse-pipelines-src

  - task: scan
    config:
      platform: linux
      inputs:
        - name: trigger-release-pipeline
        - name: concourse-pipelines-src
        - name: release-trigger


- name: deploy-to-preprod-saas
  serial: true
  plan:
  - in_parallel:
    - get: release-trigger
      trigger: false
      passed:
      - prepare-new-preproduction
      - scan-code
    - get: trigger-release-pipeline
      trigger: true
      passed:
      - prepare-new-preproduction
      - scan-code
    - get: concourse-docker
    - get: concourse-pipelines-src

  - task: deploy-to-preprod-saas
    config:
      platform: linux
      inputs:
        - name: trigger-release-pipeline
        - name: concourse-pipelines-src
        - name: release-trigger

I didn’t notice anything wrong with your job definitions, so I took your sample yaml and turned it into a real pipeline for me to test with. I just renamed your resources and added image_resource and run to the tasks. Otherwise, it’s your job definitions as you provided them. Maybe comparing with this will help?

resources:
  - name: interval
    type: time
    icon: clock-outline
    source:
      interval: 30s
  - name: interval2
    type: time
    icon: clock-outline
    source:
      interval: 30s
  - name: interval3
    type: time
    icon: clock-outline
    source:
      interval: 30s

jobs:
- name: prepare-new-preproduction
  serial_groups: [ lock ]
  serial: true
  plan:
  - in_parallel:
    - get: interval
      trigger: true
    - get: interval2
    - get: interval3
  - task: bump-preproduction
    config:
      platform: linux
      inputs:
        - name: interval
        - name: interval2
        - name: interval3
      image_resource:
        type: registry-image
        source: { repository: busybox }
      run:
        path: /bin/sh
        args:
          - -c
          - echo Hello


- name: scan-code
  serial: true
  plan:
  - in_parallel:
    - get: interval
      trigger: true
      passed:
        - prepare-new-preproduction
    - get: interval2
    - get: interval3

  - task: scan
    config:
      platform: linux
      inputs:
        - name: interval
        - name: interval2
        - name: interval3
      image_resource:
        type: registry-image
        source: { repository: busybox }
      run:
        path: /bin/sh
        args:
          - -c
          - echo Hello


- name: deploy-to-preprod-saas
  serial: true
  plan:
  - in_parallel:
    - get: interval
      trigger: false
      passed:
      - prepare-new-preproduction
      - scan-code
    - get: interval2
      trigger: true
      passed:
      - prepare-new-preproduction
      - scan-code
    - get: interval3

  - task: deploy-to-preprod-saas
    config:
      platform: linux
      inputs:
        - name: interval
        - name: interval2
        - name: interval3
      image_resource:
        type: registry-image
        source: { repository: busybox }
      run:
        path: /bin/sh
        args:
          - -c
          - echo Hello

It looked like this

Hey taylorsilva thanks for the reply,
It’s really odd, I took your config and replaced the resource and i still get the same error…
i’m really confused now and i’m not sure what is really wrong here.
as far as i know you just need to have the get resource and make sure its in the inputs, which i have and it’s only complaining about the one in scan-code job

omg found it, there was config that i had collapsed on my editor and it was in between scan-code and deploy job. Removing that config i was able to deploy my pipeline… this has been in a way extremely misleading when debugging this…

yay! Glad you figured it out!

Concourse error messages aren’t all that helpful in my experience as well. There’s a lot of room for improvement in this area.