Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ilackarms
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings October 9, 2025 10:06
Copy link
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

This PR changes the TranslatorPlugin from a function type to an interface to enable extending owned resource types in the ADK translator. This allows plugins to specify additional Kubernetes resources they own for proper lifecycle management.

  • Modified TranslatorPlugin from function type to interface with two methods
  • Updated the GetOwnedResourceTypes() method to include resources from all plugins
  • Updated plugin execution to use the new interface method

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
go/pkg/translator/adk_api_translator_types.go Changed TranslatorPlugin from function type to interface with ProcessAgent and GetOwnedResourceTypes methods
go/internal/controller/translator/agent/adk_api_translator.go Updated to collect owned resources from plugins and call the new interface method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +19 to +22
type TranslatorPlugin interface {
ProcessAgent(ctx context.Context, agent *v1alpha2.Agent, outputs *AgentOutputs) error
GetOwnedResourceTypes() []client.Object
}
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'resoruce' to 'resource' in the PR title.

Copilot uses AI. Check for mistakes.
@ilackarms ilackarms changed the title enable extending owned resoruce types in adk translator enable extending owned resource types in adk translator Oct 9, 2025
@EItanya EItanya merged commit dc1be9a into main Oct 9, 2025
17 checks passed
@EItanya EItanya deleted the extend-owned-types branch October 9, 2025 11:43
jmhbh pushed a commit to jmhbh/kagent that referenced this pull request Oct 10, 2025
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