Skip to content

Force clean build in pre-merge to prevent stale OpenAPI codegen - #20

Merged
akshit-jm merged 4 commits into
mainfrom
fix/ecr-build-gradle-command
Jun 3, 2026
Merged

Force clean build in pre-merge to prevent stale OpenAPI codegen#20
akshit-jm merged 4 commits into
mainfrom
fix/ecr-build-gradle-command

Conversation

@abhi-maggon-jupiter-money

@abhi-maggon-jupiter-money abhi-maggon-jupiter-money commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds clean before build in the pre-merge test step so Gradle always regenerates OpenAPI specs from source rather than reusing previously compiled outputs
  • Fixes the issue where changed OpenAPI specs were not reflected in the build because Gradle's up-to-date checks treated the generated sources as current

Test plan

  • Open a PR in a consumer repository, change an OpenAPI spec, and confirm the generated code reflects the spec changes
  • Verify the pre-merge build passes with ./gradlew clean build

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jm-bot-ci

Copy link
Copy Markdown

@abhi-maggon-jupiter-money: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

abhi-maggon-jupiter-money and others added 3 commits June 3, 2026 15:55
… cache

The Gradle build-cache directory was being persisted across runs with a
key that only hashed *.gradle.kts files. When OpenAPI specs changed without
any Gradle file changes, the same cache key matched, restoring stale task
outputs and causing codegen to be skipped.

Remove ~/.gradle/build-cache from all cache paths and --build-cache flags
so task outputs are never reused from a previous run. Dependency caches
(~/.gradle/caches, ~/.gradle/wrapper) are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@abhi-maggon-jupiter-money abhi-maggon-jupiter-money changed the title Fix ecr-build-push to run build task before jibDockerBuild Force clean build in pre-merge to prevent stale OpenAPI codegen Jun 3, 2026
@jm-bot-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: abhi-maggon-jupiter-money, surajpatil374

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@akshit-jm
akshit-jm merged commit 6d9987a into main Jun 3, 2026
2 of 3 checks passed
@jm-bot-ci
jm-bot-ci deleted the fix/ecr-build-gradle-command branch June 3, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants