Skip to content

feat(integ-runner): toolkit-lib-engine is now the only engine (removes old cli-wrapper engine)#1108

Merged
aws-cdk-automation merged 4 commits intomainfrom
mrgrain/refactor/integ-runner/remove-deprecated-cli-engine
Feb 3, 2026
Merged

feat(integ-runner): toolkit-lib-engine is now the only engine (removes old cli-wrapper engine)#1108
aws-cdk-automation merged 4 commits intomainfrom
mrgrain/refactor/integ-runner/remove-deprecated-cli-engine

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Feb 3, 2026

This PR completes the planned deprecation of the cli-wrapper engine by removing it entirely and deleting the @aws-cdk/cdk-cli-wrapper package.

The cli-wrapper engine was deprecated in favor of the toolkit-lib engine, which uses the programmatic @aws-cdk/toolkit-lib library instead of spawning CLI processes. The deprecation notice indicated removal was scheduled for January 2026.

Changes

The toolkit-lib engine is now the only supported engine for running integration tests. The @aws-cdk/cdk-cli-wrapper package has been deleted as it is no longer needed.

To ensure backward compatibility for users who may still have --unstable=deprecated-cli-engine or --unstable=toolkit-lib-engine in their scripts, a new unstable-features.ts module gracefully handles these removed flags by emitting warnings instead of failing.

The ICdk interface and related types have been moved from @aws-cdk/cdk-cli-wrapper to @aws-cdk/integ-runner/lib/engines/cdk-interface.ts since they are still needed by the toolkit-lib engine implementation.


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

BREAKING CHANGE: The `--unstable=deprecated-cli-engine` option has been removed. The toolkit-lib engine is now the only supported engine for running integration tests.

The `@aws-cdk/cdk-cli-wrapper` package has been deleted as it is no longer needed. Users who were using the deprecated cli-wrapper engine will automatically use the toolkit-lib engine instead.

The `--unstable=toolkit-lib-engine` flag is also no longer needed and will emit a warning if used.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.64%. Comparing base (c13141e) to head (2e395de).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1108      +/-   ##
==========================================
- Coverage   87.70%   87.64%   -0.06%     
==========================================
  Files          72       72              
  Lines       10121    10121              
  Branches     1337     1334       -3     
==========================================
- Hits         8877     8871       -6     
- Misses       1219     1225       +6     
  Partials       25       25              
Flag Coverage Δ
suite.unit 87.64% <ø> (-0.06%) ⬇️

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.

@mrgrain mrgrain changed the title refactor(integ-runner)!: remove deprecated cli-wrapper engine feat(integ-runner): toolkit-lib-engine is now the only engine (removes old cli-wrapper engine) Feb 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

Total lines changed 2226 is greater than 1000. Please consider breaking this PR down.

@mrgrain mrgrain force-pushed the mrgrain/refactor/integ-runner/remove-deprecated-cli-engine branch from 607886b to c91da48 Compare February 3, 2026 12:29
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 6386a54 Feb 3, 2026
30 checks passed
@aws-cdk-automation aws-cdk-automation deleted the mrgrain/refactor/integ-runner/remove-deprecated-cli-engine branch February 3, 2026 13:37
github-merge-queue Bot pushed a commit that referenced this pull request Mar 26, 2026
…CommandOptions (#1232)

Fixes #1231

When an integration test specifies a profile via
`cdkCommandOptions.deploy.args.profile`:

```typescript
new IntegTest(app, 'my-test', {
  testCases: [myStack],
  cdkCommandOptions: {
    deploy: {
      args: { profile: 'deploy-profile' },
    },
  },
});
```

The profile is silently ignored. The `ToolkitLibRunnerEngine` creates a
single `Toolkit` instance at construction time with credentials locked
to the runner-level profile (from `--profiles` CLI flag or machine
default). The engine's `deploy()` and `destroy()` methods receive the
correct profile in their options but never use it.

This capability existed implicitly in the old `cli-wrapper` engine
(removed in #1108) which spawned separate CLI processes per action, each
with its own `--profile` flag.

#### Changes

Single file: `packages/@aws-cdk/integ-runner/lib/engines/toolkit-lib.ts`

- Extracted `createToolkit(profile, region)` helper from the constructor
- Added `toolkitFor(options)` that returns a new `Toolkit` when the
per-action profile differs from the constructor profile, or reuses the
existing one when they match
- Updated `deploy()`, `destroy()`, and `cx()` to use the appropriate
toolkit

#### Testing

Added 3 tests in
`packages/@aws-cdk/integ-runner/test/engines/toolkit-lib.test.ts`:

- Deploy with override profile creates new Toolkit with correct
credentials
- Destroy with override profile creates new Toolkit with correct
credentials
- Deploy with same profile reuses existing Toolkit (no perf regression)

All 149 existing tests continue to pass.


### Checklist
- [ ] This change contains a major version upgrade for a dependency and
I confirm all breaking changes are addressed
  - Release notes for the new version:

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

---------

Co-authored-by: Sai Ray <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 3, 2026
…onfiguration (#1306)

Fixes #1305

`integ-runner` now supports `--proxy` and `--ca-bundle-path` CLI options
to configure proxy settings for all AWS API calls. When no `--proxy`
flag is given, proxy settings are auto-detected from
`HTTPS_PROXY`/`HTTP_PROXY` environment variables. The `--ca-bundle-path`
option reads a PEM certificate bundle, falling back to the
`AWS_CA_BUNDLE` environment variable. Both options can also be set via
`integ.config.json`.

Previously, `ToolkitLibRunnerEngine` did not pass proxy or CA bundle
options to the `Toolkit` constructor's `sdkConfig`. The AWS SDK v3's
`NodeHttpHandler` creates its own `https.Agent` which bypasses proxy
environment variables, so a proxy-aware agent must be explicitly
provided. This became a regression when the toolkit-lib engine became
the default in #906 and the old CLI engine was removed in #1108. The old
engine spawned `cdk` as a child process which handled proxy settings
internally. The new engine runs in-process but never wired up the proxy
configuration.

The fix uses `proxy-agent` (the same library as the CDK CLI) to create
proxy-aware agents that are passed as `sdkConfig.httpOptions.agent` to
the Toolkit constructor. Both `ProxyAgent` and `Toolkit` instances are
cached by their resolved configuration to avoid creating duplicates
across engine instances. Per-action options from `DefaultCdkOptions` can
override the engine defaults through a dedicated `ActionOptions`
interface.

### Checklist
- [ ] This change contains a major version upgrade for a dependency and
I confirm all breaking changes are addressed
  - Release notes for the new version:

---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license
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