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

Proxito: query the DB instead of storage when serving robots.txt #10659

Open
stsewd opened this issue Aug 22, 2023 · 0 comments
Open

Proxito: query the DB instead of storage when serving robots.txt #10659

stsewd opened this issue Aug 22, 2023 · 0 comments
Labels
Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented Aug 22, 2023

What's the problem this feature will solve?

Similar to #10512, we could hit the DB instead of storage to check if this file exists.

response = self._serve_docs(
request=request,
project=project,
version=version,
filename="robots.txt",
check_if_exists=True,
)

Currently, this isn't possible, since we only track .html files in our DB.

Describe the solution you'd like

We need to start tracking this file for new projects, and we need to iterate over all previous projects to check if this file exists in storage or not, and create the corresponding entry in the DB

Alternative solutions

I don't think this view is expensive, it's just one call to storage, and it's cached, not like 404, that they result from any URL and can't be cached beforehand. So, maybe doing nothing should be fine too. We also need yet to see if this idea of querying the DB instead of storage doesn't destroy our DB.

@stsewd stsewd added the Needed: design decision A core team decision is required label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

1 participant