[test-parallel] test: add t.Parallel() to safe schedule calendar tests - #56813
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[test-parallel] test: add t.Parallel() to safe schedule calendar tests#56813github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 29, 2026
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
注册 for free
to join this conversation on GitHub.
Already have an account?
登录 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.
Daily Go Test Parallelizer
Analyzed batch of 25 test files in
pkg/cli/(following round-robin frompkg/cli/compile_dir_flag_test.go):Findings
Most files in this batch were unsafe to parallelize due to
os.Chdir,os.Setenv/t.Setenv, integration-test CLI subprocess invocation with shared fixture directories, or package-level global/function-variable overrides (e.g.compileUpdateContainerPins,runBatchYamllintOnFiles,styles.ScheduleCalendarCritical, redirectedos.Stdout/os.Stderr).Several candidate files (
compile_external_tools_test.go,compile_force_refresh_action_pins_test.go,compile_pipeline_purge_test.go) already hadt.Parallel()on all their safe top-level tests, so no change was needed there.In
compile_schedule_calendar_test.go, two self-contained top-level tests were missingt.Parallel():TestRenderScheduleCalendarCell_NoANSIWhenNotTerminalTestRenderScheduleCalendarCell_NoANSIWhenNoColorBoth only call the pure function
renderScheduleCalendarCellwith local data (no globals, no env, no filesystem, no shared state) and are safe to parallelize. The sibling testTestRenderScheduleCalendarCell_UsesANSIInColorTerminalwas intentionally left non-parallel — it mutates the shared package-levelstyles.ScheduleCalendarCriticalstyle token.Validation
go test -race ./pkg/cli/... -run '...'(targeted to touched/candidate tests): all pass.go build ./...: succeeds.t.Parallel()additions, no other changes.Note:
TestRenderScheduleCalendarCell_UsesANSIInColorTerminalfails both before and after this change (pre-existing, unrelated to this PR — confirmed viagit stash).State
Cache updated:
last_file=./pkg/cli/compile_schedule_calendar_test.gofor the next round-robin run.