Skip to content

fix: lint on test case#961

Closed
zdtsw wants to merge 1 commit intollm-d:mainfrom
zdtsw:chore_fix_test
Closed

fix: lint on test case#961
zdtsw wants to merge 1 commit intollm-d:mainfrom
zdtsw:chore_fix_test

Conversation

@zdtsw
Copy link
Copy Markdown
Collaborator

@zdtsw zdtsw commented Apr 2, 2026

Notes

  • to fix Error: internal/engines/scalefromzero/engine_test.go:481:46: cannot use deployments (variable of type map[string]*"k8s.io/api/apps/v1".Deployment) as map[string]scaletarget.ScaleTargetAccessor value in argument to engine.processInactiveVariant (typecheck) ref LeaderWorkerSet Support #910
  • fmt

cc @shuynh2017

- engine_test.go change type

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Copilot AI review requested due to automatic review settings April 2, 2026 07:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a Go typecheck/lint failure in the scale-from-zero engine unit test by updating it to use the new scaletarget.ScaleTargetAccessor map type, plus minor formatting cleanup.

Changes:

  • Update internal/engines/scalefromzero/engine_test.go to pass map[string]scaletarget.ScaleTargetAccessor (via scaletarget.NewDeploymentAccessor) into processInactiveVariant.
  • Apply gofmt/whitespace cleanup in a few files (remove trailing blank line, align struct literal fields).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/scale_from_zero_test.go Removes trailing blank line at EOF (formatting only).
internal/engines/scalefromzero/engine_test.go Fixes test compilation by using ScaleTargetAccessor map for processInactiveVariant.
internal/engines/pipeline/greedy_score_optimizer_test.go Gofmt alignment in test struct literal fields.
internal/engines/pipeline/enforcer.go Removes trailing blank line at EOF (formatting only).
internal/config/saturation_scaling.go Minor gofmt alignment in struct tag comment spacing.

@mamy-CS
Copy link
Copy Markdown
Collaborator

mamy-CS commented Apr 2, 2026

This is taken care of in #959 and #936

@zdtsw zdtsw closed this Apr 7, 2026
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.

3 participants