Skip to content

fix(ci): build the compliance adapter with the repo Gradle wrapper - #707

Merged
cat-ph merged 1 commit into
mainfrom
cat/compliance-adapter-gradlew
Aug 18, 2026
Merged

fix(ci): build the compliance adapter with the repo Gradle wrapper#707
cat-ph merged 1 commit into
mainfrom
cat/compliance-adapter-gradlew

Conversation

@cat-ph

@cat-ph cat-ph commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Problem

The SDK compliance job fails on every branch since #702 bumped the Gradle wrapper to 9.7.0. The adapter's Dockerfile pins its own Gradle (FROM gradle:9.6.1-jdk17) and runs plain gradle, but the lockfiles are generated by the wrapper - and dependency locking pins the embedded Kotlin build-tools strictly per Gradle release (9.7.0 locks 2.4.0, the container's 9.6.1 requests 2.3.21). Configuration of the gradle-plugin project fails before any test runs.

It slipped through because the compliance workflow's path filter (posthog/**, sdk_compliance_adapter/**) never fires on wrapper or lockfile changes, so #702 merged without ever running the job.

Changes

Build the adapter with the repo's own ./gradlew on a plain JDK image instead of an image-pinned Gradle. The container now always uses exactly the wrapper the lockfiles were generated with, so future wrapper bumps cannot skew it again.

Tests

Local docker build -f sdk_compliance_adapter/Dockerfile . of the exact CI invocation completes successfully (previously failed with the lock conflict). The compliance workflow also runs on this PR since it touches sdk_compliance_adapter/**.

The image-pinned gradle:9.6.1 skewed from the lockfiles regenerated
under the 9.7.0 wrapper bump (#702): dependency locking pins the
embedded Kotlin build-tools strictly per Gradle release, so the
container's Gradle could no longer configure the plugin project.
Building with ./gradlew keeps the two in lockstep permanently.
@cat-ph
cat-ph marked this pull request as ready for review August 18, 2026 20:42
@cat-ph
cat-ph requested a review from a team as a code owner August 18, 2026 20:42
@cat-ph
cat-ph requested review from a team, ablaszkiewicz and hpouillot August 18, 2026 20:42
@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(ci): build the compliance adapter wi..." | Re-trigger Greptile

@cat-ph
cat-ph enabled auto-merge (squash) August 18, 2026 20:45
@github-actions

Copy link
Copy Markdown
Contributor

posthog-android Compliance Report

Date: 2026-08-18 20:48:23 UTC
Duration: 118093ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 294ms
Format Validation.Event Has Uuid 33ms
Format Validation.Event Has Lib Properties 25ms
Format Validation.Distinct Id Is String 26ms
Format Validation.Token Is Present 22ms
Format Validation.Custom Properties Preserved 27ms
Format Validation.Event Has Timestamp 23ms
Retry Behavior.Retries On 503 7020ms
Retry Behavior.Does Not Retry On 400 4023ms
Retry Behavior.Does Not Retry On 401 4024ms
Retry Behavior.Respects Retry After Header 7026ms
Retry Behavior.Implements Backoff 17022ms
Retry Behavior.Retries On 500 7018ms
Retry Behavior.Retries On 502 7018ms
Retry Behavior.Retries On 504 7018ms
Retry Behavior.Max Retries Respected 17034ms
Deduplication.Generates Unique Uuids 36ms
Deduplication.Preserves Uuid On Retry 7014ms
Deduplication.Preserves Uuid And Timestamp On Retry 12022ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7019ms
Deduplication.No Duplicate Events In Batch 34ms
Deduplication.Different Events Have Different Uuids 21ms
Compression.Sends Gzip When Enabled 15ms
Batch Format.Uses Proper Batch Structure 15ms
Batch Format.Flush With No Events Sends Nothing 11ms
Batch Format.Multiple Events Batched Together 25ms
Error Handling.Does Not Retry On 403 4021ms
Error Handling.Does Not Retry On 413 4020ms
Error Handling.Retries On 408 5028ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 30ms
Request Payload.Flags Request Uses V2 Query Param 22ms
Request Payload.Flags Request Hits Flags Path Not Decide 20ms
Request Payload.Flags Request Omits Authorization Header 33ms
Request Payload.Token In Flags Body Matches Init 17ms
Request Payload.Groups Round Trip 20ms
Request Payload.Groups Default To Empty Object 18ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 21ms
Request Payload.Disable Geoip Omitted Defaults To False 20ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 17ms
Request Lifecycle.No Flags Request On Init Alone 7ms
Request Lifecycle.No Flags Request On Normal Capture 30ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 30ms
Request Lifecycle.Mock Response Value Is Returned To Caller 16ms
Retry Behavior.Retries Flags On 502 319ms
Retry Behavior.Retries Flags On 504 322ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 19ms

@cat-ph
cat-ph merged commit edfd084 into main Aug 18, 2026
17 checks passed
@cat-ph
cat-ph deleted the cat/compliance-adapter-gradlew branch August 18, 2026 20:53
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.

2 participants