Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgsql: only select distinct layers for LayersIntroducingVulnerability #308

Merged
merged 1 commit into from
Jan 20, 2017
Merged

pgsql: only select distinct layers for LayersIntroducingVulnerability #308

merged 1 commit into from
Jan 20, 2017

Conversation

jzelinskie
Copy link
Contributor

This removes duplicate Layers from the pagination over GetNotification.

Previously we would show the same Layer multiple times if it had multiple FeatureVersions introducing the the same vulnerability. This was unintuitive to the consumer of the API because the API doesn't return the FeatureVersion, so it just appeared to randomly be returning duplicates.

This should also make the query slightly faster in the cases I tested.

@jzelinskie jzelinskie added component/api kind/bug things are not as they seem labels Jan 20, 2017
@Quentin-M
Copy link
Contributor

FWIW The duplication was desired behavior to notify the users that even though they are already affected by a vulnerability, there is now a new way the vulnerability is introduced in their layers (and vice-versa). Your point that the output might be confusing is legitimate and I think that this is a corner case anyways.

@jzelinskie jzelinskie merged commit 84e4873 into quay:master Jan 20, 2017
@jzelinskie jzelinskie deleted the fixpagination branch January 20, 2017 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug things are not as they seem
Development

Successfully merging this pull request may close these issues.

None yet

2 participants