Skip to content

Occasional test failures due to timeout on registry request #126

Open
@kmoe

Description

@kmoe

The fix for this may well be in Core or the registry, but filing here for now.

Tests runs occasionally fail with a Failed to query available provider packages error like the following:

=== RUN   TestStateMv/basic_with_state-0.14.4
    util_test.go:111: [INFO] running Terraform command: /tmp/tfinstall187681955/v-0.14.4/terraform init -no-color -force-copy -input=false -lock-timeout=0s -backend=true -get=true -upgrade=false -lock=true -get-plugins=true -verify-plugins=true
    state_mv_test.go:23: error running Init in test directory: exit status 1
        
        Error: Failed to query available provider packages
        
        Could not retrieve the list of available versions for provider hashicorp/null:
        could not connect to registry.terraform.io: Failed to request discovery
        document: Get "https://registry.terraform.io/.well-known/terraform.json":
        net/http: request canceled while waiting for connection (Client.Timeout
        exceeded while awaiting headers)
        
--- FAIL: TestStateMv (13.12s)
    --- SKIP: TestStateMv/basic_with_state-0.11.14 (0.23s)
    --- SKIP: TestStateMv/basic_with_state-0.12.30 (0.47s)
    --- PASS: TestStateMv/basic_with_state-0.13.6 (1.12s)
    --- FAIL: TestStateMv/basic_with_state-0.14.4 (11.31s)

Example failing test run: https://app.circleci.com/pipelines/github/hashicorp/terraform-exec/661/workflows/bdc5a99c-63da-4f12-ad66-52df573f600c/jobs/9510

The tests pass when rerun.

More examples needed, but suspect this can happen during any test that runs terraform init.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds investigationIt's not clear whether this concerns terraform-exec, and may require testing more moving partsupstream/terraform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions