[PR #52] [MERGED] fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work #64

Closed
opened 2026-10-26 22:35:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/github-workflows/pull/52
Author: @mattmillerai
Created: 7/21/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @mattmillerai

Base: main ← Head: matt/pr-size-gowork-off-for-consumer-gowork


📝 Commits (3)

  • 349e8db fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work
  • 2d71626 fix(pr-size): quote GOWORK: "off" so it is not coerced to boolean false
  • f9d638a Merge remote-tracking branch 'origin/main' into matt/pr-size-gowork-off-for-consumer-gowork

📊 Changes

1 file changed (+9 additions, -8 deletions)

View changed files

📝 .github/workflows/pr-size.yml (+9 -8)

📄 Description

Problem

The reusable pr-size.yml checks out the check-pr-size tool into _pr_size_tool/ under the consumer repo's checkout, then runs go build there. When the consumer repo has a go.work at its checkout root (e.g. Comfy-Org/cloud), go build discovers that workspace file, sees the tool module isn't one of its listed modules, and fails:

current directory is contained in a module that is not one of the workspace modules listed in go.work
##[error]Process completed with exit code 1.

This is blocking Comfy-Org/cloud#5336 (the flip to this reusable caller, BE-3483) — the pr-size job dies at the build step before it can even count the diff.

Fix

Set GOWORK: off on the Build check-pr-size step. The tool module is dependency-free (no go.sum), so building it in single-module mode is safe and correct — it just stops the consumer's workspace from leaking into the tool build.

Verification

Reproduced locally with a nested module under a root go.work that lists only other modules:

WITHOUT GOWORK=off → 'current directory is contained in a module that is not one of the workspace modules listed in go.work'  (exit 1)
WITH    GOWORK=off → exit 0

Once merged, Comfy-Org/cloud#5336's caller will be re-pinned to the merged SHA.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/github-workflows/pull/52 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 7/21/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `matt/pr-size-gowork-off-for-consumer-gowork` --- ### 📝 Commits (3) - [`349e8db`](https://github.com/Comfy-Org/github-workflows/commit/349e8db6059e54b127d34a9434227c1723a4b4b7) fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work - [`2d71626`](https://github.com/Comfy-Org/github-workflows/commit/2d71626f87ffe6a395dfa70eaff1f97721a34259) fix(pr-size): quote GOWORK: "off" so it is not coerced to boolean false - [`f9d638a`](https://github.com/Comfy-Org/github-workflows/commit/f9d638a15386d34bb363a1f2f447bec0d05b9cc7) Merge remote-tracking branch 'origin/main' into matt/pr-size-gowork-off-for-consumer-gowork ### 📊 Changes **1 file changed** (+9 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pr-size.yml` (+9 -8) </details> ### 📄 Description ## Problem The reusable `pr-size.yml` checks out the `check-pr-size` tool into `_pr_size_tool/` **under the consumer repo's checkout**, then runs `go build` there. When the consumer repo has a `go.work` at its checkout root (e.g. **Comfy-Org/cloud**), `go build` discovers that workspace file, sees the tool module isn't one of its listed modules, and fails: ``` current directory is contained in a module that is not one of the workspace modules listed in go.work ##[error]Process completed with exit code 1. ``` This is blocking Comfy-Org/cloud#5336 (the flip to this reusable caller, BE-3483) — the `pr-size` job dies at the build step before it can even count the diff. ## Fix Set `GOWORK: off` on the **Build check-pr-size** step. The tool module is dependency-free (no `go.sum`), so building it in single-module mode is safe and correct — it just stops the consumer's workspace from leaking into the tool build. ## Verification Reproduced locally with a nested module under a root `go.work` that lists only *other* modules: ``` WITHOUT GOWORK=off → 'current directory is contained in a module that is not one of the workspace modules listed in go.work' (exit 1) WITH GOWORK=off → exit 0 ``` Once merged, Comfy-Org/cloud#5336's caller will be re-pinned to the merged SHA. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:35:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
Comfy-Org/github-workflows#64
No description provided.