Skip to content

fix: Update bazel cache on "merge_group" event#97

Merged
AlexanderLanin merged 1 commit into
mainfrom
NEOatNHNG/issue95
Apr 20, 2026
Merged

fix: Update bazel cache on "merge_group" event#97
AlexanderLanin merged 1 commit into
mainfrom
NEOatNHNG/issue95

Conversation

@NEOatNHNG
Copy link
Copy Markdown
Contributor

Fixes #95

@lurtz
Copy link
Copy Markdown
Contributor

lurtz commented Apr 15, 2026

Can you along the way also check why caches are not saved in pull requests?

One example https://github.com/eclipse-score/inc_someip_gateway/actions/runs/24330218768/job/71034147474#step:5:98 from eclipse-score/inc_someip_gateway#60

Copy link
Copy Markdown
Contributor Author

@NEOatNHNG NEOatNHNG left a comment

Choose a reason for hiding this comment

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

Can you along the way also check why caches are not saved in pull requests?

One example https://github.com/eclipse-score/inc_someip_gateway/actions/runs/24330218768/job/71034147474#step:5:98 from eclipse-score/inc_someip_gateway#60

See #56

That was a concious decision so that the cache is not "polluted" with stuff that is only existing on a branch. The idea usually is that a feature branch would normally use 90% of the stuff from main, so it is most efficient if the cache contains the stuff from main and then for each PR build most of the stuff from the cache can be re-used. If the cache also gets filled with stuff from the feature branches then it could happen that stuff from the feature branch evicts main stuff from the cache so the cache content fits better to that PR but less to the content of other PRs.
At least that is what I assume was the reasoning why to use cache-save: ${{ github.event_name == 'push' }} in the first place.

@lurtz
Copy link
Copy Markdown
Contributor

lurtz commented Apr 15, 2026

I see, but something is not working as expected. I never saw cache hits for workflows running in pull requests.

@lurtz
Copy link
Copy Markdown
Contributor

lurtz commented Apr 15, 2026

now I found a cache hit in a pull request: https://github.com/eclipse-score/inc_someip_gateway/actions/runs/24464232742/job/71486694945#step:5:114

Maybe I was wrong

@AlexanderLanin AlexanderLanin merged commit ac25d66 into main Apr 20, 2026
17 checks passed
@AlexanderLanin AlexanderLanin deleted the NEOatNHNG/issue95 branch April 20, 2026 10:54
@lurtz lurtz restored the NEOatNHNG/issue95 branch April 20, 2026 14:21
lurtz added a commit to elektrobit-contrib/eclipse-score_cicd-workflows that referenced this pull request Apr 20, 2026
…e#97)"

This reverts commit ac25d66.

Github caches are complicated. Pull requests can use a cache that was
either created by the same pull request or the main branch. Thus
caches created by merge groups will not be used. On top of that each
merge group run gets its own temporary branch and thus cache, which
will never be reused, but consumes space.
lurtz added a commit that referenced this pull request Apr 20, 2026
This reverts commit ac25d66.

Github caches are complicated. Pull requests can use a cache that was
either created by the same pull request or the main branch. Thus
caches created by merge groups will not be used. On top of that each
merge group run gets its own temporary branch and thus cache, which
will never be reused, but consumes space.

For more information about cache sharing read [this](https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache)
castler pushed a commit to eclipse-score/baselibs that referenced this pull request Apr 20, 2026
@lurtz lurtz deleted the NEOatNHNG/issue95 branch April 22, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

QNX workflow often fails to download SDP: Connect timed out

3 participants