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

bitbucket server eventsource regressions #3175

Closed
tooptoop4 opened this issue Jun 21, 2024 · 6 comments
Closed

bitbucket server eventsource regressions #3175

tooptoop4 opened this issue Jun 21, 2024 · 6 comments
Labels
bug Something isn't working stale

Comments

@tooptoop4
Copy link
Contributor

in v1.8.1 everything worked fine
but in v1.9.2 it fails for few reasons

  1. accesstoken is mandatory now https://github.com/argoproj/argo-events/blob/v1.9.2/eventsources/sources/bitbucketserver/start.go#L225

  2. list webhooks fails now (not all users have access for that)
    https://github.com/argoproj/argo-events/blob/v1.9.2/eventsources/sources/bitbucketserver/start.go#L336

what i'm confused with is why this is now trying to list/create webhook directly on bitbucket when before the eventsource would purely setup an independent endpoint that could be curled. and u could manually create the bitbucket webhook in bitbucket ui itself to point to the endpoint.

cc @ryancurrah

@tooptoop4 tooptoop4 added the bug Something isn't working label Jun 21, 2024
@ryancurrah
Copy link
Contributor

Hrm that's probably a regression. I will take look next week when I'm back from vacation.

@ryancurrah
Copy link
Contributor

Fixed in my latest change to #3135. We are turning off webhook management as we are using Bitbucket v8 now and it has the ability to manage repository webhooks at the project level, negating the need for this feature. When we turned it off we ran into the same problem. I am validating the fix over the next day.

@tooptoop4
Copy link
Contributor Author

i still see stuff like "applyBitbucketServerWebhooks ensures all configured repositories have the correct webhook settings applied." can you make it have an option to not make any api calls to bitbucket? i want argo-events to listen to a port, then i manually configure bitbucket with my personal user (outside of argo) to point requests to the port

@ryancurrah
Copy link
Contributor

ryancurrah commented Jun 26, 2024

It skips creating webhooks if the following conditions are not met.

func (b BitbucketServerEventSource) ShouldCreateWebhooks() bool {
	return b.AccessToken != nil &&
		b.Webhook != nil &&
		b.Webhook.URL != "" &&
		((len(b.GetBitbucketServerRepositories()) > 0 && b.GetBitbucketServerRepositories() != nil) || len(b.Projects) > 0)
}

Additionally checkout the below code. Where when setting up the event source it determines if bitbucket clients should be setup and webhooks.

https://github.com/argoproj/argo-events/pull/3135/files?diff=unified&w=0#diff-db89328aef0ace4823c4f3574140ac35a0d1dc7c7e4d24db4d926fb862489f4fR78-R94

Copy link
Contributor

This issue has been automatically marked as stale because it has not had
any activity in the last 60 days. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
@tooptoop4
Copy link
Contributor Author

crunchy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants