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: implemented basic cache of 30 sec in can-i-merge badges #720

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

pahnin
Copy link
Contributor

@pahnin pahnin commented Sep 6, 2024

  • currently the can-i-merge badges are not cached at al
  • if a badge is present it makes sense to have some basic cache (30sec) instead of none

@pahnin pahnin requested review from mefellows, vwong and Saup21 September 6, 2024 07:19
Copy link
Contributor

@vwong vwong left a comment

Choose a reason for hiding this comment

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

Looks fine, but I'm not sure how users may react to this...

@mefellows
Copy link
Member

Thanks for doing this!

If this were on the can-i-merge API resource itself I’d say caching would be a bad idea, but given it’s on the badge resource I think we could even be a little more generous - perhaps 60s?

For example, if this was part of a CI/CD pipeline and the CLI was giving incorrect (in particular, a false positive) then that would be a problem.

I don’t expect people to be relying on this badge to unblock releases.

Would be interesting to test what impact it has in the dev environment if it helps the flicker, perhaps a small cache time is sufficient to solve that problem?

@pahnin pahnin force-pushed the feat/implement-basic-cache-in-can-i-merge-badges branch from c15c47b to dbb4247 Compare September 9, 2024 04:12
@pahnin pahnin force-pushed the feat/implement-basic-cache-in-can-i-merge-badges branch from dbb4247 to e2bce55 Compare September 9, 2024 06:32
@pahnin pahnin merged commit bc3a063 into master Sep 9, 2024
15 of 17 checks passed
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.

4 participants