-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[INS-249] Updated Gitlab client from v0.129.0 to v1.12.0(latest) #4655
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
base: main
Are you sure you want to change the base?
[INS-249] Updated Gitlab client from v0.129.0 to v1.12.0(latest) #4655
Conversation
|
Please do not merge this before this one: #4608 I want these changes to go to Enterprise first. |
go.mod
Outdated
| replace github.com/coinbase/waas-client-library-go => github.com/trufflesecurity/waas-client-library-go v1.0.9 | ||
|
|
||
| // TODO: v1.134.0 is available but deprecates existing Auth methods, should be updated separately | ||
| replace gitlab.com/gitlab-org/api/client-go => gitlab.com/gitlab-org/api/client-go v0.129.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To update the version, this pinned entry must be removed as well. Otherwise, the build will continue to use v0.129.0 no matter what version is listed below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
kashifkhan0771
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to resolve the conflicts.
Thank you for waiting. The PR is merged, you can resolve the conflicts and we can review this PR. |
Removed unused 'time' import from gitlab.go
pkg/sources/gitlab/gitlab.go
Outdated
| gitlab.WithCustomRetryWaitMinMax(time.Second, 5*time.Second), | ||
| gitlab.WithCustomRetryMax(3), | ||
| ) | ||
| apiClient, err := gitlab.NewAuthSourceClient(&gitlab.PasswordCredentialsAuthSource{Username: s.user, Password: s.password}, gitlab.WithBaseURL(s.url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split this line like before to make it cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Agree w/ Shahzad; I was born in the 1980s and I can only read so far to the right; probably like:
apiClient, err := gitlab.NewAuthSourceClient(
&gitlab.PasswordCredentialsAuthSource{
Username: s.user,
Password: s.password,
},
gitlab.WithBaseURL(s.url),
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
camgunz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG! Just want that line split up then merge away 👍🏻
pkg/sources/gitlab/gitlab.go
Outdated
| gitlab.WithCustomRetryWaitMinMax(time.Second, 5*time.Second), | ||
| gitlab.WithCustomRetryMax(3), | ||
| ) | ||
| apiClient, err := gitlab.NewAuthSourceClient(&gitlab.PasswordCredentialsAuthSource{Username: s.user, Password: s.password}, gitlab.WithBaseURL(s.url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Agree w/ Shahzad; I was born in the 1980s and I can only read so far to the right; probably like:
apiClient, err := gitlab.NewAuthSourceClient(
&gitlab.PasswordCredentialsAuthSource{
Username: s.user,
Password: s.password,
},
gitlab.WithBaseURL(s.url),
)
Description:
This pull request introduces the following changes:
v0.129.0tov1.12.0in go.mod.filesystem_integration_test.goandgitlab_integration_test.godue to missing import ofdefaultspackage.gitlab_integration_test.goto make sure that the test passes.basic auth, scoped repotest to use creds of non-2fa account as gitlab no longer allows repo to be cloned with password of a 2fa enabled account.Checklist:
make test-community)?make lintthis requires golangci-lint)?