abcxyz / guardian

Apache License 2.0
17 stars 1 forks source link

fix: entrypoints command returns empty json array instead of null #419

Closed gjonathanhong closed 2 weeks ago

github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱

Guardian will run for the following directories

Directories terraform/project1 terraform/project2

github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 PLAN 🟩 SUCCESS [logs]

Entrypoint: terraform/project2

Details ```diff Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # null_resource.empty will be created + resource "null_resource" "empty" { + id = (known after apply) } Plan: 1 to add, 0 to change, 0 to destroy. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 PLAN 🟩 SUCCESS [logs]

Entrypoint: terraform/project1

Details ```diff Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # null_resource.empty will be created + resource "null_resource" "empty" { + id = (known after apply) } Plan: 1 to add, 0 to change, 0 to destroy. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 APPLY 🟩 SUCCESS [logs]

Entrypoint: terraform/project1

Details ```diff null_resource.empty: Creating... null_resource.empty: Creation complete after 0s [id=6371372144717276286] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 APPLY 🟩 SUCCESS [logs]

Entrypoint: terraform/project2

Details ```diff null_resource.empty: Creating... null_resource.empty: Creation complete after 0s [id=8171816750108666291] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ```
sethvargo commented 2 weeks ago

This is fine, but it's still error-prone. It would be better if we used a custom encoder. This has coupled the business logic with the presentation logic. https://blog.gopheracademy.com/advent-2016/advanced-encoding-decoding/