elastic / apm-k8s-attacher

Elastic APM Attacher for Kubernetes
https://www.elastic.co/guide/en/apm/attacher/current/apm-attacher.html
Apache License 2.0
7 stars 12 forks source link

Fix failed notifications on release #116

Closed jackshirazi closed 3 months ago

jackshirazi commented 3 months ago

APM K8s Attacher version (apm-k8s-attacher version): 1.1.1

Describe the bug Notifications failed on the release action

To Reproduce Steps to reproduce the behavior:

  1. Would need to release, so don't do that

Expected behavior Notification action succeeds

Provide logs (if relevant):

2024-08-07T16:05:16.6529772Z ##[group]Run slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e
2024-08-07T16:05:16.6530309Z with:
2024-08-07T16:05:16.6530540Z   channel-id: #apm-agent-java
2024-08-07T16:05:16.6533954Z   payload: {
  "attachments": [
    {
      "pretext": "Workflow <https://github.com/elastic/apm-k8s-attacher/actions/runs/10285452897/attempts/2|release> triggered (`push`)",
      "color": "good",
      "text": ":ghost: [elastic/apm-k8s-attacher] Release *v1.1.1* has been triggered in GitHub Actions.
Build: (<https://github.com/elastic/apm-k8s-attacher/actions/runs/10285452897|here>)
",
      "fields": [
        {
          "title": "Workflow",
          "short": true,
          "value": "<https://github.com/elastic/apm-k8s-attacher/actions/runs/10285452897/attempts/2|release #12>"
        },
        {
          "title": "Ref",
          "short": true,
          "value": "`v1.1.1`"
        }
      ],
      "footer": "<https://github.com/elastic/apm-k8s-attacher|elastic/apm-k8s-attacher>",
      "footer_icon": "https://slack-imgs.com/?c=1&o1=wi32.he32.si&url=https%3A%2F%2Fslack.github.com%2Fstatic%2Fimg%2Ffavicon-neutral.png"
    }
  ]
}

2024-08-07T16:05:16.6537340Z   payload-file-path-parsed: true
2024-08-07T16:05:16.6537644Z env:
2024-08-07T16:05:16.6538102Z   SLACK_BOT_TOKEN: ***
2024-08-07T16:05:16.6539284Z   SLACK_MESSAGE: :ghost: [elastic/apm-k8s-attacher] Release *v1.1.1* has been triggered in GitHub Actions.
Build: (<https://github.com/elastic/apm-k8s-attacher/actions/runs/10285452897|here>)

2024-08-07T16:05:16.6540648Z   RUN_URL: https://github.com/elastic/apm-k8s-attacher/actions/runs/10285452897/attempts/2
2024-08-07T16:05:16.6541189Z ##[endgroup]
2024-08-07T16:05:16.7939161Z passed in payload was invalid JSON
2024-08-07T16:05:16.7990369Z ##[error]Error: Need to provide valid JSON payload
2024-08-07T16:05:16.8152020Z Cleaning up orphan processes