Skip to content

Proxito: improve query to check for addons #10458

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

Closed
wants to merge 1 commit into from
Closed

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jun 21, 2023

Small improvement until we work on #10456

@stsewd stsewd requested a review from a team as a code owner June 21, 2023 18:43
@stsewd stsewd requested a review from humitos June 21, 2023 18:43
humitos added a commit that referenced this pull request Jun 22, 2023
We don't need the `Project` instance. We were using to check for a Feature flag,
but now we are only adding the header when the project is using
`build.commands`.

If we ever require the `Project` instance again, we can do a `.select_related`
from the `Version` object. That way, we still keep doing 1 query only.

Closes #10458
Related #10456
@humitos
Copy link
Member

humitos commented Jun 22, 2023

I found a different solution that removes 1 query. It doesn't query the projects_project table. We don't need the project at all. See #10461

@stsewd stsewd closed this Jun 22, 2023
@stsewd stsewd deleted the improve-addons-query branch June 22, 2023 12:58
humitos added a commit that referenced this pull request Jun 22, 2023
)

We don't need the `Project` instance. We were using to check for a Feature flag,
but now we are only adding the header when the project is using
`build.commands`.

If we ever require the `Project` instance again, we can do a `.select_related`
from the `Version` object. That way, we still keep doing 1 query only.

Closes #10458
Related #10456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants