Skip to content

fix: restore ProGuard configuration caching - #842

Merged
apcha-oai merged 2 commits into
mainfrom
apcha/fix-proguard-caching
Aug 13, 2026
Merged

fix: restore ProGuard configuration caching#842
apcha-oai merged 2 commits into
mainfrom
apcha/fix-proguard-caching

Conversation

@apcha-oai

@apcha-oai apcha-oai commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Why

The existing test workflow enables Gradle’s configuration cache, but ProGuard prevents it from being saved:

Task ':openai-java-proguard-test:proguardJar':
cannot serialize object of type 'ShadowJar'

Configuration cache entry discarded with 1 problem.

Example: CI test job.

What changes

Makes the ProGuard and R8 compatibility tasks compatible with Gradle’s configuration cache by passing a resolved JAR path instead of a Gradle task object.

This does not introduce cross-run caching, new secrets, or changes to fork permissions.

Validation

./gradlew :openai-java-proguard-test:test --configuration-cache --configuration-cache-problems=fail
./gradlew :openai-java-proguard-test:lintKotlin

Confirmed that the first test run stores the configuration cache and a subsequent run reuses it.

@apcha-oai
apcha-oai force-pushed the apcha/fix-proguard-caching branch from 9447958 to 9f12858 Compare August 3, 2026 22:15
@apcha-oai apcha-oai changed the title fix proguard caching fix: restore ProGuard configuration caching Aug 3, 2026
@apcha-oai
apcha-oai changed the base branch from codex/cache-ci-build-artifacts to main August 3, 2026 22:15
@apcha-oai
apcha-oai force-pushed the apcha/fix-proguard-caching branch from 9f12858 to 614509e Compare August 3, 2026 22:15
@apcha-oai
apcha-oai marked this pull request as ready for review August 3, 2026 22:16
@apcha-oai
apcha-oai requested a review from a team as a code owner August 3, 2026 22:16
Copilot AI review requested due to automatic review settings August 3, 2026 22:16
@openai-sdks

openai-sdks Bot commented Aug 3, 2026

Copy link
Copy Markdown

OkTest Summary

237/237 SDK tests passed in 16.667s for Java SDK PR #842.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 150ms
tests/chat-completions-create.test.ts ✅ Passed 481ms
tests/chat-completions-stream.test.ts ✅ Passed 318ms
tests/files-content-binary.test.ts ✅ Passed 278ms
tests/files-create-multipart.test.ts ✅ Passed 262ms
tests/files-list-pagination.test.ts ✅ Passed 309ms
tests/initialize-config.test.ts ✅ Passed 206ms
tests/instance-isolation.test.ts ✅ Passed 309ms
tests/models-list.test.ts ✅ Passed 237ms
tests/responses-background-lifecycle.test.ts ✅ Passed 379ms
tests/responses-body-method-errors.test.ts ✅ Passed 527ms
tests/responses-cancel-timeout.test.ts ✅ Passed 228ms
tests/responses-cancel.test.ts ✅ Passed 369ms
tests/responses-compact-retries.test.ts ✅ Passed 335ms
tests/responses-compact.test.ts ✅ Passed 241ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 672ms
tests/responses-create-advanced.test.ts ✅ Passed 1.298s
tests/responses-create-disconnect.test.ts ✅ Passed 1.146s
tests/responses-create-errors.test.ts ✅ Passed 364ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 342ms
tests/responses-create-retries.test.ts ✅ Passed 314ms
tests/responses-create-stream-failures.test.ts ✅ Passed 282ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 261ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.21s
tests/responses-create-stream.test.ts ✅ Passed 406ms
tests/responses-create-terminal-states.test.ts ✅ Passed 312ms
tests/responses-create-timeout.test.ts ✅ Passed 208ms
tests/responses-create.test.ts ✅ Passed 236ms
tests/responses-delete.test.ts ✅ Passed 350ms
tests/responses-input-items-errors.test.ts ✅ Passed 277ms
tests/responses-input-items-list.test.ts ✅ Passed 318ms
tests/responses-input-items-options.test.ts ✅ Passed 503ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 203ms
tests/responses-input-tokens-count.test.ts ✅ Passed 517ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.077s
tests/responses-not-found-errors.test.ts ✅ Passed 391ms
tests/responses-parse.test.ts ✅ Passed 730ms
tests/responses-retrieve-retries.test.ts ✅ Passed 808ms
tests/responses-retrieve.test.ts ✅ Passed 304ms
tests/responses-stored-method-errors.test.ts ✅ Passed 960ms
tests/retry-behavior.test.ts ✅ Passed 3.648s
tests/sdk-error-shape.test.ts ✅ Passed 478ms

View OkTest run #31672797599

SDK merge (fdbd3aaf613e) · head (833b94b93799) · base (2b763fe6ffdc) · OkTest (a845fa206fa4)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR restores Gradle configuration-cache compatibility for the openai-java-proguard-test module by removing direct task-object references (notably ShadowJar) from ProGuard/R8 task configuration, which previously prevented the configuration cache from being saved.

Changes:

  • Introduces a shadowJarFile provider and uses its resolved output path when configuring ProGuard/R8 inputs.
  • Removes explicit notCompatibleWithConfigurationCache(...) markers from ProGuard/R8-related tasks, enabling configuration-cache persistence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HAYDEN-OAI HAYDEN-OAI left a comment

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.

Reviewed Gradle configuration-cache behavior, ProGuard/R8 task inputs and dependencies, cache invalidation, and exact-head CI execution. Both shrinker compatibility checks remain intact; LGTM.

@jbeckwith-oai jbeckwith-oai left a comment

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.

Reviewed the exact-head Gradle configuration-cache fix. The change removes the non-serializable ShadowJar task reference while preserving explicit task dependencies and both ProGuard/R8 compatibility checks. Verified locally that the ProGuard/R8 test task succeeds with configuration-cache problems treated as failures, a subsequent no-change run reuses the cache, and Kotlin lint passes. CI tests, lint, build, API compatibility, and runtime matrices are green. LGTM.

@apcha-oai
apcha-oai disabled auto-merge August 13, 2026 06:08
@apcha-oai
apcha-oai enabled auto-merge (squash) August 13, 2026 06:09
@apcha-oai
apcha-oai merged commit fb8daa4 into main Aug 13, 2026
9 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants