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

leaderelection sanity e2e integration tests #1463

Merged
merged 1 commit into from Jan 3, 2021

Conversation

himanshug
Copy link
Contributor

follow up #1460

these tests also exercise all different Lock implementations.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 29, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 29, 2020
@himanshug himanshug changed the title leaderelection sanity e2e integration tests [WORK-IN-PROGRESS]leaderelection sanity e2e integration tests Dec 29, 2020
@himanshug himanshug force-pushed the leader_shutdown branch 2 times, most recently from 3df7f51 to 2a3438b Compare December 30, 2020 10:17
@himanshug himanshug changed the title [WORK-IN-PROGRESS]leaderelection sanity e2e integration tests leaderelection sanity e2e integration tests Dec 30, 2020
@himanshug
Copy link
Contributor Author

alright, this is ready now.

this.lockType = lockType;

// Lease resource requires special care with DateTime
if (lockType == LockType.Lease) {
Copy link
Member

Choose a reason for hiding this comment

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

dang, the original kubernetes type requires a RFC3339 micro-sec timestamp here however joda-time wont support such precision anymore JodaOrg/joda-time#139. i think we should consider getting #1418 merged so that serialization for micro-sec timestamp can work.

@himanshug can you add a TODO comment here saying:

TODO: switch date-time library so that micro-sec timestamp can be serialized in RFC3339 format w/ correct precision

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done... yeah Lease resource creation etc should just work out of the box :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that said, unrelated to this PR but, "serialization" code by default can either emit to ISO8601 or RFC3339 ... if k8s can accept RFC3339 for all the date-time fields in all the resources then we can switch the default serialization format in JSON.java to be RFC3339 or else Lease object serialization would need to be handled as a special case even after the switch somewhere.

Copy link
Member

@yue9944882 yue9944882 left a comment

Choose a reason for hiding this comment

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

thanks a bunch! additionally plz squash the commits into one. otherwise LGTM

@himanshug himanshug force-pushed the leader_shutdown branch 2 times, most recently from d50d858 to 606df7d Compare December 31, 2020 17:53
@brendandburns
Copy link
Contributor

/lgtm
/approve

Thanks for writing these tests!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, himanshug

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2021
@k8s-ci-robot k8s-ci-robot merged commit 42b5069 into kubernetes-client:master Jan 3, 2021
@himanshug
Copy link
Contributor Author

thanks @brendanburns , @yue9944882

@himanshug
Copy link
Contributor Author

@brendanburns can we do a new release that includes leader election code updates ? Please let me know if you would like me to help with any logistics. thanks.

@himanshug
Copy link
Contributor Author

@brendanburns are these changes expected to be present in 10.0.1 release (looks like that from the tagged commit hash), I didn't get them when upgraded to 10.0.1 ? I see the changes in LeaderElector.java file from source zip on github ( https://github.com/kubernetes-client/java/archive/client-parent-java-10.0.1.zip ) but not in the one inside maven repository ( https://repo1.maven.org/maven2/io/kubernetes/client-java-extended/10.0.1/client-java-extended-10.0.1-sources.jar ) .. am I missing something? thanks

@himanshug himanshug deleted the leader_shutdown branch January 13, 2021 04:33
@himanshug
Copy link
Contributor Author

I think I have been tagging the wrong Brendan in my previous messages. @brendandburns please see above messages, thanks.

@himanshug
Copy link
Contributor Author

@brendandburns releases pages appears to say that release 10.0.1 is built from commit hash 6267ff3 (Date: Tue Jan 5 18:26:37 2021 +0800) and released on Jan 6th , however inside maven repo I see that all files were uploaded on Dec 21st 2020 ( https://repo1.maven.org/maven2/io/kubernetes/client-java-extended/10.0.1/ ) , those files are most likely not built using commit 6267ff3 .
Can you please do a 10.0.2 release with latest code? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants