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

Add workflow to ensure generated code is up to date #1061

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Jul 1, 2024

Description

Add workflow to ensure generated code is up to date

Example of failing run: https://github.com/opensearch-project/opensearch-java/actions/runs/9736512856/job/26867247859?pr=1061

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Xtansia Xtansia force-pushed the feat/workflow-ensure-codegen-uptodate branch 2 times, most recently from aa7634f to 10e9abb Compare July 1, 2024 01:15
@Xtansia Xtansia marked this pull request as ready for review July 1, 2024 01:16
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
@Xtansia Xtansia force-pushed the feat/workflow-ensure-codegen-uptodate branch from 10e9abb to df84d97 Compare July 1, 2024 01:22
@dblock
Copy link
Member

dblock commented Jul 1, 2024

This means that anyone contributing to the client will have to re-run the generator. So, if I am fixing an unrelated bug, I still will get a failure here. In that case, does an automatic workflow that runs on a cron to generate a PR update like opensearch-project/opensearch-py#767 make more sense?

@Xtansia
Copy link
Collaborator Author

Xtansia commented Jul 1, 2024

This means that anyone contributing to the client will have to re-run the generator. So, if I am fixing an unrelated bug, I still will get a failure here. In that case, does an automatic workflow that runs on a cron to generate a PR update like opensearch-project/opensearch-py#767 make more sense?

The generator has a local copy of the spec checked into the repo (and doesn't yet have a auto-download mechanism), so this will always run against that copy, meaning it'll only detect changes if the spec or generator logic has been changed. I'm going to add a cron job later for auto-fetching & updating.

@dblock dblock merged commit e77e7a8 into opensearch-project:main Jul 1, 2024
55 checks passed
@dblock dblock added the backport 2.x Backport to 2.x branch label Jul 1, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 1, 2024
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit e77e7a8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Xtansia Xtansia deleted the feat/workflow-ensure-codegen-uptodate branch July 1, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants