Skip to content

Fix flaky tests due to change in feature configuration. - #1277

Merged
Sam Byng (sam-byng) merged 1 commit into
devcontainers:mainfrom
Kaniska244:fix-flaky-tests
Aug 11, 2026
Merged

Fix flaky tests due to change in feature configuration.#1277
Sam Byng (sam-byng) merged 1 commit into
devcontainers:mainfrom
Kaniska244:fix-flaky-tests

Conversation

@Kaniska244

@Kaniska244 Kaniska (Kaniska244) commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes two flaky/failing tests caused by a change in feature configuration. The deprecated terraform shorthand now resolves to terraform:1, which declares github-cli as a hard dependency. As a result, the resolved feature set includes an additional feature, so the expected counts in the affected tests needed to be updated.

Changes

  • src/test/container-features/containerFeaturesOrder.test.ts

    • Updated expected resolved feature count from 3 to 4.
    • Added the expected ghcr.io/devcontainers/features/github-cli entry (pulled in transitively via terraform:1).
    • Added an inline comment explaining why the extra dependency is present.
  • src/test/container-features/e2e.test.ts

    • Updated the expected featureSets.length assertion from 3 to 4 to account for the github-cli hard dependency.
    • Added an inline comment for clarity.

Why

The terraform shorthand resolving to terraform:1 introduces github-cli as a hard dependency during feature resolution. The tests were asserting the pre-change counts, causing them to fail intermittently/consistently. This PR realigns the assertions with the current, correct feature resolution behavior.

Testing

  • Verified the affected Feature Dependencies and Dev Container Features E2E (remote) tests pass with the updated expectations.

Notes

  • Test-only change; no production/runtime code is modified.
  • Net diff: 2 files changed, +10 / -2.

@Kaniska244
Kaniska (Kaniska244) marked this pull request as ready for review August 11, 2026 09:14
@Kaniska244
Kaniska (Kaniska244) requested a review from a team as a code owner August 11, 2026 09:14
@sam-byng
Sam Byng (sam-byng) merged commit d53bff6 into devcontainers:main Aug 11, 2026
24 checks passed
@Kaniska244
Kaniska (Kaniska244) deleted the fix-flaky-tests branch August 12, 2026 09:29
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.

2 participants