Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Check if generated files are up-to-date #164

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

gciavarrini
Copy link
Contributor

This PR adds a check in the CI that aims to verify if there are uncommitted changes.

Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
@openshift-ci openshift-ci bot requested review from eloycoto and masayag March 24, 2023 16:44
@openshift-ci
Copy link

openshift-ci bot commented Mar 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gciavarrini

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

The pull request process is described here

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

@@ -20,6 +20,11 @@ jobs:
- name: Maven Build
run: mvn clean spring-javaformat:validate package

- name: Check generated files are up to date
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can be that the API is changed and the open API is not updated?
Are we creating the open API when we build?
Are we updating the auto-generation of the SDK on package?

Sorry, too many questions but maven things are pretty new to me 😅

Copy link
Contributor Author

@gciavarrini gciavarrini Mar 24, 2023

Choose a reason for hiding this comment

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

Legit questions!

Can be that the API is changed and the open API is not updated?

no, because (see next answer :) )

Are we creating the open API when we build?

yes!

Are we updating the auto-generation of the SDK on package?

yes

To recap: at the moment during every package phase, the generator first creates the openapi.json file from the spring beans, then it generates the SDK source code and the jar.

In future PR, I'll move the generation to a following phase (maybe verify) to let developer work on their changes without having to deal with all the generated files. Then, the CI will verify if the outcome of mvn verify has uncommited changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants