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

control-service: java 17 #1439

Merged
merged 72 commits into from
Jan 25, 2023
Merged

control-service: java 17 #1439

merged 72 commits into from
Jan 25, 2023

Conversation

murphp15
Copy link
Collaborator

@murphp15 murphp15 commented Dec 14, 2022

Why

Java 17 is more secure and needed for a lot of modern libraries.
More details can be seen here: #1440

What

When using java 17 time.now() returns nanosecond accuracy.
This causes problems for us because we only store micro second accuracy in the database.
To overcome this for a lot of tests we use timestamps which are accurate to micro seconds only.

How has this been tested?

Unit and integration tests

closes: #1440
Signed-off-by: murphp15 murphp15@tcd.ie

Signed-off-by: murphp15 <murphp15@tcd.ie>
murphp15 and others added 27 commits December 14, 2022 10:15
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
murphp15 and others added 9 commits January 25, 2023 13:05
@murphp15 murphp15 changed the title DRAFT control-service: java 17 control-service: java 17 Jan 25, 2023
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
@mivanov1988
Copy link
Contributor

Great, thanks for dealing with this!

murphp15 and others added 2 commits January 25, 2023 14:27
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
@murphp15 murphp15 enabled auto-merge (squash) January 25, 2023 15:59
@vmware vmware deleted a comment from ivakoleva Jan 25, 2023
@murphp15 murphp15 merged commit 5088731 into main Jan 25, 2023
@murphp15 murphp15 deleted the person/murphp15/java_17 branch January 25, 2023 16:16
Copy link
Contributor

@ivakoleva ivakoleva left a comment

Choose a reason for hiding this comment

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

LGTM
nit: maybe link at major diff 11->17 transition in case you've looked for it

* java .now() gives nano-second precision and it causes tests written before we adopted that java
* version to fail.
*/
public static OffsetDateTime getTimeAccurateToMicroSecond() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the documentation great. My only concern is with duplicated methods
with JobExecutionUtil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to java 17 or greater
5 participants