-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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 a check enforce "samples/" folder to be up-to-date #80
Comments
This seems to be really complicated to do right now because we still have work to have all generator generated by our generator. I instead of using After run of Maybe this will only run locally at the beginning (and not enforce at CI level), but this will be a good start giving more confidence when we work on stuff in |
currently all the scripts in |
Definitely it's necessary and adding the check to CI is good enough for me. I agree that some generators are not ready yet. We skip these in unit tests and so we can also skip it here too. I'm thinking about defining some kind of 'maturity level' for generators. If a technical committee decides that their generator is production-ready, they will add this to all tests cases. |
Ok what should be the list of mature generator that we want to use as input to force the update of |
I have made great progress on a first version of a In my opinion the list scripts executed during this check can evolve over time. For the beginning, we should select:
I wanted to add more items to the list:
But I have the feeling that those items are not measurable and will create too much debate... Feel free to give your opinion. |
As mentioned in #136, we can keep this issue open and propose new PRs to add other generators in the list. |
Totally agree with adding the check. I'll add generator that I'm reviewing regularly to the list. As mentioned in #80 (comment) , the list will grow over time and the target generator could be similar to |
@macjohnny, @TiFu: I have noticed a lot of activity/review around the typescript generator. If you are interested by the feature described here (checking with each PR that the generator runs and that its result included in a commit as part of the same PR to make the Shippable build green), feel free to add the necessary openapi-generator/bin/utils/ensure-up-to-date Lines 12 to 27 in dcc0c17
|
#4030 is an in-progress work to clean up the samples directory. I think there are a few issues currently with generating the samples directory:
Speaking with @Fjolnir-Dvorak on Slack, I suggested that we may want to consider outputting the list of generated files to a text file under the
We could then use Github Actions to run ensure-up-to-date (I believe). |
…nd_yarn/npm-user-validate-1.0.1 chore(deps): bump npm-user-validate from 1.0.0 to 1.0.1
I think that with each PR, the
samples/
needs to be completely updated. For the moment people focus only on their generators (which is fine), but this is wrong.First reason: some CI Jobs are updating
/samples
with/bin/run-all-petstore
and then run each generated project. So they are not executed against code that is checked in, but against code that is generated.Second reason: for later analysis (understand what was broken when) it is good to have the changes in the same PR.
Third reason: even if you think that you have only updated one generator (say java) your change might have an undesired impact in a other generator. Having it explicitly is good. This is even worth when you change something in
DefaultGenerator
(see my mistake in #79)Pre-requisit:
samples/
project needs to have been generated onceThe check should looks like this and could be added at the end of
bin/run-all-petstore
:The text was updated successfully, but these errors were encountered: