Skip to content

Make verify-codegen.sh not mess up with working tree#1579

Merged
google-prow-robot merged 1 commit intoknative:masterfrom
adrcunha:verify-doesnt-mess
Jul 18, 2018
Merged

Make verify-codegen.sh not mess up with working tree#1579
google-prow-robot merged 1 commit intoknative:masterfrom
adrcunha:verify-doesnt-mess

Conversation

@adrcunha
Copy link
Copy Markdown
Contributor

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.

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.
@adrcunha adrcunha requested a review from mattmoor July 12, 2018 03:01
@google-prow-robot google-prow-robot requested a review from vaikas July 12, 2018 03:01
@google-prow-robot google-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 12, 2018
@adrcunha
Copy link
Copy Markdown
Contributor Author

Once this is merged, I'll replicate it to the other repos as well.

@mattmoor
Copy link
Copy Markdown
Member

/hold

Wait until after we cut first release.

@google-prow-robot google-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2018
@krzyzacy
Copy link
Copy Markdown

/test pull-knative-serving-go-coverage-dev
cc @steuhs trying

@krzyzacy
Copy link
Copy Markdown

/skip

@mattmoor
Copy link
Copy Markdown
Member

/hold cancel

@google-prow-robot google-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 18, 2018
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2018
@google-prow-robot
Copy link
Copy Markdown

[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

Details 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

@google-prow-robot google-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2018
@google-prow-robot google-prow-robot merged commit e6d34b2 into knative:master Jul 18, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants