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

refactor + optimize release contributor and draft release logic #729

Merged
merged 7 commits into from
Jun 14, 2024

Conversation

alee
Copy link
Member

@alee alee commented Jun 13, 2024

  • clean up ReleaseContributor caching and fix N+1 select
  • simplify draft new release logic after fixing a bug where drafting a new release from an existing release with a DOI would cause a uniqueness error
  • minor hygiene ruff check django --fix and dependency updates

alee added 7 commits June 13, 2024 15:49
performance improvements for Contributor queries

- fix n+1 select in Codebase.compute_contributors
- clear the Codebase contributors cache in redis instead of re-computing
  the cache after creating or updating ReleaseContributors on a given
  CodebaseRelease. The cache should be lazily regenerated on the next
  view.
- remove dead code Codebase.objects.compute_contributors which is no
  longer used / needed
except in cases where `id` overrides the builtin `id` function

ruff check django --fix
None or '' does not trigger the default filter unless we set the second
parameter to true

https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.default
@alee alee merged commit 66e634c into comses:main Jun 14, 2024
5 checks passed
@alee alee deleted the refactor_rc_queries branch June 14, 2024 05:49
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.

1 participant