fix: modifying a cache secret does not invalidate cached entries #1043

Merged
earl-warren merged 1 commit from earl-warren/runner:wip-cache-invalidate into main 2025-10-01 16:38:38 +00:00
Contributor

Resolves forgejo/runner#1041

  • bug fixes
    • PR: fix: modifying a cache secret does not invalidate cached entries
Resolves forgejo/runner#1041 <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1043): <!--number 1043 --><!--line 0 --><!--description Zml4OiBtb2RpZnlpbmcgYSBjYWNoZSBzZWNyZXQgZG9lcyBub3QgaW52YWxpZGF0ZSBjYWNoZWQgZW50cmllcw==-->fix: modifying a cache secret does not invalidate cached entries<!--description--> <!--end release-notes-assistant-->
mfenniak approved these changes 2025-10-01 16:03:07 +00:00
mfenniak left a comment

Looks good to me, concurs with my code analysis.

I wonder if secret should be moved to the Only used for the external cache server. section? For internal server usage I can't see any reason why it would be meaningful to configure it.

Looks good to me, concurs with my code analysis. I wonder if `secret` should be moved to the `Only used for the external cache server.` section? For internal server usage I can't see any reason why it would be meaningful to configure it.
earl-warren force-pushed wip-cache-invalidate from 5cbe927625
All checks were successful
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 8s
checks / validate pre-commit-hooks file (pull_request) Successful in 32s
checks / validate mocks (pull_request) Successful in 39s
checks / build and test (pull_request) Successful in 1m1s
checks / runner exec tests (pull_request) Successful in 29s
checks / runner integration tests (pull_request) Successful in 4m17s
checks / integration tests (pull_request) Successful in 11m23s
to 18e679e29c
All checks were successful
issue-labels / release-notes (pull_request_target) Successful in 7s
checks / validate pre-commit-hooks file (pull_request) Successful in 46s
checks / validate mocks (pull_request) Successful in 59s
checks / build and test (pull_request) Successful in 1m11s
checks / runner exec tests (pull_request) Successful in 35s
checks / runner integration tests (pull_request) Successful in 5m35s
checks / integration tests (pull_request) Successful in 13m48s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 7s
cascade / forgejo (pull_request_target) Successful in 2m36s
2025-10-01 16:24:44 +00:00
Compare
Author
Contributor

Good idea, done.

Good idea, done.
earl-warren scheduled this pull request to auto merge when all checks succeed 2025-10-01 16:25:07 +00:00
earl-warren deleted branch wip-cache-invalidate 2025-10-01 16:38:39 +00:00
Contributor

I may be missing the obvious but I'm still wondering how this secret secures the communication. That's why I don't understand what difference it makes to set an explicit secret (even if the cache server is external).

I may be missing the obvious but I'm still wondering _how_ this secret secures the communication. That's why I don't understand what difference it makes to set an explicit secret (even if the cache server is external).
Author
Contributor

In the case of an internal server, the cache is spawned from the runner and they share the same secret to communicate. In the case of an external cache, the shared secret (via the config file) is how the external cache knows the request originates from the runner.

In the case of an internal server, the cache is spawned from the runner and they share the same secret to communicate. In the case of an external cache, the shared secret (via the config file) is how the external cache knows the request originates from the runner.
Contributor

OK, got it now.

the cache is spawned from the runner and they share the same secret to communicate

That's the detail I overlooked.

Thanks!

OK, got it now. > the cache is spawned from the runner and they share the same secret to communicate That's the detail I overlooked. Thanks!
earl-warren marked this conversation as resolved
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo/runner!1043
No description provided.