Skip to content

Conversation

@michaelneale
Copy link
Collaborator

Problem

PR #2754 (Hermit integration) was reverted in PR #2759 due to build failures. The root cause was that the build-cli workflow was using main branch code instead of the PR branch code when triggered from PR comments.

Solution

This PR fixes the GitHub Actions workflow to properly handle PR branch builds:

Changes Made:

  • Enhanced pr-comment-build-cli.yml: Pass PR number to reusable workflow
  • Enhanced build-cli.yml: Fetch PR details and checkout correct branch
  • Backward Compatible: Regular builds (release, canary) unchanged
  • Proper Branch Handling: Uses PR's head SHA when building from comments

Technical Details:

  • Added pr_number input parameter to build-cli.yml workflow
  • Added PR details fetching step using GitHub API
  • Modified checkout step to use PR's head SHA and repository when building from PR
  • Maintains backward compatibility for non-PR builds

Testing

Once merged, this can be tested by:

  1. Creating a test PR with some changes
  2. Commenting .build-cli on the PR
  3. Verifying the build uses the PR branch code (not main)

Impact

  • Fixes Root Cause: Resolves the issue that led to PR Revert "chore: use hermit in goose" #2759 revert
  • Enables Hermit Re-integration: Paves the way for safe re-introduction of Hermit toolchain management
  • Low Risk: Changes are isolated to the problematic workflow
  • Backward Compatible: Existing workflows continue to work unchanged

Next Steps

After this fix is confirmed working:

  1. Gradual Hermit Re-integration: Start with single workflow, then expand
  2. Monitor Builds: Watch for stability after each integration step
  3. Team Communication: Update team on fix progress

Fixes the core issue mentioned in PR #2759 revert.

- Add pr_number input parameter to build-cli.yml workflow
- Fetch PR details and checkout correct branch/commit when building from PR comments
- Maintain backward compatibility for non-PR builds (releases, canary)
- Fixes issue where .build-cli command used main branch instead of PR branch

This resolves the root cause that led to PR #2759 revert of Hermit integration.
The build-cli workflow now properly uses the PR's branch code when triggered
from PR comments, enabling safe re-introduction of Hermit toolchain management.
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.

2 participants