-
Notifications
You must be signed in to change notification settings - Fork 172
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
Migrated leader election to lease API #120
Conversation
@aojea Why is the change here in wrong. I asked wojtekt (on slack) about how to approach this issue, he said that we have to just reuse the existing infrastructure now. So he suggested to change So then why tests are failing here ? Also can you make me understand the reason for this change @snOm3ad made in his PR and do we need this change here too ? |
The client-go vresion seems to old , 0.19.1, it has to bump it to a versions with the |
you have to update in the go.mod, see an example |
Apologies for asking for help time and time again. |
check the job logs, it gives you hints
I think that you can run those tests manually and test locally too |
@aojea I am not able to make any sense of these logs and make out what is the cause of these jobs failing. Also you mentioned running these tests manually and locally, are you talking about running |
I pasted the logs errorrs
it is failing because the golang dependencies are not correct |
go.mod
Outdated
github.com/prometheus/client_golang v1.5.1 | ||
github.com/prometheus/client_model v0.2.0 | ||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect | ||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 | ||
k8s.io/api v0.19.1 | ||
k8s.io/apimachinery v0.19.1 | ||
k8s.io/apimachinery v0.23.3 | ||
k8s.io/client-go v0.19.1 |
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.
you should bump this one too, to have all k8s libs from the same ver.
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.
@jsafrane As @aojea mentioned by seeing the failing logs after bumping k8s.io/client-go
, we need to new golang version for io/fs
package but we don't have an idea where it is configured.
Do you have any idea about this ? Please inform.
you are progressing, it fails now in
|
@aojea I am not sure about what to here. As you mentioned this error is shown Do we have to correct the module path manually somewhere or we have to import some dependencies to fix it ? |
A quick search with that error in Google shows it requires a newer golang version ... I don't know where is that configured in this repo |
/retest |
@aojea, @jsafrane But now they are not showing any logs, build_log.txt is empty for What could be the reason behind it ? |
@aojea I have tried many times previously to build the repo locally but it seems like my system does not meet the minimum requirements. Is there any other way? And what do you mean by |
what requirements?
|
The logs are too big, click on Artifacts on the top right to get to a text file. |
@NikhilSharmaWe run go test locally and check it pass? |
@NikhilSharmaWe the problem is that the CI using golang >=1.17 where the build tag syntax changed. for example, // +build !windows,!linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo should now be:
better to fix it automatically in the entire repository by running |
@yonatankahana Yes I also did that before but after that I was getting error related to that. Trying it again. Also do we need to change the go version in go.mod. |
now its failing but from a different reason. the script |
@yonatankahana If the the script But I am not able to understand what type of tags are we searching for here. Could you please explain. |
@NikhilSharmaWe the |
ok, next. now he complains about missing |
@@ -181,8 +181,8 @@ def get_regexs(): | |||
# dates can be 2014, 2015, 2016, ..., CURRENT_YEAR, company holder names can be anything | |||
years = range(2014, date.today().year + 1) | |||
regexs["date"] = re.compile( '(%s)' % "|".join(map(lambda l: str(l), years)) ) | |||
# strip // +build \n\n build constraints | |||
regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE) | |||
# strip (// go:build \n\n) and (// +build \n\n) build constraints |
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.
there should be no space between //
and go:build
@NikhilSharmaWe ok now the actual go tests are failing. running |
controller/controller.go
Outdated
@@ -865,7 +865,7 @@ func (ctrl *ProvisionController) Run(ctx context.Context) { | |||
go ctrl.volumeStore.Run(ctx, DefaultThreadiness) | |||
|
|||
if ctrl.leaderElection { | |||
rl, err := resourcelock.New("endpoints", | |||
rl, err := resourcelock.New("endpointsleases", |
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.
you can use the constant resourcelock.EndpointsLeasesResourceLock
here
try to change ctrl.client.CoordinationV1(), |
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.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: NikhilSharmaWe, wongma7, yonatankahana The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@yonatankahana++ for helping and getting this IN!! |
Fixes #111