Skip to content

[v2] Merge v2 into lazy-plugin-initialization#10392

Open
aemous wants to merge 19 commits into
lazy-plugin-initializationfrom
pr/merge-agent-toolkit
Open

[v2] Merge v2 into lazy-plugin-initialization#10392
aemous wants to merge 19 commits into
lazy-plugin-initializationfrom
pr/merge-agent-toolkit

Conversation

@aemous

@aemous aemous commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

  • Merged branch v2 into lazy-plugin-initialization:
    • Migrate agent-toolkit customization to the new handlers_registry system. Updated file in merge commit: awscli/handlers_registry.py.
  • Update lazy_emitter so that it references its instance reference to the plugin registry instead of the global plugin registry constant.

Description of tests:

  • Successfully ran all tests including pre-prod build workflow (see GitHub Actions).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous aemous requested a review from kdaily June 10, 2026 12:59
@aemous aemous requested a review from a team as a code owner June 10, 2026 12:59
@aemous aemous added v2 performance This PR or issue is related to performance. labels Jun 10, 2026
Comment thread awscli/customizations/agenttoolkit/__init__.py Outdated
Comment thread awscli/lazy_emitter.py
self.load_registry(self._registry)

def load_registry(self, registry):
self._registry = registry

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure I understand what this is for? I see that in the init, a registry can be provided, which is set in self._registry. But then this resets it? Why does it need to be set in the init (line 52)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't actually pass in a registry to the init function, we only pass it to load_registry. The only place we pass it to the init function is in test suites.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The init takes plugin_registry?

@aemous aemous Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see the confusion in my wording. Init accepts a plugin registry. We don't pass the registry to init during construction in the CLI codebase (non-tests), instead we only pass the registry during calling load_registry. We only pass the registry to init in our test suites.

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

Labels

performance This PR or issue is related to performance. v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants