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(cache): pr fingerprint implementation #18850

Merged
merged 68 commits into from
Feb 21, 2023

Conversation

RahulGautamSingh
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh commented Nov 10, 2022

Changes

  • Add prCache object fields to BranchCache and use it to prevent updates as discussed in linked issue

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 tick 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

@RahulGautamSingh RahulGautamSingh changed the title first implementation feat(cache): pr fingerprint implementation Nov 10, 2022
@RahulGautamSingh RahulGautamSingh requested review from viceice and rarkins and removed request for viceice November 10, 2022 06:29
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

lastEditTime is only set when the PR is updated? i.e. for the 100% of PRs which exist today.. they wont' get a last update time unless they ever need updating?

lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/set-pr-cache.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/set-pr-cache.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/set-pr-cache.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.spec.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.spec.ts Outdated Show resolved Hide resolved
@RahulGautamSingh
Copy link
Collaborator Author

RahulGautamSingh commented Nov 23, 2022

PrCache is updated when;

  1. No cache found
  2. Pr config is different
  3. New Pr is created

lib/util/cache/repository/types.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/util/cache/repository/types.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/update/pr/index.ts Outdated Show resolved Hide resolved
rarkins
rarkins previously approved these changes Feb 17, 2023
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 a small thing

lib/util/cache/repository/types.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@viceice viceice requested a review from rarkins February 20, 2023 20:33
@rarkins rarkins added this pull request to the merge queue Feb 21, 2023
Merged via the queue into renovatebot:main with commit 63fde6b Feb 21, 2023
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 34.148.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
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.

Extend branch caching logic to PR content
5 participants