fix(ci): bump schema-version to v3.1.0 and resolve formatter sources lazily INTER-2002#19
Merged
Merged
Conversation
…lazily The Server SDK sync job was stuck re-applying old v3-API schema releases (v2.12.1, v3.0.0, v3.0.1) against the current v4 codebase because `.schema-version` was never bumped when the SDK was migrated to API v4 (commit beaaea4). Bumping to v3.1.0 (what the committed code reflects) so the next sync starts from the correct point. The downstream symptom exposed a latent bug in the Gradle format task: `inputFiles` was resolved at configuration time, but `removeClasses` deletes and regenerates sources at execution time. When the regenerated file set differs from the pre-generation set (as it does when an older schema is applied), google-java-format fails with "could not read file" for files in the stale list. Resolve `srcJavaFiles()` lazily inside `doLast` for both format and checkFormat so the list reflects disk state when formatting runs. Failure: https://github.com/fingerprintjs/fingerprint-pro-server-api-openapi/actions/runs/24790520856
JuroUhlar
requested review from
Orkuncakilkaya,
erayaydin,
ilfa,
mcnulty-fp and
necipallef
as code owners
April 23, 2026 09:30
Contributor
pnpm exec changesetto create a changeset. |
ilfa
approved these changes
Apr 23, 2026
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.
Summary
The Server SDK sync job failed trying to re-apply ancient v3-API schema releases against the current v4 codebase. Two layered issues:
.schema-versionwas stale. The v4 migration (commit beaaea4, "feat: update APIv4 to Schema v3.1.0") didn't bump.schema-version, which was stillv2.12.0. The sync action iterates every OpenAPI release between.schema-versionand the target tag, so it tried to re-applyv2.12.1(old v3 API) first — against generator config that targetscom.fingerprint.v4.{api,model}. Bumping tov3.1.0(what the committed code reflects) so the next sync starts from the correct point. The sync action writes the new tag to.schema-versionon success, so future runs are self-healing.Latent bug in the Gradle
formattask.inputFileswas resolved at Gradle configuration time viafileTree("src").files.map { it.absolutePath }. ButopenApiGeneraterunsremoveClasses(which deletessdk/src/main/java/com/fingerprint/v4/{api,model}) and thencopyGeneratedArtifactsbeforeformatruns viafinalizedBy. When the regenerated file set differs from the pre-generation set (exactly what happens when an older schema is applied), google-java-format fails withcould not read file: …TamperingConfidence.javaetc. for the stale entries. MovingsrcJavaFiles()evaluation intodoLastmakesformat/checkFormatrobust to file churn.Issue 1 alone would fix the immediate CI failure; issue 2 is defense-in-depth so a future generator change can't produce the same class of breakage.
Failure
https://github.com/fingerprintjs/fingerprint-pro-server-api-openapi/actions/runs/24790520856 — Java job.
Test plan
./gradlew :sdk:openApiGenerate(full chain: removeClasses → generate → copy → format) runs clean locally./gradlew :sdk:checkFormatruns cleanTamperingConfidence.java, runformat/checkFormat) → both succeed after the lazy-eval fix