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

Addons: activating a version doesn't purge the cache #11291

Open
humitos opened this issue Apr 18, 2024 · 2 comments · May be fixed by #11489
Open

Addons: activating a version doesn't purge the cache #11291

humitos opened this issue Apr 18, 2024 · 2 comments · May be fixed by #11489
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Apr 18, 2024

When the user activates a new version, the addons API response doesn't immediately reflect this change. This is because the API response is cached. However, triggering a purge on that project won't immediately work since the version won't be built=True at that point yet.

So, we need to figure it out how to purge the cache on "new active versions, but only once they have finished successfully". How we can detect this?

@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Apr 18, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Apr 18, 2024
@humitos
Copy link
Member Author

humitos commented Jul 17, 2024

I just realized that we are sending a build_complete signal when the build finishes. We can attach a receiver to this signal and check if this is the first successful build for this version, and purge the cache in that case 👍🏼

humitos added a commit that referenced this issue Jul 22, 2024
Note that I wasn't able to write a test case because `readthedocsext` is not
installed in our test suite, so I cannot check this task is called.

Closes #11291
@humitos
Copy link
Member Author

humitos commented Jul 22, 2024

We can't use build_complete signal because at that time we don't know yet if the build was successful or not. I opened #11489 to handle this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
Status: Planned
Development

Successfully merging a pull request may close this issue.

1 participant