-
Notifications
You must be signed in to change notification settings - Fork 34
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
NE-1802: Bump Golang, k8s.io, OpenShift API, and controller-runtime #225
Changes from all commits
7d07276
fbf0a43
c544748
d11060f
f1b2155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build_root_image: | ||
name: release | ||
namespace: openshift | ||
tag: rhel-8-release-golang-1.19-openshift-4.12 | ||
tag: rhel-8-release-golang-1.22-openshift-4.17 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should you be using rhel-9 in the name instead of rhel-8 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought of postponing the migration to RHEL9 to not put all the eggs into one basket (rebase from upstream is huge plus this bump turned into a big one). Let's see if we'll have enough time to do RHEL9 migration too. But anyway it will be in a dedicated PR. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,8 @@ endif | |
|
||
CONTROLLER_GEN := go run sigs.k8s.io/controller-tools/cmd/controller-gen | ||
SETUP_ENVTEST := go run sigs.k8s.io/controller-runtime/tools/setup-envtest | ||
KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/v4 | ||
K8S_ENVTEST_VERSION := 1.21.4 | ||
KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/v5 | ||
K8S_ENVTEST_VERSION := 1.30.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to use 1.30.0 instead of 1.30.3 as is used in the go modules? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes.
I think that we'll have to upgrade to the latest version of |
||
|
||
PACKAGE=github.com/openshift/external-dns-operator | ||
|
||
|
@@ -112,7 +112,7 @@ vet: ## Run go vet against code. | |
ENVTEST_ASSETS_DIR ?= $(shell pwd)/testbin | ||
test: manifests generate fmt vet ## Run tests. | ||
mkdir -p "$(ENVTEST_ASSETS_DIR)" | ||
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use "$(K8S_ENVTEST_VERSION)" --print path --bin-dir "$(ENVTEST_ASSETS_DIR)")" go test ./... -race -covermode=atomic -coverprofile coverage.out | ||
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use "$(K8S_ENVTEST_VERSION)" --print path --bin-dir "$(ENVTEST_ASSETS_DIR)")" CGO_ENABLED=1 go test ./... -race -covermode=atomic -coverprofile coverage.out | ||
|
||
.PHONY: test-e2e | ||
test-e2e: | ||
|
@@ -218,7 +218,7 @@ endef | |
.PHONY: lint | ||
## Checks the code with golangci-lint | ||
lint: $(GOLANGCI_LINT_BIN) | ||
$(GOLANGCI_LINT_BIN) run -c .golangci.yaml --deadline=30m | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question - is there another way to give this a time limit, now that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It's already in the golangci-lint config. I don't see the reason to limit in 2 places, so I removed the flag completely. Also, Upd: maybe a "couple of seconds" was a wrong estimation (failed job). Increased to 10 minutes. |
||
$(GOLANGCI_LINT_BIN) run -c .golangci.yaml | ||
|
||
$(GOLANGCI_LINT_BIN): | ||
mkdir -p $(BIN_DIR) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if I have missed a conversation about this, but doesn't splitting the bump & the vendor into two separate commits make the bump commit "broken"?
It could be just my personal philosophy, but I thought best practice was to avoid creating commits that don't compile. Was the motivation just to make reviews easier? I'm open to differing opinions, feel free to disagree, just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminded me of this discussion we had in C-I-O. I think I keep trying to stick to what I said in the discussion: put the vendor dir into a dedicated commit if either is true:
Yes. Will rebase the PR (fixup the vendor commit) once ready to move on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a small miscommunication, in the CIO discussion, I was referring to splitting out the vendor & bump commit as one together. I referred to that as the "vendor commit" there.
But in this PR, we have a "bump commit" and "vendor dir commit" separate. By bump commit, I mean the
go get ... && go mod tidy
commands (b871828). By "vendor dir commit", I meango mod vendor
(67ec0f2).What does that mean exactly? Are you saying your going to combine your b871828 67ec0f2 commits before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it now. Yes, I understood the vendor commit as a commit with vendor dir only.
Yes, will leave the PR will 2 commits: "bump+vendor dir" and "golangci-lint commit".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I think we are on the same page now. Thanks!