Skip to content

core: combined epoch seconds and nanos changes in TimeProvider - #11604

Merged
kannanjgithub merged 29 commits into
grpc:masterfrom
vinodhabib:defect-5494-timeprovider-changes
Oct 29, 2024
Merged

core: combined epoch seconds and nanos changes in TimeProvider#11604
kannanjgithub merged 29 commits into
grpc:masterfrom
vinodhabib:defect-5494-timeprovider-changes

Conversation

@vinodhabib

@vinodhabibvinodhabib commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

Added changes to get the Timestamp in epoch nanoseconds.

Fixes#5494

Comment threadcore/src/main/java/io/grpc/internal/TimeProvider.java Outdated
kannanjgithub
kannanjgithub previously approved these changes Oct 10, 2024
@@ -0,0 +1,43 @@
/*
* Copyright 2017 The gRPC Authors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change it to 2024.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed

Comment threadcore/src/test/java/io/grpc/internal/TimeProviderTest.java Outdated
@kannanjgithub
kannanjgithub dismissed their stale reviewOctober 10, 2024 07:36

Suggested some more changes.

Comment threadcore/src/test/java/io/grpc/internal/TimeProviderTest.java Outdated
kannanjgithub
kannanjgithub previously approved these changes Oct 10, 2024
@ejona86ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 10, 2024
@grpc-kokorogrpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 10, 2024

@ejona86ejona86 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We shouldn't do this.

Comment threadcore/src/main/java/io/grpc/internal/TimeProvider.java
Comment threadcore/src/main/java/io/grpc/internal/TimeProvider.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/TimeProvider.java
Comment threadcore/src/test/java/io/grpc/internal/TimeProviderTest.java Outdated
@vinodhabibvinodhabib changed the title grpc-core: combined epoch seconds and nanos changes in TimeProvidercore: combined epoch seconds and nanos changes in TimeProviderOct 18, 2024
Comment threadcore/src/main/java/io/grpc/internal/InstantTimeProvider.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/InstantTimeProvider.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/TimeProviderResolverFactory.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/TimeProviderResolverFactory.java Outdated
Comment threadcore/src/test/java/io/grpc/internal/InstantTimeProviderTest.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/InstantTimeProvider.java Outdated
Comment threadcore/src/main/java/io/grpc/internal/InstantTimeProvider.java Outdated
Comment threadcore/src/test/java/io/grpc/internal/InstantTimeProviderTest.java Outdated
Comment threadcore/src/test/java/io/grpc/internal/InstantTimeProviderTest.java Outdated

@ejona86ejona86 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tell us when you're ready for it to be merged.

Comment threadcore/src/main/java/io/grpc/internal/InstantTimeProvider.java Outdated
@kannanjgithub
kannanjgithub dismissed their stale reviewOctober 25, 2024 07:53

Need to review new changes.

@ejona86ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 28, 2024
@grpc-kokorogrpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 28, 2024
@kannanjgithub
kannanjgithub merged commit 9176b55 into grpc:masterOct 29, 2024
@vinodhabib
vinodhabib deleted the defect-5494-timeprovider-changes branch November 6, 2024 07:43
diegomarquezp added a commit to googleapis/sdk-platform-java that referenced this pull request Jan 24, 2025
### Approach
Register `java.time.Instant` to the reflection configuration of gax-grpc
(see [grpc code interacting with this
class](grpc/grpc-java#11604))
This comes from a behavior change in Graal for JDK 22, which introduced
a new class initialization strategy called strict image heap, which is
[enforced by default since
then](https://www.graalvm.org/release-notes/JDK_22/).
### Proof:
```
com.google.showcase.v1beta1.EchoClientTest > blockExceptionTest SUCCESSFUL
Test run finished after 95953 ms
[ 30 containers found ]
[ 0 containers skipped ]
[ 30 containers started ]
[ 0 containers aborted ]
[ 30 containers successful ]
[ 0 containers failed ]
[ 337 tests found ]
[ 1 tests skipped ]
[ 336 tests started ]
[ 0 tests aborted ]
[ 336 tests successful ]
[ 0 tests failed ]
[INFO]
[INFO] --- jacoco:0.8.12:report (report) @ gapic-showcase ---
[INFO] Loading execution data file /usr/local/google/home/diegomarquezp/google/sdk-platform-java/showcase/gapic-showcase/target/jacoco.exec
[INFO] Analyzed bundle 'GAPIC Showcase Client' with 125 classes
[WARNING] Classes in bundle 'GAPIC Showcase Client' do not match with execution data. For report generation the same class files must be used as at runtime.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceStub does not match.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonMessagingCallableFactory does not match.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonSequenceServiceCallableFactory does not match.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonTestingCallableFactory does not match.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonTestingStub does not match.
[WARNING] Execution data for class com/google/showcase/v1beta1/stub/HttpJsonMessagingStub does not match.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for GAPIC Showcase Client Core Parent 0.0.1-SNAPSHOT:
[INFO]
[INFO] GAPIC Showcase Client Core Parent .................. SUCCESS [ 1.709 s]
[INFO] proto-gapic-showcase-v1beta1 ....................... SUCCESS [ 0.900 s]
[INFO] grpc-gapic-showcase-v1beta1 ........................ SUCCESS [ 0.385 s]
[INFO] GAPIC Showcase Client .............................. SUCCESS [05:29 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:34 min
[INFO] Finished at: 2025-01-20T19:04:42Z
[INFO] ------------------------------------------------------------------------
```
@github-actionsgithub-actionsBot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Channelz should use milliseconds for timestamps

5 participants

@vinodhabib@panchenko@ejona86@kannanjgithub@grpc-kokoro