Skip to content

test(ebs): fix weekly acceptance test failures - #716

Merged
hariom-hashicorp merged 1 commit into
mainfrom
fix/ebs-acceptance-test-failures
Oct 14, 2026
Merged

hariom-hashicorp merged 1 commit into
mainfrom
fix/ebs-acceptance-test-failures

Conversation

@hariom-hashicorp

@hariom-hashicorp hariom-hashicorp commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes three main issues:

  1. Dead AMI — The hardcoded source AMI we were using got deregistered. Instead of pinning to a specific AMI ID, we now dynamically look up the latest hc-security-base-ubuntu-2204 image. This way tests stay green even when AMIs change.

  2. Instance type capacity — We were using t2.micro instances, which kept hitting capacity issues in certain AZs. Bumping to t3.micro (and t3.small where needed) gives us more reliable test runs.

  3. Ubuntu compatibility — We switched the base images to Ubuntu, so the provisioning scripts needed updates:

    • Changed package manager from dnf to apt-get
    • Fixed SSH password auth setup to work with Ubuntu's sshd config structure
    • Switched shell assertions from Bash-specific [[ ]] to POSIX [ ] for better portability
  • Skiped the two previously failing reboot acceptance scenarios will take care in the upcoming fix:
    • TestAccBuilder_EbsSSMRebootProvisioner
    • TestAccBuilder_PrivateKeyFileWithReboot

@hariom-hashicorp
hariom-hashicorp requested a review from a team as a code owner October 9, 2026 04:59
@hariom-hashicorp
hariom-hashicorp force-pushed the fix/ebs-acceptance-test-failures branch 3 times, most recently from 4fc4fb2 to 61c3b17 Compare October 12, 2026 08:23
@taru-garg-2000
taru-garg-2000 requested a balanced review from Copilot October 12, 2026 09:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unconditional skips remove important reboot and reconnection acceptance coverage without bounded tracking.

1 open finding
What changed in this PR

Updates EBS acceptance fixtures to improve weekly test reliability.

Changes:

  • Dynamically selects current Ubuntu 22.04 AMIs.
  • Updates instance types and Ubuntu provisioning commands.
  • Disables two failing reboot acceptance tests.
File Description
builder/​ebs/​test-fixtures/​unlimited-credits/​burstable_spot_instances.pkr.hcl Modernizes spot-instance fixture.
builder/​ebs/​test-fixtures/​unlimited-credits/​burstable_instances.pkr.hcl Modernizes on-demand fixture.
builder/​ebs/​builder_acc_test.go Updates SSH setup and instance types; skips reboot tests.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread builder/ebs/builder_acc_test.go
@taru-garg-2000

Copy link
Copy Markdown
Member

Looks good! I think we should be good once the remaining 2 are fixed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

SSM status errors can trigger tunnel termination before the reboot begins.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread common/acceptance/ssm.go Outdated
}

// A reboot that completes between two polls may never show as disconnected; carry on in that case.
_ = waitFor(ssmtypes.ConnectionStatusNotConnected, ssmAgentDownTimeout)

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.

the helper only acts after the build logs rebooting VM, and it is test-only code. The gap needs a GetConnectionStatus failure in the ~10s between the reboot being issued and the SSM agent going down. If that happens, the worst case is that this test run hangs and fails as before; there is no impact on the plugin or users.

@hariom-hashicorp
hariom-hashicorp force-pushed the fix/ebs-acceptance-test-failures branch 2 times, most recently from 148677b to 26b10c0 Compare October 13, 2026 06:45
@hariom-hashicorp
hariom-hashicorp force-pushed the fix/ebs-acceptance-test-failures branch from 26b10c0 to 58b3d26 Compare October 14, 2026 08:03
@hariom-hashicorp
hariom-hashicorp merged commit a17b083 into main Oct 14, 2026
12 checks passed
@hariom-hashicorp
hariom-hashicorp deleted the fix/ebs-acceptance-test-failures branch October 14, 2026 08:09
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