Repository navigation
ADK changes - #4
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_757876517
branch
from
May 12, 2025 22:06
61e0d29 to
71f7f81
Compare
PiperOrigin-RevId: 757928489
copybara-service
Bot
force-pushed
the
test_757876517
branch
from
May 12, 2025 22:07
71f7f81 to
6e98311
Compare
ruslan-kurchenko
referenced
this pull request
in ruslan-kurchenko/adk-java
Oct 30, 2025
Issue #4: Client Initialization in SingleFlow - Implement lazy singleton pattern with double-checked locking - Add GOOGLE_CLOUD_PROJECT environment variable support - Add error logging when cache manager initialization fails - Prevent resource leaks and improve debuggability Issue #5: Race Condition in Invocation Counter - Move invocation increment from READ (findLatestCacheMetadata) to WRITE (transferCacheMetadataToResponse) - Prevents lost updates in multi-pod environments - Each pod now increments only its own writes (eventually consistent) - Remove shouldIncrementInvocations() and incrementInvocations() methods Issue google#13: Concurrent Cache Creation - Document known limitation with concurrent creation race condition - Add TODO for future distributed locking implementation - Probability is low, impact is minimal ($0.24/day for duplicates) - Duplicates self-correct on next request These fixes address critical multi-pod deployment issues identified in code review, improving production reliability and cost predictability. Testing: ContextCacheProcessorTest (22 tests), GeminiContextCacheManagerTest (34 tests), CacheMetadataTest all pass with BUILD SUCCESS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 14, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 14, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 14, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
glaforge
pushed a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
glaforge
pushed a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
glaforge
pushed a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 22, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 24, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 24, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jun 24, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
…ctService Addresses gemini-code-assist review google#4 and ddobrin maintainer note google#2. - artifactService(...) now receives ObjectProvider<Storage> instead of building its own Storage via StorageOptions.getDefaultInstance(). This ensures the googleCloudStorage() bean is the single Storage source — no duplicate client when GCS is enabled, user-overridable for testing. - Throw BeanCreationException at startup when adk.artifacts.gcs-enabled=true but adk.artifacts.bucket-name is missing/blank (fail fast).
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
Addresses gemini-code-assist review google#5 and ddobrin maintainer note google#4, plus a fix-by-side compile bug for VertexAiSessionService. Session (AdkSessionAutoConfiguration): - Replace Optional.empty(), Optional.empty() with null, null — the current VertexAiSessionService(String, String, @nullable GoogleCredentials, @nullable HttpOptions) constructor does not accept Optional<...> so the PR did not compile against ADK 1.4.1-SNAPSHOT. - Throw BeanCreationException at startup when adk.session.type=VERTEX_AI is selected without project-id or location. - Add FIRESTORE enum value with a fail-fast message that directs users to the contrib/firestore-session-service module (the Firestore branch itself lives in AdkFirestoreSessionAutoConfiguration, gated by @ConditionalOnClass). Memory (AdkMemoryAutoConfiguration): - Throw BeanCreationException for adk.memory.type=VERTEX_AI (no Vertex AI memory service exists in ADK today; silent downgrade to InMemory was misleading). - Add FIRESTORE enum value with the same classpath-missing guidance. Style across artifacts/session/memory: - Replace nested if-then-throw patterns with guard clauses + early return. - Replace static isBlank(String) helper with Optional.ofNullable(...).filter(s -> !s.isBlank()) Optional pipelines. - Switch expressions (case X -> ...) for the enum branches.
mekkiamiri
added a commit
to mekkiamiri/adk-java
that referenced
this pull request
Jul 3, 2026
Addresses ddobrin maintainer note google#4. AdkRunConfigProperties now binds the operational subset called out by the reviewer: - streamingMode (was already there) - maxLlmCalls (default 500, matching RunConfig.builder()) - toolExecutionMode (default NONE, matching RunConfig.builder()) - saveInputBlobsAsArtifacts (default false) - autoCreateSession (default false, matching the new RunConfig field added since the PR was opened) AdkRunConfigAutoConfiguration applies all five to RunConfig.builder(). Out of scope for this property surface (left to user-defined RunConfig beans via @ConditionalOnMissingBean): speechConfig, responseModalities, inputAudioTranscription, outputAudioTranscription, avatarConfig.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADK changes