Repository navigation
Description
Summary
The concourse Get Pipeline results in duplicate resource_types if multiple scopes share the same resource_config_id
Duplicates appear when *resource_types.resource_config_id points at a resource_configs row that has more than one resource_config_scopes row.
Concourse stores one row per custom type in {}resource_types, but get-pipeline builds JSON by running a query that joins each type to resource_config_scopes. If several scope rows share the same resource_config_id as that type, the query returns several rows for the same type.
The database resourceTypesQuery reaches the “one config, many scopes” state the bad get-pipeline query mishandles.
We are seeing this issue in v7.12.1, 8.0.2 and v8.1.1
Steps to Reproduce
- Deploy Concourse v7.12.1
- fly -t test set-pipeline -p duplicate-resource-types -c repro-dup.yaml -l values
- fly -t test get-pipeline -p duplicate-resource-types | yq .resource_types [ will show one resource_type ]
- fly -t test unpause-pipeline -p duplicate-resource-types
- fly -t test get-pipeline -p duplicate-resource-types | yq .resource_types [ You will see more than one resource_type]
Expected Results
At Step 3 and 5 we are expecting below result
fly -t test get-pipeline -p duplicate-resource-types | yq .resource_types
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-image
Actual Results
At Step 3
fly -t test get-pipeline -p duplicate-resource-types | yq .resource_types
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-image
At Step 5, we are seeing more than one resource_type [ The resource_type count will grow ]
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-image
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-image
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-image
- name: repro-custom-type
source:
repository: registry.internal/concourse/time-resource
tag: "1.6"
type: registry-imageWeb Node(s) configuration
---
deployment_name: concourse
azs:
- az1
network_name: deployment
web_vm_type: small
worker_vm_type: small
db_persistent_disk_type: 10240
db_vm_type: small
postgres_password: test
external_url: http://192.168.122.23
web_ip: 192.168.122.23
local_user:
username: admin
password: testWorker(s) configuration
No response
Concourse Version
7.12.1
Browser (if applicable)
No response
Did this use to work?
No response
Activity
taylorsilva commentedon Apr 15, 2026
Confirmed this still happens with the latest on
master