Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for github service notifications with multi source apps #224

Open
CarlosLanderas opened this issue Sep 28, 2023 · 0 comments
Open

Comments

@CarlosLanderas
Copy link

CarlosLanderas commented Sep 28, 2023

As described in this issue, it looks like the github notification service has not implemented the support for multi source applications and it's returning an out of range error as it's only considering the repoURL inside single source definition (that is "" when using multi source)

error:

Index out of range [1] with length 1\ngoroutine 189 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/argoproj/notifications-engine/pkg/controller.(*notificationController).processQueueItem.func1()\n\t/go/pkg/mod/github.com/argoproj/[email protected]/pkg/controller/controller.go:258 +0x65\npanic({0x3788a00, 0xc000c6cc48})\n\t/usr/local/go/src/runtime/panic.go:890 +0x263\ngithub.com/argoproj/notifications-engine/pkg/services.gitHubService.Send({{{0x3211380, 0xc0019cbdf8}, {0x3211380, 0xc0019cbe08}, {0xc00075e000, 0x68f}, {0x0, 0x0}}, 0xc0004ce600}, {{0xc00037f3a0, ...}, ...}, ...)\n\t/go/pkg/mod/github.com/argoproj/[email protected]/pkg/services/github.go:280 +0x6c9\ngithub.com/argoproj/notifications-engine/pkg/api.

It looks like it's working with a fixed repoUrl template

In our case, we are using three different sources with 2 repositories:

  • One using a helm chart from first repository
  • Another one using a ref to another repository to pick chart value files
  • A third one to apply manifests

Something like:

  sources:
    - repoURL: 'https://artifactory/chart'
      chart: chart-name
      targetRevision: 'branch'
      helm:
        valueFiles:
          - $values/folder/values.yaml
          - $values/folder/values2.yaml
        
    - repoURL: 'repo2'
      targetRevision: 'branch'
      ref: values

    - repoURL: 'repo2'
      targetRevision: 'branch'
      path: 'manifests-path'

So our app revisions looks like

[
  "2.2.3",
  "b9cc369644fe34f7a85942266ae0b1fcb26b1de1",
  "b9cc369644fe34f7a85942266ae0b1fcb26b1de1"
]

I've been playing a bit with the code and managed to extract the repository from multi source by modifying the template but the main problem I found is... to which repository do you send the github update with a setup like this without extending the application spec to be able to configure the target notification repository? (or similar)

Is there any plan to adapt this service to be able to inspect multi source repo urls and revisions?

Thanks in advance

@CarlosLanderas CarlosLanderas changed the title Add support for github commit status notifications with multi source apps Add support for github service notifications with multi source apps Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant