Skip to content
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

Makefile: Include full 'git diff' output #2024

Merged
merged 1 commit into from Jan 12, 2023

Conversation

wking
Copy link
Member

@wking wking commented Jan 12, 2023

Because:

Makefile:54: *** untracked files detected: M api/v1beta1/hosted_controlplane.go  M api/v1beta1/zz_generated.deepcopy.go  M cmd/install/assets/hypershift-operator/hypershift.openshift.io_hostedclusters.yaml  M cmd/install/assets/hypershift-operator/hypershift.openshift.io_hostedcontrolplanes.yaml  M hack/app-sre/saas_template.yaml.  Stop.

isn't as easy for contributors to fix, vs. giving them a patch with recommended changes to make to their local checkout, to bring it in line with what CI is expecting.

And actually, even with this pull request, I had trouble figuring out the changes I wanted, so in #1954, I've been supplementing with f77a0c4's:

verify: update staticcheck fmt vet promtool
  ...
  $(eval STATUS = $(shell sh -c 'git diff --exit-code HEAD -- | base64 -w0'))
  $(if $(strip $(STATUS)),$(error Git diff detected changes: ${STATUS}))
  ...

to give some base-64 that's easier to copy/paste out of the log without needing to worry about whitespace corruption and similar.

Because [1]:

  Makefile:54: *** untracked files detected: M api/v1beta1/hosted_controlplane.go  M api/v1beta1/zz_generated.deepcopy.go  M cmd/install/assets/hypershift-operator/hypershift.openshift.io_hostedclusters.yaml  M cmd/install/assets/hypershift-operator/hypershift.openshift.io_hostedcontrolplanes.yaml  M hack/app-sre/saas_template.yaml.  Stop.

isn't as easy for contributors to fix, vs. giving them a patch with
recommended changes to make to their local checkout, to bring it in
line with what CI is expecting.

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_hypershift/1954/pull-ci-openshift-hypershift-main-verify/1603153782781251584#1:build-log.txt%3A290
@csrwng
Copy link
Contributor

csrwng commented Jan 12, 2023

/lgtm
/test images

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2023
@enxebre
Copy link
Member

enxebre commented Jan 12, 2023

thanks!
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, wking

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 12, 2023

@wking: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 52251f2 into openshift:main Jan 12, 2023
@wking wking deleted the verify-git-diff branch January 23, 2023 22:02
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants