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

feat(gitea): Add PR cache #26451

Merged
merged 12 commits into from
Jan 15, 2024
Merged

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Dec 28, 2023

Changes

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

viceice
viceice previously approved these changes Dec 29, 2023
@viceice
Copy link
Member

viceice commented Dec 29, 2023

import order issues

@viceice
Copy link
Member

viceice commented Jan 4, 2024

conflicted 🙃

@viceice
Copy link
Member

viceice commented Jan 5, 2024

@zharinov Can you continue on this? I really like to cache the PR data to reduce Gitea / Forgejo load.

@zharinov
Copy link
Collaborator Author

zharinov commented Jan 5, 2024

@zharinov Can you continue on this? I really like to cache the PR data to reduce Gitea / Forgejo load.

Yes, but gitea-helper.ts and the way it's mocked makes it hard to test, so I have to perform huge test refactoring first

@viceice
Copy link
Member

viceice commented Jan 5, 2024

ok, let me know if I can help anywhere

@zharinov
Copy link
Collaborator Author

zharinov commented Jan 7, 2024

@zharinov zharinov marked this pull request as draft January 7, 2024 18:51
@zharinov
Copy link
Collaborator Author

zharinov commented Jan 12, 2024

@viceice Don't you know the reason why memCache is impossible to initialize for testing? The internal object holding key-values is always undefined even if init() was called in beforeEach. It seems to work for cache/memory.spec.ts itself, but not for modules that use it transitively.

@viceice
Copy link
Member

viceice commented Jan 13, 2024

@viceice Don't you know the reason why memCache is impossible to initialize for testing? The internal object holding key-values is always undefined even if init() was called in beforeEach. It seems to work for cache/memory.spec.ts itself, but not for modules that use it transitively.

🤔 maybe some global mocking?

@zharinov
Copy link
Collaborator Author

@zharinov zharinov marked this pull request as ready for review January 15, 2024 15:59
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

just one small thing

lib/modules/platform/gitea/pr-cache.ts Outdated Show resolved Hide resolved
@zharinov zharinov marked this pull request as draft January 15, 2024 17:06
@zharinov zharinov marked this pull request as ready for review January 15, 2024 17:06
@zharinov zharinov requested a review from viceice January 15, 2024 17:16
@viceice viceice added this pull request to the merge queue Jan 15, 2024
Merged via the queue into renovatebot:main with commit de68769 Jan 15, 2024
68 checks passed
@viceice viceice deleted the feat/gitea-pr-cache branch January 15, 2024 17:40
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.134.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 22, 2024
zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 24, 2024
zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants