Skip to content

Remove legacy optimizer decorator path - #6119

Open
kocaemre wants to merge 1 commit into
stacklok:mainfrom
kocaemre:chore/remove-legacy-optimizer-decorator
Open

Remove legacy optimizer decorator path#6119
kocaemre wants to merge 1 commit into
stacklok:mainfrom
kocaemre:chore/remove-legacy-optimizer-decorator

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • The optimizer-without-AdvertiseFromCore path is now rejected by sessionmanager.New, so the old factory-level optimizer decorator branch can no longer run.
  • Remove the unreachable legacy optimizer decorator path and its private tool-adaptation helper.
  • Wire the session manager directly to the undecorated base factory; the resolved optimizer factory continues to be surfaced to the Serve layer via Manager.OptimizerFactory().

Fixes #6103

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

Manual testing:

  • PATH=/usr/local/go/bin:/root/go/bin:$PATH go test ./pkg/vmcp/server/sessionmanager
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH go test ./pkg/vmcp/server/sessionmanager ./pkg/vmcp/server
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH go test -race ./pkg/vmcp/server/sessionmanager
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH task lint
  • git diff --check

API Compatibility

  • This PR does not break the v1beta1 API, OR the api-break-allowed label is applied and the migration guidance is described above.

Does this introduce a user-facing change?

No.

Special notes for reviewers

This is intentionally a deletion-only follow-up to the constructor guard merged in #6033. The optimizer is still resolved, cleaned up by the manager, and consumed by the Serve layer when enabled; the removed path was unreachable because New rejects an optimizer unless AdvertiseFromCore is set.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
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.

Delete the unreachable legacy optimizer decorator path in sessionmanager

1 participant