infracost / infracost

Cloud cost estimates for Terraform in pull requests💰📉 Shift FinOps Left!

Home Page:https://infracost.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when posting comments on v0.10.30

bgauchon-reply opened this issue · comments

Here is the full stack trace of the error. The error appeared after adding news spaces to infracost job. There is no error at generatings costs

  infracost comment github --path=/tmp/infracost_combined.json \
                           --repo=$GITHUB_REPOSITORY \
                           --github-token=*** \
                           --pull-request=200 \
                           --show-all-projects \
                           --behavior=new
  shell: /usr/bin/bash -e {0}
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
    TF_ROOT1: terraform.tfstate.d/control-plane/00_env_setup/
    TF_SPACE1: 00_env_setup
    TF_ROOT2: terraform.tfstate.d/control-plane/01_vpc_security/
    TF_SPACE2: 01_vpc_security
    TF_ROOT3: terraform.tfstate.d/control-plane/02_vpc_shared_app/
    TF_SPACE3: 02_vpc_shared_app
    TF_ROOT4: terraform.tfstate.d/control-plane/03_tgw_routes/
    TF_SPACE4: 03_tgw_routes
    TF_ROOT5: terraform.tfstate.d/control-plane/04_vpn_site2site/
    TF_SPACE5: 04_vpn_site2site
    TF_ROOT6: terraform.tfstate.d/control-plane/05_NGFW/
    TF_SPACE6: 05_NGFW
    TF_ROOT11: terraform.tfstate.d/dev/cicd_infra/
    TF_SPACE11: dev_cicd_infra
    TF_ROOT12: terraform.tfstate.d/dev/networking_infra/
    TF_SPACE12: dev_networking_infra
    TF_ROOT13: terraform.tfstate.d/dev/gitlab-entreprise/
    TF_SPACE13: dev_gitlab-e
    TF_ROOT14: terraform.tfstate.d/dev/certificates/
    TF_SPACE14: dev_certificates
    TF_ROOT15: terraform.tfstate.d/dev/automation/
    TF_SPACE15: dev_automation
    TF_ROOT16: terraform.tfstate.d/dev/veeam_backup/
    TF_SPACE16: dev_o365veeam
    TF_ROOT21: terraform.tfstate.d/prod/certificates/
    TF_SPACE21: prod_certificates
    TF_ROOT22: terraform.tfstate.d/prod/veeam_backup/
    TF_SPACE22: prod_o365veeam
    INFRACOST_ENABLE_CLOUD: false
    INFRACOST_GITHUB_ACTION: true
    INFRACOST_SKIP_UPDATE_CHECK: true
    INFRACOST_VCS_REPOSITORY_URL: https://github.com/reply-fr/REPO_NAME
    INFRACOST_VCS_PULL_REQUEST_URL: https://github.com/reply-fr/REPO_NAME/pull/200
    INFRACOST_LOG_LEVEL: info

Error: An unexpected error occurred

runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/debug/stack.go:24 +0x5e
main.Run.func1()
	/home/runner/work/infracost/infracost/cmd/infracost/main.go:79 +0xb4
panic({0x21f1dc0?, 0x4148da0?})
	/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/panic.go:914 +0x21f
github.com/infracost/infracost/internal/output.tableForDiff({{0x279af3d, 0x3}, {{0xc0005f1574, 0x6}, {0xc0005f1580, 0xa}, {0xc00090c180, 0x28}, {0xc0005f15a0, 0x9}, ...}, ...}, ...)
	/home/runner/work/infracost/infracost/internal/output/diff.go:178 +0x2d6
github.com/infracost/infracost/internal/output.ToDiff({{0x279af3d, 0x3}, {{0xc0005f1574, 0x6}, {0xc0005f1580, 0xa}, {0xc00090c180, 0x28}, {0xc0005f15a0, 0x9}, ...}, ...}, ...)
	/home/runner/work/infracost/infracost/internal/output/diff.go:125 +0xf1b
github.com/infracost/infracost/internal/output.ToMarkdown({{0x279af3d, 0x3}, {{0xc0005f1574, 0x6}, {0xc0005f1580, 0xa}, {0xc00090c180, 0x28}, {0xc0005f15a0, 0x9}, ...}, ...}, ...)
	/home/runner/work/infracost/infracost/internal/output/markdown.go:138 +0x1b8
main.buildCommentOutput(0xc0009082b0?, 0xc0006f86e0, {0xc0009082c0?, 0x2e05af8?, 0x41f62e0?}, {0x0, 0x0, 0x1, 0x0, 0x0, ...})
	/home/runner/work/infracost/infracost/cmd/infracost/comment.go:148 +0x10db
main.commentGitHubCmd.func1(0xc000573900?, {0x279bf9c?, 0x4?, 0x279bf68?})
	/home/runner/work/infracost/infracost/cmd/infracost/comment_github.go:107 +0xb46
github.com/spf13/cobra.(*Command).execute(0xc000573900, {0xc00009c960, 0x6, 0x6})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc000563680)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x38d
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
main.Run(0x0, 0x0)
	/home/runner/work/infracost/infracost/cmd/infracost/main.go:97 +0x186
main.main()
	/home/runner/work/infracost/infracost/cmd/infracost/main.go:41 +0x20d

Environment:
Infracost v0.10.30

An unexpected error occurred. We've been notified of it and will investigate it soon. If you would like to follow-up, please copy the above output and create an issue at: https://github.com/infracost/infracost/issues/new
Error: Process completed with exit code 1.