digger icon indicating copy to clipboard operation
digger copied to clipboard

Bug: - GitHub Action CI Backendless mode + Terragrunt will cause a segmentation fault

Open ben-of-codecraft opened this issue 9 months ago • 2 comments

Steps to recreate

  1. Use digger config

digger.yaml

projects:
- name: dev
  dir: dev
  terragrunt: true
  
  1. use workflow config
name: Digger Workflow

on:
workflow_dispatch:
  inputs:
    id:
      description: 'run identifier'
      required: false
    job:
      required: true
    comment_id:
      required: true

jobs:
plan:
  runs-on: ubuntu-latest
  permissions:
    contents: write
    actions: write
    id-token: write
    pull-requests: write
    statuses: write

  steps:
  - uses: actions/checkout@v4
  - name: digger run
    uses: diggerhq/[email protected]
    with:
      setup-aws: true
      setup-terragrunt: true
      setup-checkov: false
      aws-role-to-assume: "REDACTED"
      no-backend: true
      aws-region: us-west-2
    env:
      GITHUB_CONTEXT: ${{ toJson(github) }}
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

image

ben-of-codecraft avatar May 03 '24 18:05 ben-of-codecraft

Hey @ben-of-codecraft ! Thanks for identifying this bug. I noticed you are using it with the app and that error message is coming from there, however you have no-backend: true set in the action argument. Is this argument intended or you wanted to remove it?

I think we should throw an error earlier if the flag no-backend is set yet the workflow dispatch event invoked digger. If you remove that flag and confirm it works we can ship a fix for this particular case

motatoes avatar May 04 '24 11:05 motatoes

@motatoes retested this today. The cause was the dispatch with no-backend = true. If you change it to PR workflow and no dispatch, it does work fine, as you pointed out.

Thanks for looking at this.

I think an earlier error that helps users know what is causing the problem would be great.

ben-of-codecraft avatar May 06 '24 18:05 ben-of-codecraft