Skip to content

feat(toolkit-lib): make the plugin host configurable#375

Merged
aws-cdk-automation merged 1 commit intomainfrom
huijbers/plugin-host
Apr 17, 2025
Merged

feat(toolkit-lib): make the plugin host configurable#375
aws-cdk-automation merged 1 commit intomainfrom
huijbers/plugin-host

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 16, 2025

This makes the plugin host configurable for toolkit users:

Design decisions

  • Every Toolkit instance gets a fresh PluginHost by default (not a global singleton PluginHost)
  • ...in fact, the concept of a global singleton PluginHost gets fully moved to the CLI. That concept disappears from the toolkit and the helpers, and all functions that used to implicitly assume a global plugin host now get an explicit parameter, that defaults to a fresh plugin host if not supplied.

These choices lead to a lot of downstream test changes.

  • Plugin module resolution, module deduplication and logging was moved from the CLI into the plugin host.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@rix0rrr rix0rrr requested a review from a team April 16, 2025 11:22
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from 7dab251 to e42261f Compare April 16, 2025 11:23
@github-actions github-actions bot added the p2 label Apr 16, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team April 16, 2025 11:23
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from e42261f to 8bda1f1 Compare April 16, 2025 11:23
@rix0rrr rix0rrr force-pushed the huijbers/tsc-tests branch from 606979c to eb74efe Compare April 16, 2025 11:33
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch 2 times, most recently from 362c548 to 3334d21 Compare April 16, 2025 11:33
@rix0rrr rix0rrr force-pushed the huijbers/tsc-tests branch from eb74efe to 441970a Compare April 16, 2025 11:33
@rix0rrr rix0rrr self-assigned this Apr 16, 2025
@rix0rrr rix0rrr force-pushed the huijbers/tsc-tests branch from 441970a to de3af2e Compare April 16, 2025 14:19
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from 3334d21 to afcc409 Compare April 16, 2025 14:19
Base automatically changed from huijbers/tsc-tests to main April 16, 2025 15:04
@rix0rrr rix0rrr changed the base branch from main to otaviom/refactor-dry-run April 17, 2025 07:24
@rix0rrr rix0rrr changed the base branch from otaviom/refactor-dry-run to main April 17, 2025 07:24
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from afcc409 to 1c396e5 Compare April 17, 2025 07:25
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from 1c396e5 to 3c9a248 Compare April 17, 2025 07:26
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from 3c9a248 to a448495 Compare April 17, 2025 07:26
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from a448495 to ec9ce68 Compare April 17, 2025 07:44
Design decisions:

- Every toolkit gets their own plugin collection by default
- Move the concept of a global singleton plugin host fully to the CLI
@rix0rrr rix0rrr force-pushed the huijbers/plugin-host branch from ec9ce68 to fe4fc5d Compare April 17, 2025 08:04
@rix0rrr rix0rrr temporarily deployed to integ-approval April 17, 2025 08:04 — with GitHub Actions Inactive
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.73%. Comparing base (a096830) to head (fe4fc5d).

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cli.ts 66.66% 1 Missing ⚠️
packages/aws-cdk/lib/cxapp/cloud-executable.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #375      +/-   ##
==========================================
+ Coverage   79.72%   80.73%   +1.01%     
==========================================
  Files          65       66       +1     
  Lines        6885     6878       -7     
  Branches      787      801      +14     
==========================================
+ Hits         5489     5553      +64     
+ Misses       1377     1304      -73     
- Partials       19       21       +2     
Flag Coverage Δ
suite.unit 80.73% <85.71%> (+1.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Apr 17, 2025
Merged via the queue into main with commit 4c3aaa8 Apr 17, 2025
20 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/plugin-host branch April 17, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants