Skip to content

feat(templates): cache templates based on etag - #1465

Open
ecrupper wants to merge 4 commits into
mainfrom
feat/template-cache
Open

feat(templates): cache templates based on etag#1465
ecrupper wants to merge 4 commits into
mainfrom
feat/template-cache

Conversation

@ecrupper

@ecrupper ecrupper commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

go-github supports adding a custom transport layer for caching, and given that we already have a cache service and that templates have a very obvious cache key (fetch URL), this felt like a no brainer to spare a lot of SCM calls.

@ecrupper
ecrupper requested a review from a team as a code owner June 2, 2026 20:01
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.99029% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.05%. Comparing base (541d690) to head (3a37b66).

Files with missing lines Patch % Lines
compiler/registry/github/content_transport.go 75.47% 7 Missing and 6 partials ⚠️
cache/redis/opts.go 0.00% 5 Missing ⚠️
cache/redis/store_template.go 50.00% 2 Missing and 2 partials ⚠️
cmd/vela-server/server.go 0.00% 4 Missing ⚠️
cache/redis/get_template.go 72.72% 2 Missing and 1 partial ⚠️
cache/redis/extend_template.go 60.00% 1 Missing and 1 partial ⚠️
api/admin/settings.go 0.00% 1 Missing ⚠️
api/pipeline/template.go 0.00% 1 Missing ⚠️
cache/cache.go 0.00% 1 Missing ⚠️

❌ Your project check has failed because the head coverage (58.05%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1465      +/-   ##
==========================================
+ Coverage   58.03%   58.05%   +0.02%     
==========================================
  Files         663      667       +4     
  Lines       25617    25703      +86     
==========================================
+ Hits        14867    14923      +56     
- Misses      10049    10069      +20     
- Partials      701      711      +10     
Files with missing lines Coverage Δ
cache/flags.go 100.00% <ø> (ø)
cache/redis/redis.go 84.50% <ø> (ø)
cache/setup.go 100.00% <100.00%> (ø)
compiler/native/native.go 77.88% <100.00%> (ø)
compiler/registry/github/github.go 92.59% <100.00%> (-7.41%) ⬇️
database/pipeline/table.go 100.00% <ø> (ø)
scm/github/webhook.go 90.32% <ø> (ø)
api/admin/settings.go 0.00% <0.00%> (ø)
api/pipeline/template.go 0.00% <0.00%> (ø)
cache/cache.go 43.75% <0.00%> (-2.92%) ⬇️
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants