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

Exclude the 'dist' folder in 'check-gofmt.sh' script #6252

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Oct 24, 2022

What type of PR is this:
/kind bug

What does this PR do / why we need it:
make validate does not pass if run right after generating a local RPM Package using the rpm-prepare.sh and rpm-local-build.sh scripts.

The problem is that check-gofmt.sh picks Go files from the dist/rpmbuild/BUILD/**/vendor folder, e.g.:

$ ./scripts/rpm-prepare.sh
$ ./scripts/rpm-local-build.sh
$ make validate 
./scripts/check-gofmt.sh
gofmt ERROR - These files are not formated by gofmt:
./dist/rpmbuild/BUILD/openshift-odo-3.1.0-1/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go
./dist/rpmbuild/BUILD/openshift-odo-3.1.0-1/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go
./dist/rpmbuild/BUILD/openshift-odo-3.1.0-1/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go
--- Truncated ---

Which issue(s) this PR fixes:

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

# Generate a local RPM package
./scripts/rpm-prepare.sh && ./scripts/rpm-local-build.sh

# `make validate` should pass with this PR. It won't pass without the changes here.
make validate

The 'dist' folder is created when generating an RPM Package
using the `rpm-prepare.sh` and `rpm-local-build.sh` scripts,
and might contain Go files in `dist/rpmbuild/BUILD/**/vendor`.
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2022
@netlify
Copy link

netlify bot commented Oct 24, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 535b33e
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/635674ad6b9a4300085fe0ac

@odo-robot
Copy link

odo-robot bot commented Oct 24, 2022

Unit Tests on commit 95f26d1 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Oct 24, 2022

Validate Tests on commit 95f26d1 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Oct 24, 2022

Kubernetes Tests on commit 95f26d1 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Oct 24, 2022

Windows Tests (OCP) on commit 95f26d1 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Oct 24, 2022

OpenShift Tests on commit 95f26d1 finished successfully.
View logs: TXT HTML

@rm3l rm3l closed this Oct 24, 2022
@rm3l rm3l reopened this Oct 24, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Oct 26, 2022
@feloy
Copy link
Contributor

feloy commented Oct 28, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Oct 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy

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. Required by Prow. label Oct 28, 2022
@feloy
Copy link
Contributor

feloy commented Oct 28, 2022

/override ci/prow/v4.11-integration-e2e

@openshift-ci
Copy link

openshift-ci bot commented Oct 28, 2022

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e

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.

@openshift-merge-robot openshift-merge-robot merged commit fb9a713 into redhat-developer:main Oct 28, 2022
@rm3l rm3l deleted the exclude_dist_folder_from_check-gofmt_script branch December 1, 2022 16:34
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. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants