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

Replace Ancestry with AncestryWithContent struct in database models #614

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

KeyboardNerd
Copy link
Contributor

As one of the steps to simplifies the codebase, the AncestryWithContent
struct is renamed to Ancestry, and Ancestry is removed. It will cause
the PostAncestry request to be slower.

@KeyboardNerd KeyboardNerd added kind/cleanup no functional changes, only reorganization component/database labels Sep 7, 2018
Copy link
Contributor

@jzelinskie jzelinskie left a comment

Choose a reason for hiding this comment

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

Beyond this design decision, everything else looks pretty good.

api/v3/rpc.go Outdated
} else {
dbAncestry, ok, err := tx.FindAncestry(name)
for _, layer := range ancestry.Layers {
pbLayer, err := GetPbAncestryLayer(tx, layer, req.GetWithFeatures(), req.GetWithVulnerabilities())
Copy link
Contributor

Choose a reason for hiding this comment

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

I was actually thinking about totally removing these from the proto, too. Let's just always return everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm idk if we want to always return the vulnerabilities though

Copy link
Contributor

Choose a reason for hiding this comment

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

Quay almost exclusively requests with vulnerabilities. IIRC the only scenario it doesn't is in tests. Clients that don't care about the vulnerabilities can just ignore them and this avoids us maintaining this branch needlessly.

As one of the steps to simplifies the codebase, the AncestryWithContent
struct is renamed to Ancestry, and Ancestry is removed. It will cause
the PostAncestry request to be slower.
@KeyboardNerd KeyboardNerd merged commit 6c69377 into quay:master Sep 11, 2018
@KeyboardNerd KeyboardNerd deleted the sidac/simplify branch September 11, 2018 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup no functional changes, only reorganization
Development

Successfully merging this pull request may close these issues.

None yet

2 participants