Skip to content

test flake: TestUpdateValidateRichParameters/ParameterOptionChanged #9748

Closed
@spikecurtis

Description

@spikecurtis
clitest.go:70: invoking command: coder --global-config /tmp/TestUpdateValidateRichParametersParameterOptionChanged3381714613/004 update my-workspace
    t.go:85: 2023-09-18 11:48:08.450 [debu]  GET  host=localhost:38407  path=/api/v2/entitlements  proto=HTTP/1.1  remote_addr=127.0.0.1  took=68.539µs  status_code=404  latency_ms=0  request_id=15d01e00-d22b-4daa-ac68-6bd022b56606
    t.go:85: 2023-09-18 11:48:08.450 [debu]  GET  host=localhost:38407  path=/api/v2/buildinfo  proto=HTTP/1.1  remote_addr=127.0.0.1  took=72.666µs  status_code=200  latency_ms=0  request_id=72710419-0aa4-4ae5-a542-ddf7b94973c2
    t.go:85: 2023-09-18 11:48:08.457 [debu]  GET  host=localhost:38407  path=/api/v2/users/me/workspace/my-workspace  proto=HTTP/1.1  remote_addr=127.0.0.1  took=6.80519ms  status_code=200  latency_ms=6  request_id=d116693a-36a6-4b6d-8002-4020f6d275c8
    t.go:85: 2023-09-18 11:48:08.457 [debu]  GET  host=localhost:38407  path=/api/v2/templates/9d6c0c9c-d060-49ae-9f5f-ad009b19891a  proto=HTTP/1.1  remote_addr=127.0.0.1  took=210.526µs  status_code=200  latency_ms=0  request_id=7ff5e26a-adbc-4735-a32f-61809652804d
    t.go:85: 2023-09-18 11:48:08.458 [debu]  GET  host=localhost:38407  path=/api/v2/workspacebuilds/7ba7e28a-731d-43d8-8227-[541](https://github.com/coder/coder/actions/runs/6221932508/job/16884861380?pr=9717#step:5:542)aa6dab5d1/parameters  proto=HTTP/1.1  remote_addr=127.0.0.1  took=292.951µs  status_code=200  latency_ms=0  request_id=2b09e60d-635e-42f8-a2eb-9135b0ba8387
    t.go:85: 2023-09-18 11:48:08.459 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c  proto=HTTP/1.1  remote_addr=127.0.0.1  took=411.926µs  status_code=200  latency_ms=0  request_id=36a93d2b-7f55-41a4-984a-60eaa689d7d5
    t.go:85: 2023-09-18 11:48:08.467 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/rich-parameters  proto=HTTP/1.1  remote_addr=127.0.0.1  took=7.425749ms  status_code=200  latency_ms=7  request_id=cc8a48c0-3514-441a-bcdf-728d6e20c46e
    ptytest.go:131: 2023-09-18 11:48:08.467: cmd: "string_parameter"
    ptytest.go:131: 2023-09-18 11:48:08.467: cmd: ""
    ptytest.go:131: 2023-09-18 11:48:08.467: cmd: "> first_option"
    t.go:85: 2023-09-18 11:48:08.467 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/gitauth  proto=HTTP/1.1  remote_addr=127.0.0.1  took=197.071µs  status_code=200  latency_ms=0  request_id=808dd3ec-f915-4852-8042-a2d21e530881
    t.go:85: 2023-09-18 11:48:08.468 [debu]  acquirer: got job posting  posting={"type":"echo","tags":{"scope":"organization"}}
    t.go:85: 2023-09-18 11:48:08.468 [debu]  POST  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/dry-run  proto=HTTP/1.1  remote_addr=127.0.0.1  took=340.019µs  status_code=201  latency_ms=0  request_id=6cbf9441-da10-4a7b-adbd-dc865aaa3052
    t.go:85: 2023-09-18 11:48:08.468 [debu]  acquirer: got clearance to call database  worker_id=c10e1392-4f1c-4516-a8a5-7fd21771c929  provisioner_types="[echo terraform]"  tags={"scope":"organization"}
    t.go:85: 2023-09-18 11:48:08.468 [debu]  acquirer: successfully acquired job  worker_id=c10e1392-4f1c-4516-a8a5-7fd21771c929  provisioner_types="[echo terraform]"  tags={"scope":"organization"}
    t.go:85: 2023-09-18 11:48:08.468 [debu]  inmem-provisionerd-practical_chaum4: locked job from database  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.468 [debu]  inmem-provisionerd-practical_chaum4: closed stream  error=<nil>
    t.go:85: 2023-09-18 11:48:08.468 [debu]  provisionerd: graceful acquire done  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  error=<nil>
    t.go:85: 2023-09-18 11:48:08.468 [debu]  provisionerd: acquired job  initiator_username=testuser  provisioner=echo  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    ptytest.go:131: 2023-09-18 11:48:08.468: cmd: "Planning workspace..."
    ptytest.go:131: 2023-09-18 11:48:08.468: cmd: "==> ⧗ Queued"
    t.go:85: 2023-09-18 11:48:08.468 [debu]  provisionerd.runner: acquired job is template dry-run  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  workspace_name=my-workspace  rich_parameter_values="[name:\"string_parameter\"  value:\"1\"]"  variable_values=[]
    t.go:85: 2023-09-18 11:48:08.468 [info]  echo: unpacking template source archive  session_id=2a03356e-058c-4ca4-8ebd-0c48d3573fd5  size_bytes=3072
    t.go:85: 2023-09-18 11:48:08.469 [debu]  echo: extracted file  session_id=2a03356e-058c-4ca4-8ebd-0c48d3573fd5  size_bytes=2  path=/tmp/TestUpdateValidateRichParametersParameterOptionChanged3381714613/002/Session2a03356e-058c-4ca4-8ebd-0c48d3573fd5/0.parse.protobuf  mode=-rw-r--r--
    t.go:85: 2023-09-18 11:48:08.469 [debu]  echo: extracted file  session_id=2a03356e-058c-4ca4-8ebd-0c48d3573fd5  size_bytes=2  path=/tmp/TestUpdateValidateRichParametersParameterOptionChanged3381714613/002/Session2a03356e-058c-4ca4-8ebd-0c48d3573fd5/0.apply.protobuf  mode=-rw-r--r--
    t.go:85: 2023-09-18 11:48:08.469 [debu]  echo: extracted file  session_id=2a03356e-058c-4ca4-8ebd-0c48d3573fd5  size_bytes=161  path=/tmp/TestUpdateValidateRichParametersParameterOptionChanged3381714613/002/Session2a03356e-058c-4ca4-8ebd-0c48d3573fd5/0.plan.protobuf  mode=-rw-r--r--
    t.go:85: 2023-09-18 11:48:08.469 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/dry-run/8514366b-98b2-4e87-aafc-3df40a6f9873  proto=HTTP/1.1  remote_addr=127.0.0.1  took=335.701µs  status_code=200  latency_ms=0  request_id=7b94b4b6-f524-4046-a8a4-db8b36475e35
    t.go:85: 2023-09-18 11:48:08.469 [info]  provisionerd.runner: parse dry-run provision successful  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  resource_count=0  resources=[]
    ptytest.go:131: 2023-09-18 11:48:08.469: cmd: "=== ✔ Queued [0ms]"
    ptytest.go:131: 2023-09-18 11:48:08.469: cmd: "==> ⧗ Running"
    t.go:85: 2023-09-18 11:48:08.469 [debu]  inmem-provisionerd-practical_chaum4: stage UpdateJob starting  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.469 [debu]  inmem-provisionerd-practical_chaum4: job log  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  stage="Setting up"  output=""
    t.go:85: 2023-09-18 11:48:08.469 [debu]  inmem-provisionerd-practical_chaum4: job log  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  stage="Cleaning Up"  output=""
    t.go:85: 2023-09-18 11:48:08.470 [debu]  inmem-provisionerd-practical_chaum4: inserted job logs  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.470 [debu]  inmem-provisionerd-practical_chaum4: published job logs  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.470 [debu]  provisionerd.runner: sending CompletedJob  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.470 [info]  echo: recv done on Session  session_id=2a03356e-058c-4ca4-8ebd-0c48d3[573](https://github.com/coder/coder/actions/runs/6221932508/job/16884861380?pr=9717#step:5:574)fd5  error=EOF
    t.go:85: 2023-09-18 11:48:08.470 [debu]  queried job after subscribe  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  request_id=87f7e7f5-f4af-48e9-a526-45b1ffb81270  complete=false
    t.go:85: 2023-09-18 11:48:08.470 [debu]  echo: cleaned up work directory  session_id=2a03356e-058c-4ca4-8ebd-0c48d3573fd5
    t.go:85: 2023-09-18 11:48:08.470 [debu]  querying logs  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  request_id=87f7e7f5-f4af-48e9-a526-45b1ffb81270  after=0
    t.go:85: 2023-09-18 11:48:08.470 [debu]  inmem-provisionerd-practical_chaum4: stage CompleteJob starting  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.470 [debu]  wrote log to websocket  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  request_id=87f7e7f5-f4af-48e9-a526-45b1ffb81270  id=17
    t.go:85: 2023-09-18 11:48:08.470 [debu]  wrote log to websocket  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873  request_id=87f7e7f5-f4af-48e9-a526-45b1ffb81270  id=18
    t.go:85: 2023-09-18 11:48:08.470 [debu]  inmem-provisionerd-practical_chaum4: marked template dry-run job as completed  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    ptytest.go:131: 2023-09-18 11:48:08.470: cmd: "=== ✔ Running [0ms]"
    ptytest.go:131: 2023-09-18 11:48:08.470: cmd: "==> ⧗ Setting up"
    update_test.go:616: 2023-09-18 11:48:08.470: cmd: matched "string_parameter" = "string_parameter"
    t.go:85: 2023-09-18 11:48:08.470 [debu]  inmem-provisionerd-practical_chaum4: stage CompleteJob done  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    update_test.go:619: 2023-09-18 11:48:08.470: cmd: stdin: "second_option\r"
    update_test.go:616: 2023-09-18 11:48:08.470: cmd: matched "Planning workspace..." = "\r\n\r\n> first_option\r\nPlanning workspace..."
    ptytest.go:131: 2023-09-18 11:48:08.470: cmd: "=== ✔ Setting up [1ms]"
    ptytest.go:131: 2023-09-18 11:48:08.470: cmd: "==> ⧗ Cleaning Up"
    t.go:85: 2023-09-18 11:48:08.470 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/dry-run/8514366b-98b2-4e87-aafc-3df40a6f9873/logs  proto=HTTP/1.1  remote_addr=127.0.0.1  took=880.826µs  status_code=101  latency_ms=0  request_id=87f7e7f5-f4af-48e9-a526-45b1ffb81270
    t.go:85: 2023-09-18 11:48:08.470 [debu]  provisionerd.runner: sent CompletedJob  job_id=8514366b-98b2-4e87-aafc-3df40a6f9873
    t.go:85: 2023-09-18 11:48:08.471 [debu]  provisionerd: start of acquireAndRunOne
    t.go:85: 2023-09-18 11:48:08.471 [debu]  acquirer: acquiring job  worker_id=c10e1392-4f1c-4516-a8a5-7fd21771c929  provisioner_types="[echo terraform]"  tags={"scope":"organization"}
    t.go:85: 2023-09-18 11:48:08.471 [debu]  acquirer: got clearance to call database  worker_id=c10e1392-4f1c-4516-a8a5-7fd21771c929  provisioner_types="[echo terraform]"  tags={"scope":"organization"}
    t.go:85: 2023-09-18 11:48:08.471 [debu]  acquirer: no job available  worker_id=c10e1392-4f1c-4516-a8a5-7fd21771c929  provisioner_types="[echo terraform]"  tags={"scope":"organization"}
    t.go:85: 2023-09-18 11:48:08.471 [debu]  GET  host=localhost:38407  path=/api/v2/templateversions/7965eec7-e2f1-40c6-9468-03292ceb2c5c/dry-run/8514366b-98b2-4e87-aafc-3df40a6f9873  proto=HTTP/1.1  remote_addr=127.0.0.1  took=287.841µs  status_code=200  latency_ms=0  request_id=e720378a-0b33-49f2-8c8f-b4b1338cc719
    clitest.go:246: command "coder update" exited with error: running command "coder update": dry-run workspace:
            github.com/coder/coder/v2/cli.prepWorkspaceBuild
                /home/runner/actions-runner/_work/coder/coder/cli/create.go:302
          - 
    ptytest.go:131: 2023-09-18 11:48:08.471: cmd: "second_option"
    clitest.go:157: 
        	Error Trace:	/home/runner/actions-runner/_work/coder/coder/cli/clitest/clitest.go:157
        	            				/opt/hostedtoolcache/go/1.20.7/x64/src/runtime/asm_amd64.s:1[598](https://github.com/coder/coder/actions/runs/6221932508/job/16884861380?pr=9717#step:5:599)
        	Error:      	Received unexpected error:
        	            	running command "coder update": dry-run workspace:
        	            	    github.com/coder/coder/v2/cli.prepWorkspaceBuild
        	            	        /home/runner/actions-runner/_work/coder/coder/cli/create.go:302
        	            	  - 
        	Test:       	TestUpdateValidateRichParameters/ParameterOptionChanged

It looks to me that the CLI isn't waiting for the input of second_option before kicking off the dry-run.

Full logs at: https://github.com/coder/coder/actions/runs/6221932508/job/16884861380?pr=9717

Metadata

Metadata

Assignees

Labels

s4Internal bugs (e.g. test flakes), extreme edge cases, and bug risks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions