Skip to content

feat: add more logging around echo tar #10731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Nov 16, 2023

Related: #10599
Spotted in: https://github.com/coder/coder/actions/runs/6804539935/job/18502315372?pr=10598

I wasn't able to reproduce it locally, so I'm adding more logging. It looks like Coder lost part of the "echo responses", unfortunately plan with rich parameters, so the whole test failed as it expected a workspace with build parameters. Without extra debug information we can't determine whether the client sent incomplete "echo responses" or the provisioner lost them while unpacking the template.

Changes:

  • first logging in echo.Tar. I enabled it only for coderdtest.CreateTemplateVersion, but can add it to more places if it isn't too noisy
  • in debug mode provisioner reports MD5 CRC32 checksum for files in the archive

Once this PR is merged:

    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: write proto  name=0.parse.protobuf  message="\x12\x00"
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: proto written  name=0.parse.protobuf  size=2
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: write proto  name=0.apply.protobuf ...
        message= "�����
                 �example�aws_instance���
                 $da51a24a-9914-41b6-992f-967b1fd6e6df��exampleB1
                 �golden-slug��Golden Slug"�http://localhost:1234J$a27f678f-a02e-422f-971a-38bc138ec68b
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: proto written  name=0.apply.protobuf  size=168
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: write proto  name=0.plan.protobuf ...
        message= �V��
                 �first_parameter��string ���
                 �second_parameter��bool ���
                 �third_parameter��number �
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.219 [debu]  client.echo_tar: proto written  name=0.plan.protobuf  size=88
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.223 [debu]  echo: read archive entry  session_id=56462801-0ae8-416f-924b-a1dca686fc0c  name=0.apply.protobuf  mod_time="1970-01-01T01:00:00+01:00"  size=168
    /Users/mtojek/code/coder/coderd/prometheusmetrics/insights/t.go:84: 2023-11-16 12:39:02.224 [debu]  echo: extracted file  session_id=56462801-0ae8-416f-924b-a1dca686fc0c  size_bytes=168  path=/var/folders/82/7tbcycl16pz_7rxv981qdqsh0000gn/T/TestCollectInsights4220252943/002/Session56462801-0ae8-416f-924b-a1dca686fc0c/0.apply.protobuf  mode=-rw-r--r--  checksum=7f74c7cc7f83c4940db761ed029f7da7

@mtojek mtojek self-assigned this Nov 16, 2023
@mtojek mtojek marked this pull request as ready for review November 16, 2023 13:22
@mtojek mtojek merged commit 0e5eecd into main Nov 16, 2023
@mtojek mtojek deleted the 10599-partial-echo-response branch November 16, 2023 15:52
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants