Skip to content

Panic when updating comment in GitHub PR #2003

@Orbsynated

Description

@Orbsynated

Hello,
I'm encountering issues when running digger plan in my terragrunt project.
It runs terragrunt plan sucessfuly but fails to update the corresponding GitHub PR comment(as seen in cli/pkg/digger/digger.go:162)

.github/workflows/digger_workflow.yml:

name: Digger Workflow

on:
  workflow_dispatch:
    inputs:
      spec:
        required: true
      run_name:
        required: false

run-name: "${{inputs.run_name}}"

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: write # required to merge PRs
      actions: write # required for plan persistence
      id-token: write # required for workload-identity-federation
      pull-requests: write # required to post PR comments
      issues: read # required to check if PR number is an issue or not
      statuses: write # required to validate combined PR status

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install tfmigrate
        run: bash .github/scripts/tfmigrate.sh

      - name: digger run
        uses: diggerhq/digger@ec77f5be2d78db212e81656cf7dcf14192947043 # v0.6.109
        with:
          setup-terragrunt: true
          terragrunt-version: v0.82.3
          setup-terraform: true
          terraform-version: ~1.12
          digger-spec: ${{ inputs.spec }}
          setup-aws: true
          aws-role-to-assume: ........
          aws-region: us-east-1
          configure-checkout: false
          reporting-strategy: latest_run_comment
          cache-dependencies: true
          no-backend: true
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

digger.yaml:

comment_render_mode: group_by_module
delete_prior_comments: true
telemetry: false
generate_projects:
  blocks:
    - block_name: mgmt
      terragrunt: true
      terragrunt_parsing: &common_terragrunt_parsing
        parallel: true
        dependsOnOrdering: true
        executionOrderGroups: true
        preserveProjects: true
      root_dir: ....../mgmt
      aws_role_to_assume:
        state: $$$

    - block_name: integration
      terragrunt: true
      terragrunt_parsing: *common_terragrunt_parsing
      root_dir: ....../integration
      aws_role_to_assume:
        state: $$$

    - block_name: stg
      terragrunt: true
      terragrunt_parsing: *common_terragrunt_parsing
      root_dir: ....../stg
      aws_role_to_assume:
        state: $$$

    - block_name: dev
      terragrunt: true
      terragrunt_parsing: *common_terragrunt_parsing
      root_dir: ....../dev
      aws_role_to_assume:
        state: $$$

    - block_name: prod
      terragrunt: true
      terragrunt_parsing: *common_terragrunt_parsing
      root_dir: ....../prod
      aws_role_to_assume:
        state: $$$
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Warning: Deprecated attribute

  on .terraform/modules/sqs/outputs.tf line 17, in output "queue_arn_static":
  17:   value       = var.create && !var.use_name_prefix ? "arn:${data.aws_partition.current.partition}:sqs:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${local.name}" : ""

The attribute "name" is deprecated. Refer to the provider documentation for
details.

(and one more similar warning elsewhere)
14:17:11.664 INFO   Shutting down Terragrunt Cache server...
14:17:11.664 INFO   Terragrunt Cache server stopped
time=2025-06-29T14:17:11.667Z level=INFO msg="Running Terragrunt command" command.binary=terragrunt command.args="[show -no-color -json ....../integration_sqs.tfplan]" command.workingDir=....../sqs
time=2025-06-29T14:17:15.023Z level=INFO msg="reporter is suppressed, ignoring messages"
time=2025-06-29T14:17:15.023Z level=INFO msg="reporter is suppressed, ignoring messages"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x23921ef]

goroutine 1 [running]:
github.com/diggerhq/digger/cli/pkg/digger.RunJobs({0xc000d19550, 0x1, 0x0?}, {0x34c30c8, 0xc000b642d0}, {0x3472f80, 0xc000b64390}, {0x34a7f00, 0x4ed7ac0}, {0x34ac2b0, ...}, ...)
	/home/runner/work/_actions/diggerhq/digger/ec77f5be2d78db212e81656cf7dcf14192947043/cli/pkg/digger/digger.go:162 +0x116f
github.com/diggerhq/digger/cli/pkg/spec.RunSpec({{0x0, 0x0}, {0xc0008fa150, 0x10}, {0xc0008fa160, 0xa}, {0x0, 0x0}, {{0xc0008fa13c, 0x4}, ...}, ...}, ...)
	/home/runner/work/_actions/diggerhq/digger/ec77f5be2d78db212e81656cf7dcf14192947043/cli/pkg/spec/spec.go:159 +0x17ad
main.init.func1(0xc0004cf400?, {0x2eafaa6?, 0x4?, 0x2eafa4a?})
	/home/runner/work/_actions/diggerhq/digger/ec77f5be2d78db212e81656cf7dcf14192947043/cli/cmd/digger/default.go:54 +0x15a
github.com/spf13/cobra.(*Command).execute(0x4e775c0, {0x4ed7ac0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x4e778a0)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
main.main()
	/home/runner/work/_actions/diggerhq/digger/ec77f5be2d78db212e81656cf7dcf14192947043/cli/cmd/digger/main.go:27 +0xe7
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions