ci: skip OEEquivHash when HASHSERV variable is unavailable (fork PRs) - #16624
Merged
Merged
Conversation
For pull requests from forks, GitHub Actions does not expose repository variables (vars context is empty). This causes BB_HASHSERVE to be set to an empty string, which makes bitbake fail with: ERROR: OEEquivHash requires BB_HASHSERVE to be set Fix: only set BB_HASHSERVE and BB_SIGNATURE_HANDLER when the repository variable is available. Fork PRs will build without hash equivalence (no sstate sharing) but will still succeed.
rpcme
added a commit
that referenced
this pull request
Aug 9, 2026
The previous fix (PR #16624) used escaped quotes inside a bash -c '...' single-quoted heredoc: if [ -n \"\" ]; then Inside single quotes, \"\" produces literal quote characters, which is a non-empty 2-char string - so the test always passes. Fix: assign the GitHub expression to a shell variable first (HASHSERV=<value>), then test with proper double-quoted shell variable expansion: if [ -n "$HASHSERV" ]; then This correctly evaluates to false when the expression is empty (fork PRs where vars context is unavailable).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #16623 fixed the case-sensitivity issue for
vars[]lookup, but fork PRs (like #16292) still fail because GitHub Actions does not expose repository variables to workflows triggered by fork PRs (pull_requestevent). Thevarscontext is completely empty in that security context.Result:
Fix
Make the
BB_HASHSERVE+BB_SIGNATURE_HANDLERconfiguration conditional — only set them when the variable resolves to a non-empty value.For fork PRs, this means bitbake runs without hash equivalence (no sstate cache sharing with the hash server), which is slower but functional. Internal PRs still get the full hashserv optimization.
Affected
All fork PRs that trigger
build-test-recipe— currently #16292 (greengrass-lite).