Skip to content

Fix multiple integration test issues - #740

Merged
yec-akamai merged 4 commits into
linode:devfrom
yec-akamai:fix-vpu-availability
Sep 9, 2026
Merged

Fix multiple integration test issues#740
yec-akamai merged 4 commits into
linode:devfrom
yec-akamai:fix-vpu-availability

Conversation

@yec-akamai

@yec-akamai yec-akamai commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Fix integration test failures seeing in the CI workflow:

  1. VPU plan can be unavailable when the region availability endpoint still returns it as available in a certain region. Skip it when the VPU plan is actually unavailable for testing.
  2. Add polling to IPs and IPv6 lookup to resolve lags in vpc creations.
  3. Switch the linode plan to a more stable one without (or less) occasionally plans unavailable issue.

✔️ How to Test

make test-int TEST_ARGS="-k test_create_vpu"
make test-int TEST_ARGS="-k test_get_vpu"
make test-int TEST_ARGS="-k test_create_vpc"

@yec-akamai
yec-akamai requested review from a team as code owners September 9, 2026 14:09
@yec-akamai yec-akamai added the hotfix urgent fixes for production issues. label Sep 9, 2026
@yec-akamai
yec-akamai requested review from mawilk90 and zliang-akamai and a lite review from Copilot and removed request for a team September 9, 2026 14:09

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

The new skip condition is implemented via a brittle str(e) substring match that can break if ApiError formatting changes, risking continued test flakiness.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Linode VPU integration-test fixture to skip VPU tests when instance creation fails due to real-time VPU capacity shortages, even if the region availability endpoint reports the plan as available.

Changes:

  • Wrap VPU instance creation in a try/except ApiError block.
  • Skip the VPU test session when the API indicates the selected VPU plan is not available in the chosen region.
File summaries
File Description
test/integration/models/linode/test_linode.py Adds defensive skip logic around VPU instance creation to avoid false failures when VPU capacity is exhausted.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread test/integration/models/linode/test_linode.py
@yec-akamai yec-akamai changed the title Skip the VPU test when no VPU capacity available Fix multiple integration test issues Sep 9, 2026
@yec-akamai
yec-akamai requested a lite review from Copilot September 9, 2026 14:49

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.

🔵 Needs a closer look

The new polling uses wait_for_condition (which raises on timeout), making the subsequent asserts unreachable and reducing test failure clarity unless adjusted.

Review details

Suppressed comments (2)

test/integration/models/linode/test_linode.py:1046

  • wait_for_condition raises TimeoutError on failure, so the subsequent assert matched_ip is not None is unreachable and you lose the more specific failure message about which IP was missing. Catch the timeout and raise an assertion with the test-specific context instead.
        matched_ip = wait_for_condition(5, 120, resolve_vpc_ip)

        assert (
            matched_ip is not None
        ), f"Expected VPC IP {vpc_ip.address} not found in /vpcs/ips"

test/integration/models/linode/test_linode.py:1077

  • Same issue as above: wait_for_condition raises TimeoutError, so assert matched_ipv6 is unreachable and the test loses the helpful message identifying the Linode/VPC. Convert the timeout into an assertion with that context.
        matched_ipv6 = wait_for_condition(5, 120, resolve_vpc_ipv6)

        assert (
            matched_ipv6
        ), f"No VPC IPv6 found for Linode {linode.id} in VPC {vpc.id}"
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

🟢 Approval recommended

The changes are isolated to integration tests, align with existing test utilities (e.g., wait_for_condition), and improve stability without altering SDK runtime behavior.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@lgarber-akamai lgarber-akamai 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.

LGTM!

Comment thread test/integration/models/linode/test_linode.py
@yec-akamai
yec-akamai merged commit bda548e into linode:dev Sep 9, 2026
12 checks passed
@yec-akamai
yec-akamai deleted the fix-vpu-availability branch September 9, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix urgent fixes for production issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants