Skip to content

Cache rock build results for register-typed rocks#899

Merged
weiiwang01 merged 16 commits intomainfrom
cache-rock
Mar 4, 2026
Merged

Cache rock build results for register-typed rocks#899
weiiwang01 merged 16 commits intomainfrom
cache-rock

Conversation

@weiiwang01
Copy link
Collaborator

Applicable spec:

Overview

Caching rock build results to speed up the CI pipeline.

The rocks are cached if they:

  • Have been uploaded to the GitHub registry, which allows us to cache only a pointer to the registry location, thus not consuming cache storage space and speeding up the caching process
  • Are not PaaS charms, because for PaaS charms the rock is usually the entire project, which changes more frequently and therefore benefits less from caching

The cache is invalidated and the rocks are rebuilt when:

  • The contents of the rock directory have changed
  • The cache is older than 1 week

Rationale

Workflow Changes

Checklist

@weiiwang01 weiiwang01 requested a review from a team as a code owner December 8, 2025 07:13
@Thanhphan1147
Copy link
Contributor

Can we add an option to skip the cache and rebuild the rock regardless? since some rocks don't have everything pinned and the output can change from one build to the next even if the content has not changed.

@weiiwang01
Copy link
Collaborator Author

Can we add an option to skip the cache and rebuild the rock regardless? since some rocks don't have everything pinned and the output can change from one build to the next even if the content has not changed.

In that case you can go to cache setting page and delete the cache which will force it to rebuild the rock.

https://github.com/canonical/wordpress-k8s-operator/actions/caches

@weiiwang01 weiiwang01 enabled auto-merge (squash) December 8, 2025 13:18
# Conflicts:
#	dist/build/index.js
#	dist/build/index.js.map
#	docs/changelog.md
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:34:17.637488+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:34:20.186936+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:46:20.559258+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:34:17.637488+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:34:20.186936+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Test results for commit 504507a

Test coverage for 504507a

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-03-04 09:46:20.559258+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@weiiwang01 weiiwang01 merged commit 8e65dd0 into main Mar 4, 2026
103 checks passed
@weiiwang01 weiiwang01 deleted the cache-rock branch March 4, 2026 10:03
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.

6 participants