Skip to content

prewarm() abandons inner goroutine and all fetchAll sub-goroutines on timeout with no cancellation #7052

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: b7bc4e82-4fd0-4b4f-a739-86203d0bd83e

Description

What happened:
In pkg/api/handlers/nightly_e2e.go:187-221, when the prewarm timer fires, the function returns immediately abandoning the done channel. The inner goroutine running h.fetchAll() continues executing along with 17+ goroutines it spawns internally. None have a cancellation context, so all run to completion and are leaked on every prewarm timeout.

What I expected:
prewarm() should pass a cancellable context to fetchAll() and cancel it when the timer fires, stopping all in-flight goroutines.

Steps to reproduce:

  1. Configure prewarm with a very short timeout
  2. Trigger prewarm
  3. Observe 17+ goroutines continue running after the timeout

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.triage/neededNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions