Skip to content

Commit

Permalink
docs: Add 404 Not Found github notification error to troubleshootin…
Browse files Browse the repository at this point in the history
…g docs
  • Loading branch information
moleus committed Sep 24, 2024
1 parent b824956 commit 2a9ba4b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/operator-manual/notifications/troubleshooting-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,31 @@ template.example: |
repoURLPath: "{{ (index .app.spec.sources 0).repoURL }}"
```

### Error message `POST https://api.github.com/repos/xxxx/yyyy/statuses/: 404 Not Found`

This case is similar to the previous one, you have multiple sources in the Application manifest.
Default `revisionPath` template `{{.app.status.operationState.syncResult.revision}}` is for an Application with single source.
Here is the link to the [source code](https://github.com/argoproj/argo-cd/blob/b8249567ae1afe657f3d2f235dc3724880c91370/pkg/apis/application/v1alpha1/types.go#L1407)
where `revisions` field is defined.

Application status in yaml for multiple source is like this:

```yaml
status:
operationState:
syncResult:
revisions:
- 38cfa22edf9148caabfecb288bfb47dc4352dfc6
- 38cfa22edf9148caabfecb288bfb47dc4352dfc6
```

Quick fix for this is to use `index` function to get the first revision:
```yaml
template.example: |
github:
revisionPath: "{{index .app.status.operationState.syncResult.revisions 0}}"
```

## config referenced xxx, but key does not exist in secret

- If you are using a custom secret, check that the secret is in the same namespace
Expand Down

0 comments on commit 2a9ba4b

Please sign in to comment.