Skip to content

fix(ci): eliminate build warnings - #664

Merged
marandaneto merged 2 commits into
mainfrom
fix/ci-build-warnings
Jul 29, 2026
Merged

fix(ci): eliminate build warnings#664
marandaneto merged 2 commits into
mainfrom
fix/ci-build-warnings

Conversation

@marandaneto

@marandaneto marandaneto commented Jul 29, 2026

Copy link
Copy Markdown
Member

💡 Motivation and Context

PR #661 passed, but its CI logs contained several deprecation and compiler warnings that made real failures harder to spot and would block future Gradle upgrades.

This change removes those warnings by:

  • updating the shared changeset-hygiene workflow to Node 24 actions
  • upgrading Kover, AnimalSniffer, and the Spring dependency-management plugin for current Gradle APIs
  • preserving AnimalSniffer's previous JVM/test coverage while leaving Android API compatibility to Android lint
  • exposing Kotlin stdlib on the posthog-server compile classpath for Java consumers
  • migrating the Java sample to evaluateFlags
  • disabling CDS for instrumented test JVMs and keeping the already-unstripped AndroidX native library
  • refreshing affected Gradle lockfiles

💚 How did you test it?

  • JAVA_HOME=$HOME/.sdkman/candidates/java/17.0.18-amzn make updateLocks
  • make checkFormat
  • ./gradlew :posthog:check :posthog-server:check :posthog-android:check --write-locks --warning-mode all
  • Recompiled the Java and Spring samples with -Xlint:deprecation
  • Inspected the resulting build logs and confirmed the warnings from PR fix(android): preserve manually set releaseIdentifier #661 are absent

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Implemented with the Pi coding agent after a human-directed review of every CI log from PR #661. AnimalSniffer 2.x newly registers Android variant checks that the previous version did not; those targets remain disabled because Android lint owns API compatibility, while JVM main, test, and test-fixture checks remain enabled. The full JDK 17 build and targeted warning-mode/compiler checks were run before submission. The agent session was not shared publicly.

@marandaneto marandaneto self-assigned this Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
⚠️ 3 packages modified but this PR has no changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but no changeset added:

  • posthog
  • posthog-android
  • posthog-server

If this change should ship, run pnpm changeset and select a bump level.
If it isn't user-facing (refactor with no behavior change, internal tooling, generated files), no action needed.

api(project(":posthog"))

implementation(kotlin("stdlib-jdk8", PosthogBuildConfig.Kotlin.KOTLIN))
api(kotlin("stdlib-jdk8", PosthogBuildConfig.Kotlin.KOTLIN))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

posthog-server exposes Kotlin @deprecated(..., level = DeprecationLevel.WARNING) annotations in its public API. With
stdlib declared as implementation, Kotlin annotation classes aren’t available on a Java consumer’s compile classpath.

Changing it to api:

  • does not bundle another stdlib into the SDK;
  • exposes the dependency transitively at compile time;
  • still lets Gradle resolve against the host’s explicitly declared stdlib version.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

posthog-android Compliance Report

Date: 2026-07-29 08:11:27 UTC
Duration: 118168ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 305ms
Format Validation.Event Has Uuid 26ms
Format Validation.Event Has Lib Properties 28ms
Format Validation.Distinct Id Is String 21ms
Format Validation.Token Is Present 24ms
Format Validation.Custom Properties Preserved 22ms
Format Validation.Event Has Timestamp 25ms
Retry Behavior.Retries On 503 7021ms
Retry Behavior.Does Not Retry On 400 4024ms
Retry Behavior.Does Not Retry On 401 4027ms
Retry Behavior.Respects Retry After Header 7022ms
Retry Behavior.Implements Backoff 17034ms
Retry Behavior.Retries On 500 7019ms
Retry Behavior.Retries On 502 7021ms
Retry Behavior.Retries On 504 7019ms
Retry Behavior.Max Retries Respected 17033ms
Deduplication.Generates Unique Uuids 40ms
Deduplication.Preserves Uuid On Retry 7016ms
Deduplication.Preserves Uuid And Timestamp On Retry 12033ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7019ms
Deduplication.No Duplicate Events In Batch 34ms
Deduplication.Different Events Have Different Uuids 22ms
Compression.Sends Gzip When Enabled 18ms
Batch Format.Uses Proper Batch Structure 18ms
Batch Format.Flush With No Events Sends Nothing 12ms
Batch Format.Multiple Events Batched Together 28ms
Error Handling.Does Not Retry On 403 4021ms
Error Handling.Does Not Retry On 413 4022ms
Error Handling.Retries On 408 5023ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 33ms
Request Payload.Flags Request Uses V2 Query Param 19ms
Request Payload.Flags Request Hits Flags Path Not Decide 20ms
Request Payload.Flags Request Omits Authorization Header 21ms
Request Payload.Token In Flags Body Matches Init 16ms
Request Payload.Groups Round Trip 18ms
Request Payload.Groups Default To Empty Object 19ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 16ms
Request Payload.Disable Geoip Omitted Defaults To False 15ms
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 20ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 53ms
Request Lifecycle.Mock Response Value Is Returned To Caller 21ms
Retry Behavior.Retries Flags On 502 323ms
Retry Behavior.Retries Flags On 504 323ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 21ms

@marandaneto
marandaneto marked this pull request as ready for review July 29, 2026 07:54
@marandaneto
marandaneto requested a review from a team as a code owner July 29, 2026 07:54
@marandaneto
marandaneto enabled auto-merge (squash) July 29, 2026 07:54
@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore: defer changeset for warning clean..." | Re-trigger Greptile

@marandaneto
marandaneto merged commit 80c228b into main Jul 29, 2026
16 of 17 checks passed
@marandaneto
marandaneto deleted the fix/ci-build-warnings branch July 29, 2026 08:30
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