Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Conversation

sadlerap
Copy link
Contributor

@sadlerap sadlerap commented Apr 7, 2022

Changes

/kind bug

In commit ea79796 ("update to operator-sdk 1.3.0 (#848)"), we upgraded controller-gen to 0.8.0. However, v0.8.0 requires go 1.17 or greater, which is currently unavailable in Red Hat's container registries (i.e. there's no container on catalog.redhat.com); consequently, SBO is built with go 1.16. Until that is rectified, downgrade controller-gen to 0.7.0, which builds with go 1.16.

At the same time, use go install instead of the deprecated go get when we install local build tools, such as controller-gen, yq, and kustomize. This requires a version bump of kustomize to work correctly as well as adding an extra step to install a recent version of go in the non-OLM github actions acceptance test runner.

Finally, with the release of go 1.18, our go linting needs to become aware of this new release, since our linting runs with the latest release of go. This can be fixed by updating the golangci/golangci-lint runner to v1.45.2; since v1.45.1, it will autodetect the language version of a project.

Signed-off-by: Andy Sadler [email protected]

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs
    included if any changes are user facing
  • Tests
    included if any functionality added or changed. For bugfixes please include tests that can catch regressions
  • All acceptance test scenarios included in the PR which verifies a bugfix or a requested feature reported by a non-member are tagged with @external-feedback tag.
  • Follows the commit message standard

@openshift-ci openshift-ci bot added the kind/bug Something isn't working label Apr 7, 2022
@openshift-ci openshift-ci bot requested review from baijum and pmacik April 7, 2022 13:58
@baijum
Copy link
Contributor

baijum commented Apr 7, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 7, 2022
@sadlerap sadlerap force-pushed the controller-gen-downgrade branch from 81f9661 to 9c553eb Compare April 7, 2022 14:22
@openshift-ci openshift-ci bot removed the lgtm label Apr 7, 2022
@sadlerap sadlerap force-pushed the controller-gen-downgrade branch 3 times, most recently from eb74d76 to 85a507b Compare April 7, 2022 14:53
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #1127 (11a8837) into master (ddc725f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1127   +/-   ##
=======================================
  Coverage   58.92%   58.92%           
=======================================
  Files          30       30           
  Lines        1670     1670           
=======================================
  Hits          984      984           
  Misses        560      560           
  Partials      126      126           
Impacted Files Coverage Δ
pkg/naming/naming.go 87.50% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5060f43...11a8837. Read the comment docs.

@sadlerap sadlerap force-pushed the controller-gen-downgrade branch 4 times, most recently from 0437e84 to 414b842 Compare April 7, 2022 17:21
@sadlerap
Copy link
Contributor Author

sadlerap commented Apr 7, 2022

/retest

In commit ea79796 ("update to operator-sdk 1.3.0 (redhat-developer#848)"), we upgraded
controller-gen to 0.8.0.  However, v0.8.0 requires go 1.17 or greater,
which is currently unavailable in Red Hat's container registries (i.e.
there's no container on catalog.redhat.com); consequently, SBO is built
with go 1.16.  Until that is rectified, downgrade controller-gen to
0.7.0, which builds with go 1.16.

At the same time, use `go install` instead of the deprecated `go get`
when we install local build tools, such as controller-gen, yq, and
kustomize.  This requires a version bump of kustomize to work correctly
as well as adding an extra step to install a recent version of go in the
non-OLM github actions acceptance test runner.

Finally, with the release of go 1.18, our go linting needs to become
aware of this new release, since our linting runs with the latest
release of go.  This can be fixed by updating the golangci/golangci-lint
runner to v1.45.2; since v1.45.1, it will autodetect the language
version of a project.

Signed-off-by: Andy Sadler <[email protected]>
@sadlerap sadlerap force-pushed the controller-gen-downgrade branch from 414b842 to 11a8837 Compare April 8, 2022 13:05
@sadlerap sadlerap changed the title Downgrade controller-gen to v0.7.0 Fix CI Apr 8, 2022
@pmacik
Copy link
Contributor

pmacik commented Apr 8, 2022

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 8, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmacik

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 label Apr 8, 2022
@openshift-merge-robot openshift-merge-robot merged commit c9ab9c3 into redhat-developer:master Apr 8, 2022
@sadlerap sadlerap deleted the controller-gen-downgrade branch April 8, 2022 20:03
@pmacik pmacik added the ci CI related issues label Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved ci CI related issues kind/bug Something isn't working lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants