Skip to content

Conversation

@F-WRunTime
Copy link
Member

@F-WRunTime F-WRunTime commented Dec 20, 2025

Fix Cachix Upload Timeout Issues on macOS

Problem

The release workflow was failing on macOS when pushing K Framework binaries to Cachix using kup publish. Failures occurred during multipart uploads to Cloudflare R2 storage with "Connection reset by peer" errors, specifically when uploading large files (e.g., hs-backend-booster-dev-tools ~748MB).

Solution

Replaced kup publish with direct cachix push commands, which handles large file uploads more reliably and matches the approach already successfully tested in test-pr.yml.

Changes

.github/workflows/release.yml:

  • Replaced kup publish with direct cachix push using nix build + nix-store --query --requisites --include-outputs
  • Changed from workflow/[email protected] to direct run: step
  • Added diagnostic output (total paths, largest files)
  • Removed retry logic (single attempt, matching successful test)
  • Commented out old kup commands for reference

.github/workflows/test-pr.yml:

  • Added test-cachix-push job to validate the approach on Ubuntu and macOS

Testing

✅ Successfully tested on both Ubuntu 24.04 and macOS 14 in test-pr.yml
✅ No timeout or connection reset errors observed

@rv-jenkins rv-jenkins changed the base branch from master to develop December 20, 2025 23:13
F-WRunTime and others added 2 commits December 20, 2025 21:06
- release.yml sync'd with changes in test-pr.yml after confirmation push
  works.
- test-pr has added back all other steps commented out for testing.
@F-WRunTime F-WRunTime marked this pull request as ready for review December 21, 2025 04:07
@F-WRunTime F-WRunTime requested a review from a team as a code owner December 21, 2025 04:08
- Replace kup publish with direct nix build + cachix push in release.yml
- Add cachix pin commands to replicate --keep-days 180 functionality
- Update test-pr.yml to validate cachix push approach
- Fix shellcheck lint errors by adding double quotes around variables

This addresses connection reset errors during multipart uploads on macOS
by using direct cachix push instead of kup's multipart upload mechanism.
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