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

⚠️ Update to go 1.22 #909

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

tmshort
Copy link
Contributor

@tmshort tmshort commented Jun 4, 2024

Fix issues with the extension-developer-e2e and operator-sdk

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Fix issues with the extension-developer-e2e and operator-sdk

Signed-off-by: Todd Short <tshort@redhat.com>
@tmshort tmshort requested a review from a team as a code owner June 4, 2024 20:59
@tmshort tmshort mentioned this pull request Jun 4, 2024
4 tasks
Copy link

netlify bot commented Jun 4, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 8eba808
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66606f3a30080a0008123f8f
😎 Deploy Preview https://deploy-preview-909--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tmshort tmshort changed the title Update to go 1.22 ⚠️ Update to go 1.22 Jun 4, 2024
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.49%. Comparing base (396d978) to head (2dcf6ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #909      +/-   ##
==========================================
- Coverage   78.19%   73.49%   -4.70%     
==========================================
  Files          17       18       +1     
  Lines        1142     1215      +73     
==========================================
  Hits          893      893              
- Misses        173      246      +73     
  Partials       76       76              
Flag Coverage Δ
e2e 60.07% <ø> (ø)
unit 48.06% <ø> (-12.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -75,11 +75,14 @@ reg_pkg_name="${REG_PKG_NAME}"
(
cd "${REG_DIR}" && \
$operator_sdk init --domain="${DOMAIN}" && \
sed -i -e 's/CONTROLLER_TOOLS_VERSION ?= v0.14.0/CONTROLLER_TOOLS_VERSION ?= v0.15.0/' Makefile && \
Copy link
Member

Choose a reason for hiding this comment

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

Delete this line? Also while we're at it, could you add some comments about this sed command and the export OPERATOR_SDK line?

Something like these:

  • # controller-gen v0.13.0 (scaffolded by operator-sdk) panics when run with go 1.22, so pin to a more recent version. NOTE this is a rough edge that users will experience
  • # The Makefile in the project scaffolded by operator-sdk uses an SDK binary in the path if it is present. Override to ensure we use the same version that we scaffolded with. NOTE: this is a rough edge that users will experience

Copy link
Member

@joelanford joelanford Jun 4, 2024

Choose a reason for hiding this comment

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

(sorry, didn't see/think of this when we were debugging it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make sure it still works without this...

@varshaprasad96
Copy link
Member

@tmshort the last commit in this PR was trying to do the same, without bumping go for now.

We are bumping controller-gen for generating oc manifests here, but keeping controller-runtime and other related deps like helm-operator plugins the same. Its better to keep them tied together, so we can either bump it all in this or do an immediate follow up for the same?

@@ -23,11 +23,11 @@ $(BINGO): $(BINGO_DIR)/bingo.mod
@echo "(re)installing $(GOBIN)/bingo-v0.8.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.8.0 "github.com/bwplotka/bingo"

CONTROLLER_GEN := $(GOBIN)/controller-gen-v0.14.0
CONTROLLER_GEN := $(GOBIN)/controller-gen-v0.15.0
Copy link
Member

Choose a reason for hiding this comment

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

We are using an updated controller gen to generate and test manifests for operator controller, but keeping controller-runtime tied to a previous version. We can either bump controller-gen for o-c in a follow up with others, or do it all here. I would suggest the former, to keep this PR confined to fixing operator sdk with go 1.22 bump.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumping controller-runtime starts a cascade effect of including k8s v0.30.0, so, yes, I'd prefer to do it later.

Copy link
Member

@varshaprasad96 varshaprasad96 Jun 5, 2024

Choose a reason for hiding this comment

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

Sounds good, then we don't need the changes in .bingo/. The only change required for controller-gen would be in the set up script that gets used for scaffolding the operator using SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes in bingo are necessary to install the the correct version of controller-gen, and to install a version of bingo that is compatible with go 1.22.

@tmshort
Copy link
Contributor Author

tmshort commented Jun 5, 2024

Bumping things like operator-controller, etc, creates an avalanche of other changes. To get things completed and done faster (i.e. reviews), it's easier to do smaller, incremental changes. We'll get there, it's just doing it in one big chunk is probably not a good idea.

@tmshort
Copy link
Contributor Author

tmshort commented Jun 5, 2024

@tmshort the last commit in this PR was trying to do the same, without bumping go for now.

We're still having trouble updating rukpak... that change is quite big, and should be done "as it's own thing". If we can make that PR simpler by doing some of that work here, so much the better.

@tmshort
Copy link
Contributor Author

tmshort commented Jun 5, 2024

The executable for controller-gen has been updated consistently, so we're not running different versions of the same tool.

Signed-off-by: Todd Short <tshort@redhat.com>
Copy link
Member

@varshaprasad96 varshaprasad96 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

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
@tmshort tmshort enabled auto-merge June 5, 2024 14:02
@tmshort tmshort added this pull request to the merge queue Jun 5, 2024
Merged via the queue into operator-framework:main with commit f5aa5f9 Jun 5, 2024
15 checks passed
@tmshort tmshort deleted the update-go-1.22 branch June 5, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants