Skip to content

fix(graph-feature-service): guard warmup when accounts are empty#16077

Open
DevRajah wants to merge 1 commit into
twitter:mainfrom
DevRajah:fix/graph-feature-service-warmup-empty-accounts
Open

fix(graph-feature-service): guard warmup when accounts are empty#16077
DevRajah wants to merge 1 commit into
twitter:mainfrom
DevRajah:fix/graph-feature-service-warmup-empty-accounts

Conversation

@DevRajah
Copy link
Copy Markdown

Summary

This PR adds a defensive guard in ServerWarmupHandler.scala to prevent warmup execution when no testing accounts are configured.

Previously, the warmup handler could attempt to select a random account from an empty testingAccounts array, which may lead to invalid Random.nextInt(0) usage during warmup.

Changes

  • Added an early return when testingAccounts is empty
  • Added a warning log explaining why warmup was skipped

Why

This makes warmup behavior safer and avoids unnecessary failures in environments where testing accounts have not yet been configured.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 17, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants