-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 step to verify vendor code before running unit tests. #77
Comments
This should also run ./hack/update-dep.sh and ./hack/update-code-gen.sh |
We should also run verify-code-gen in CI and error if there any changes to vendor-ed code. https://github.com/grafeas/kritis/blob/master/hack/verify-codegen.sh and |
knative projects have a bunch of scripts in verify-codegen.sh is the script that makes sure dep is a no-op. |
Literally copy pasted the logic from the build presubmit script: https://github.com/knative/build/blob/5f0b563ce9064e49530b2e209b17b4d1bd71e99b/test/presubmit-tests.sh#L23 to run `verify-codegen.sh` to make sure that `dep` will be a no-op. We've been seeing different behaviour from `update-codegen.sh` on different ppl's machines, but at least this way we can be consistent with what we see on Prow. Also copying the code to make sure building is successful (especially valuable before we have integration test automation; at least stop them from completely breaking) and verify our licenses. Fixes #77
Literally copy pasted the logic from the build presubmit script: https://github.com/knative/build/blob/5f0b563ce9064e49530b2e209b17b4d1bd71e99b/test/presubmit-tests.sh#L23 to run `verify-codegen.sh` to make sure that `dep` will be a no-op. We've been seeing different behaviour from `update-codegen.sh` on different ppl's machines, but at least this way we can be consistent with what we see on Prow. Also copying the code to make sure building is successful (especially valuable before we have integration test automation; at least stop them from completely breaking) and verify our licenses. Also outputting commands as they are run. It's worth noting that we are not failing the script when a command fails, so when adding unit tests, etc., we need to be careful to check if the commands actually succeed. Fixes #77
* Make sure dep is a no-op on every PR Literally copy pasted the logic from the build presubmit script: https://github.com/knative/build/blob/5f0b563ce9064e49530b2e209b17b4d1bd71e99b/test/presubmit-tests.sh#L23 to run `verify-codegen.sh` to make sure that `dep` will be a no-op. We've been seeing different behaviour from `update-codegen.sh` on different ppl's machines, but at least this way we can be consistent with what we see on Prow. Also copying the code to make sure building is successful (especially valuable before we have integration test automation; at least stop them from completely breaking) and verify our licenses. Also outputting commands as they are run. It's worth noting that we are not failing the script when a command fails, so when adding unit tests, etc., we need to be careful to check if the commands actually succeed. Fixes #77 * Kick off unit tests from prow This uses the `report_go_test` function which is responsible for producing unit tests in a format that can be understood by testgrid. We aren't using test grid yet but I guess why not get ready for it. At it's core the function calls `"go test -race -v ${args[@]}"` which has the added bonus of detecting race conditions so why not I guess. It doesn't do anything with coverage yet tho so we'll have to tackle that later. Fixes #78
🤖 Triggering CI on branch 'release-next' after synching to upstream/master
Expected Behavior
On a Branch, we would want developers to run dep ensure, so that unused dependencies are removed.
We can do this by running a script in the checks which runs dep ensure and check if they are any changes to vendor dir.
Actual Behavior
Right now, developers can easily add unused deps and overlook the libs pulled in since they tend to do this
Steps to Reproduce the Problem
none
Additional Info
The text was updated successfully, but these errors were encountered: