Fix CGO fuzz job compile failure by exposing shared test helpers to integration-tagged builds#34816
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix fuzz workflow failure on main for run #7862
Fix CGO fuzz job compile failure by exposing shared test helpers to integration-tagged builds
May 26, 2026
pelikhan
approved these changes
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a CGO fuzz workflow compilation failure by making shared pkg/workflow test helper functions available when tests are compiled with -tags integration. It does this by removing //go:build !integration constraints from helper-only _test.go files so integration-tagged fuzz targets can compile and run.
Changes:
- Removed the
!integrationbuild constraint from shared workflow test helper files. - Ensured helper symbols (e.g.,
containsInNonCommentLines,extractJobSection,boolPtr,strPtr) are available to both default and integration-tagged test builds.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/test_helpers_shared_test.go | Removes !integration build tag so pointer/test helper utilities are available in integration-tagged test builds. |
| pkg/workflow/compiler_test_helpers_test.go | Removes !integration build tag so compiler-related test helpers are available in integration-tagged test builds (needed by integration-tagged tests/fuzz targets). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
The
CGOworkflow’sfuzzmatrix failed onmainduringFuzzSanitizeOutput, not due to fuzz findings but becausepkg/workflowtests failed to compile under-tags integration. Shared helper symbols used by integration tests were excluded from that build context.Root cause
containsInNonCommentLines,extractJobSection,indexInNonCommentLines,boolPtr,strPtr) lived in_test.gofiles constrained by//go:build !integration, so they were unavailable when fuzz jobs compiled with integration tags.Code changes
!integrationbuild constraints from:pkg/workflow/compiler_test_helpers_test.gopkg/workflow/test_helpers_shared_test.goEffect on workflow behavior
pkg/workflowtest compilation no longer fails in integration-tagged fuzz job setup, allowing fuzz targets to execute instead of failing at compile time.