Skip to content

filter resource_config_scopes in join - #9532

Closed
utafrali wants to merge 1 commit into
concourse:masterfrom
utafrali:fix/issue-9520-get-pipeline-results-in-duplicate-resour
Closed

utafrali wants to merge 1 commit into
concourse:masterfrom
utafrali:fix/issue-9520-get-pipeline-results-in-duplicate-resour

Conversation

@utafrali

Copy link
Copy Markdown

Fixes #9520

Changes

Updated the resource types query to filter resource scopes when joining on resource_config_scopes. Added AND ro.resource_id IS NULL to the join condition so we only get type scopes, not resource scopes. Also added a test that reproduces the scenario where a resource config is shared between a resource and a resource type.

Notes to Reviewer

When a resource config gets reused, you can end up with multiple scopes pointing to the same resource_config_id but with different resource_ids. By filtering for resource_id IS NULL, we get just the type scopes. The test sets up this exact scenario and verifies we don't get duplicates back.

Release Note

Fixed duplicate resource types when getting pipeline results if multiple scopes shared the same resource_config_id.

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@taylorsilva taylorsilva changed the title db: resource_types: filter resource_config_scopes in join filter resource_config_scopes in join Apr 15, 2026

@taylorsilva taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Locally followed the reproducible steps from the issue and could not reproduce the issue anymore. TY for the PR!

Once you do the EasyCLA thing I can merge this.

@taylorsilva taylorsilva moved this from Todo to Waiting on Contributor in Pull Requests Apr 15, 2026
@utafrali

This comment was marked as low quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Get Pipeline results in duplicate resource_types if multiple scopes share the same resource_config_id

2 participants