Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching in code generation workflow doesn't work #3893

Open
yue9944882 opened this issue Feb 3, 2025 · 2 comments
Open

Patching in code generation workflow doesn't work #3893

yue9944882 opened this issue Feb 3, 2025 · 2 comments

Comments

@yue9944882
Copy link
Member

https://github.com/kubernetes-client/java/actions/runs/13120437178

When I just ran the openapi model generation workflow just now, an error from code patching step aborted the workflow with following error:

Run ls scripts/patches/*.diff | xargs git apply
error: patch failed: kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java:18
error: kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java: patch does not apply

So I had skip the code patch step in the workflow via, retry and toggling If true, skip patching code after generation: https://github.com/kubernetes-client/java/actions/runs/13120777699

This indicates that the patches under scripts/patches folder are outdated, hence we need to do either of:

  1. Refresh the patch files for the branch
  2. Consider an alternative approach to make incremental patches on top of the raw generated code.
@yue9944882
Copy link
Member Author

https://github.com/kubernetes-client/java/actions/runs/13120777699/job/36605935886

The retry attempt failed again due to failing to open a pull request.. I'm going to run it in my fork repo

@brendandburns
Copy link
Contributor

Yeah, I think we need a better way to approach the automation with the patching involved. Not sure I have any great ideas though.

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

No branches or pull requests

2 participants