Break logger↔timeutil import cycle causing CGO/fuzz workflow failures#34584
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix workflow failure on main for fuzz job
Break logger↔timeutil import cycle causing CGO/fuzz workflow failures
May 25, 2026
pelikhan
approved these changes
May 25, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes a pkg/logger dependency from pkg/timeutil to break a Go import cycle (logger → timeutil → logger) that was preventing compilation and causing CGO/test/fuzz workflows to fail.
Changes:
- Removed
pkg/loggerimport and thetimeutilLogpackage-level logger frompkg/timeutil/format.go. - Removed the debug
PrintfinFormatDurationNswhile preserving behavior forns <= 0(still returns"—").
Show a summary per file
| File | Description |
|---|---|
| pkg/timeutil/format.go | Drops logger usage to eliminate the logger↔timeutil import cycle while keeping FormatDurationNs output unchanged. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 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.
CGO workflow run #7726 failed across multiple jobs (
build,test,fuzz,security, cross-platform builds) due to a Go import cycle rooted inpkg/timeutil/format.go. The cycle waspkg/logger -> pkg/timeutil -> pkg/logger, blocking package compilation and all dependent jobs.Root cause
pkg/timeutil/format.goimportedpkg/loggerand instantiated a package logger solely for a debug line inFormatDurationNs.Change made
pkg/loggerimport frompkg/timeutil/format.go.timeutilLogvariable and the debugPrintfcall in the non-positive-duration branch ofFormatDurationNs.ns <= 0still returns"—").Impact
pkg/logger/pkg/timeutil(including fuzz matrices).