dotnet / dotnet/arcade-services

Implement e-tag requests & entity caching

Open
#4,842 2 comments 0 reactions 1 assignee Claimed by @adamzip View on GitHub
Dominant language
C#
Stars
86
Forks
86
Avg merge
1d 8h
Merged PRs (30d)
35

Description

## Context
The PCS server performs periodic checks on existing PRs, querying resources such as PRs, PR reviews, and PR checks. We query those resources much more frequently than they are changed. In order to reduce our issues with github rate limiting, we can use e-tags to avoid requesting API resources unless they have been modified (see https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28#use-conditional-requests-if-appropriate)

## Goal
- Create a redis cache for resources that can be obtained through the Github API (PRs, PR reviews, PR checks)
- Add e-tag properties to those classes
- Use the low-level octokit methods to send Github requests that include e-tag headers. If the response comes back as `304: Unmodified`, return the cached resources instead

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.