Make verify-codegen.sh not mess up with working tree#1579
Merged
google-prow-robot merged 1 commit intoknative:masterfrom Jul 18, 2018
adrcunha:verify-doesnt-mess
Merged
Make verify-codegen.sh not mess up with working tree#1579google-prow-robot merged 1 commit intoknative:masterfrom adrcunha:verify-doesnt-mess
google-prow-robot merged 1 commit intoknative:masterfrom
adrcunha:verify-doesnt-mess
Conversation
Partially addresses #1575. `verify-codegen.sh` calls `update-codegen.sh` (which in turns calls `update-deps.sh`) to autogenerate new code, so it can diff the current code in the working tree against the latest autogenerated code (and thus check if everything is up-to-date). This might leave the working tree in a changed state. This PR undoes all changes to //pkg, //vendor and Gopkg.lock that might be caused by the `update-*.sh` scripts. This way, when running `verify-codegen.sh`, it's guaranteed that your working tree is untouched when the script finishes, as expected. Bonus: remove redundant environment variables, and use `library.sh` for common/shared stuff, just like the other scripts.
Contributor
Author
|
Once this is merged, I'll replicate it to the other repos as well. |
Member
|
/hold Wait until after we cut first release. |
|
/test pull-knative-serving-go-coverage-dev |
|
/skip |
Member
|
/hold cancel |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrcunha, mattmoor The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bbrowning
pushed a commit
to bbrowning/serving
that referenced
this pull request
Oct 5, 2018
Partially addresses knative#1575. `verify-codegen.sh` calls `update-codegen.sh` (which in turns calls `update-deps.sh`) to autogenerate new code, so it can diff the current code in the working tree against the latest autogenerated code (and thus check if everything is up-to-date). This might leave the working tree in a changed state. This PR undoes all changes to //pkg, //vendor and Gopkg.lock that might be caused by the `update-*.sh` scripts. This way, when running `verify-codegen.sh`, it's guaranteed that your working tree is untouched when the script finishes, as expected. Bonus: remove redundant environment variables, and use `library.sh` for common/shared stuff, just like the other scripts.
openshift-cherrypick-robot
pushed a commit
to openshift-cherrypick-robot/knative-serving
that referenced
this pull request
Oct 3, 2025
Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux-kflux-prd-rh02[bot] <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially addresses #1575.
verify-codegen.shcallsupdate-codegen.sh(which in turns callsupdate-deps.sh) to autogenerate new code, so it can diff the current code in the working tree against the latest autogenerated code (and thus check if everything is up-to-date).This might leave the working tree in a changed state. This PR undoes all changes to //pkg, //vendor and Gopkg.lock that might be caused by the
update-*.shscripts. This way, when runningverify-codegen.sh, it's guaranteed that your working tree is untouched when the script finishes, as expected.Bonus: remove redundant environment variables, and use
library.shfor common/shared stuff, just like the other scripts.