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

feat(appset): add SCM-Manager to Pull Request and SCM Provider Generators #14332

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

eheimbuch
Copy link

@eheimbuch eheimbuch commented Jul 4, 2023

This PR implements the functionality of Pull Request Generator for SCM-Manager Repos. Also we added SCM-Manager to be available as SCM Provider.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

@eheimbuch eheimbuch changed the title Initial implementation of SCM-Manager Support feat: Initial implementation of SCM-Manager Support Jul 4, 2023
@eheimbuch eheimbuch changed the title feat: Initial implementation of SCM-Manager Support feat(appset): add Pull Request Generator for SCM-Manager Jul 4, 2023
@eheimbuch eheimbuch force-pushed the feature/scm_manager_support branch 3 times, most recently from 6910010 to 77aa1ff Compare July 5, 2023 09:40
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Attention: Patch coverage is 56.80000% with 108 lines in your changes missing coverage. Please review.

Project coverage is 55.19%. Comparing base (c739478) to head (207ce7b).

Files with missing lines Patch % Lines
applicationset/webhook/webhook.go 44.23% 22 Missing and 7 partials ⚠️
...pplicationset/services/scm_provider/scm-manager.go 76.63% 18 Missing and 7 partials ⚠️
applicationset/generators/scm_provider.go 0.00% 17 Missing ⚠️
applicationset/generators/pull_request.go 0.00% 14 Missing ⚠️
...pplicationset/services/pull_request/scm-manager.go 70.73% 8 Missing and 4 partials ⚠️
util/webhook/webhook.go 57.14% 4 Missing and 2 partials ⚠️
.../apis/application/v1alpha1/applicationset_types.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14332      +/-   ##
==========================================
+ Coverage   55.16%   55.19%   +0.03%     
==========================================
  Files         337      339       +2     
  Lines       57039    57289     +250     
==========================================
+ Hits        31464    31620     +156     
- Misses      22874    22946      +72     
- Partials     2701     2723      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eheimbuch eheimbuch marked this pull request as ready for review July 6, 2023 12:43
@ishitasequeira ishitasequeira changed the title feat(appset): add Pull Request Generator for SCM-Manager feat(appset): add SCM-Manager to Pull Request and SCM Provider Generators Aug 29, 2023
Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eheimbuch for the PR!! A couple nits and a general question.

Should we also provide the ability for the user to configure a cert bundle on the appset controller so that users don't have to disable cert validation similar to Gitlab SCMProvider?

@pfeuffer
Copy link

Hi @ishitasequeira !

Should we also provide the ability for the user to configure a cert bundle on the appset controller so that users don't have to disable cert validation similar to Gitlab SCMProvider?

We would skip this feature from our side for now and would be very greatful to see this first step going live. Thanks for your review, we highly appreciate this.

@eheimbuch
Copy link
Author

Hi @ishitasequeira,

we fixed your review some time ago and still waiting for your feedback / pr merge. We have more integrations for SCM Manager with ArgoCD in our pipeline, but are hesitant due to the status of this pull request.

@eheimbuch eheimbuch requested review from a team as code owners November 7, 2023 07:06
@eheimbuch eheimbuch force-pushed the feature/scm_manager_support branch from 8d381ad to 2ea0341 Compare November 7, 2023 07:40
@eheimbuch
Copy link
Author

Bump @ishitasequeira

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eheimbuch @pfeuffer Apologies for lack of response on this PR and getting back to you so late.

IMO, disabling the cert validation is a security risk and we should support that feature from the start. It would be highly appreciated if you could get the support added for cert validation. We do have a reference available for similar use-case. Ref PR: #14348

@pfeuffer
Copy link

Hi @ishitasequeira , thanks for the feedback. We will add this and report back when we're finished.

@sdorra sdorra force-pushed the feature/scm_manager_support branch from 9d576ed to 01b684f Compare August 8, 2024 14:23
@karat-1 karat-1 force-pushed the feature/scm_manager_support branch 4 times, most recently from 6f047d3 to a182c30 Compare August 20, 2024 09:23
@sdorra sdorra force-pushed the feature/scm_manager_support branch 2 times, most recently from 14e8829 to 59bd2e6 Compare August 21, 2024 07:26
@pfeuffer
Copy link

Hey @ishitasequeira , thanks for the patience! We've added the cert validation and it would be great if you could take a look again.

@tidiegeler tidiegeler force-pushed the feature/scm_manager_support branch 3 times, most recently from 88df022 to f194b97 Compare November 21, 2024 07:53
Signed-off-by: Till-André Diegeler <[email protected]>
@tidiegeler tidiegeler force-pushed the feature/scm_manager_support branch from f194b97 to 2941102 Compare November 21, 2024 08:23
@tidiegeler tidiegeler force-pushed the feature/scm_manager_support branch from 3c5a762 to 1dca723 Compare November 22, 2024 05:44
@pfeuffer pfeuffer force-pushed the feature/scm_manager_support branch from 0eadd5d to ad51074 Compare December 5, 2024 07:46
@pfeuffer pfeuffer force-pushed the feature/scm_manager_support branch from cc6e582 to 2dd4620 Compare December 5, 2024 15:06
@pfeuffer pfeuffer force-pushed the feature/scm_manager_support branch from 164b98d to b003349 Compare December 6, 2024 13:44
Copy link

@tidiegeler tidiegeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some minor questions / points

func (g *ScmManagerProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error) {
repos := []*Repository{}
filter := g.client.NewRepoListFilter()
filter.Limit = 9999

This comment was marked as resolved.

@@ -323,6 +357,13 @@ var azuredevopsAllowedPullRequestActions = []string{
"git.pullrequest.updated",
}

var scmManagerAllowedPullRequestActions = []string{

This comment was marked as resolved.

}
infoUrl, err := url.Parse(info.SCMManager.Host)
if err != nil {
log.Errorf("Failed to parse SCM-Manager URL '%s'", info.SCMManager.Host)

This comment was marked as resolved.

This comment was marked as resolved.

@@ -234,6 +244,7 @@ func TestWebhookHandler(t *testing.T) {
assert.Equal(t, test.expectedStatusCode, w.Code)

list := &v1alpha1.ApplicationSetList{}
fmt.Printf("List: %v\n", list)

This comment was marked as resolved.

assert.True(t, ok)
})

t.Run("does not exists", func(t *testing.T) {

This comment was marked as resolved.

@tidiegeler
Copy link

Hi @ishitasequeira , thank you for having taken a look at our PR over a year ago.

It has been a long time and the matter was postponed on our side until a few months ago. We were putting a lot of effort into reaching a stable state for our solution and were also tackling the remaining steps on the native Argo-CD side. The solution is now able to be merged with the most recent states; if a merge conflict still occurs, it may be due to a recent (minor) divergence.

Is this state acceptable, so that it can be officially taken as an addition to the Argo-CD project?

Thank you!

Signed-off-by: René Pfeuffer <[email protected]>
@pfeuffer pfeuffer force-pushed the feature/scm_manager_support branch from 207ce7b to 2915145 Compare January 7, 2025 14:59
@tidiegeler
Copy link

Bump @ishitasequeira

@tidiegeler
Copy link

tidiegeler commented Feb 6, 2025

Bump @ishitasequeira

👋 This is from an argoproj PR.

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

Successfully merging this pull request may close these issues.

4 participants