Skip to content

Port upgrade test to make#5252

Merged
jetstack-bot merged 3 commits intocert-manager:masterfrom
SgtCoDFish:upgrade-test-make
Jul 1, 2022
Merged

Port upgrade test to make#5252
jetstack-bot merged 3 commits intocert-manager:masterfrom
SgtCoDFish:upgrade-test-make

Conversation

@SgtCoDFish
Copy link
Copy Markdown
Member

@SgtCoDFish SgtCoDFish commented Jun 30, 2022

Pull Request Motivation

This PR implements our upgrade test using make instead of bazel.

This uses cmctl instead of kubectl_cert-manager, uses make instead of bazel and fixes an incorrect container name in test/fixtures/upgrade/overlay/cainjector-ops.yaml.

Also cleans up some old deprecated make targets from before the make migration, putting them in a separate file.

Kind

/kind cleanup

Release Note

NONE

@jetstack-bot
Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jetstack-bot jetstack-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. area/testing Issues relating to testing labels Jun 30, 2022
@jetstack-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 30, 2022
@SgtCoDFish SgtCoDFish changed the title Upgrade test in make Port upgrade test to make Jun 30, 2022
@SgtCoDFish SgtCoDFish marked this pull request as ready for review June 30, 2022 16:14
@jetstack-bot jetstack-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2022
Copy link
Copy Markdown
Member Author

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

Self-review to help other reviewers!

Comment on lines -419 to -435
# The targets (verify_deps, verify_chart, verify_upgrade, and cluster) are
# temorary and exist to keep the compatibility with the following Prow jobs:
#
# pull-cert-manager-chart
# pull-cert-manager-deps
# pull-cert-manager-upgrade
#
# Until we have removed these Bazel-based targets, we must disable the check
# of the system tools since the Bazel targets don't rely on those, and the image
#
# eu.gcr.io/jetstack-build-infra-images/bazelbuild
#
# doesn't have these tools.
BAZEL_TARGET := $(filter verify verify_deps verify_chart verify_upgrade cluster,$(MAKECMDGOALS))
ifneq ($(BAZEL_TARGET),)
$(warning Not checking whether the system tools are present since Bazel already takes care of that in the target $(MAKECMDGOALS). .)
else
Copy link
Copy Markdown
Member Author

@SgtCoDFish SgtCoDFish Jun 30, 2022

Choose a reason for hiding this comment

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

note: since none of the legacy targets actually call bazel any more, there's no need for this check

containers:
#@overlay/match by=overlay.subset({"name": "cert-manager"})
- image: #@ "quay.io/jetstack/cert-manager-controller:{}".format(data.values.app_version)
- image: #@ "docker.io/library/cert-manager-cainjector-amd64:{}".format(data.values.app_version)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: this also updates the container name - @irbekrm agreed it probably should've been cainjector all along.

containers:
#@overlay/match by=overlay.subset({"name": "cert-manager"})
- image: #@ "quay.io/jetstack/cert-manager-controller:{}".format(data.values.app_version)
- image: #@ "docker.io/library/cert-manager-controller-amd64:{}".format(data.values.app_version)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: docker.io/library/cert-manager-<ctr>-amd64 refers to the container name inside the kind cluster, which is what it's called when it's loaded by make.

@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 30, 2022
@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-chart

@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-chart

@SgtCoDFish
Copy link
Copy Markdown
Member Author

SgtCoDFish commented Jun 30, 2022

This was blocked behind cert-manager/testing#713 - now ready for review!

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
@jetstack-bot jetstack-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 30, 2022
This uses cmctl instead of kubectl_cert-manager, uses make instead of
bazel and fixes an incorrect container name in
test/fixtures/upgrade/overlay/cainjector-ops.yaml

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
we don't _need_ to remove these and we can keep them around for
longer, but we don't need them to be in files we actually use and edit.

putting the targets in a separate file feels cleaner!

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
Comment on lines -85 to -122

# The targets (verify_deps, verify_chart, verify_upgrade, and cluster) are
# temorary and exist to keep the compatibility with the following Prow jobs:
#
# pull-cert-manager-chart
# pull-cert-manager-deps
# pull-cert-manager-upgrade
#
# These targets should be removed as soon as the four above jobs and scripts are
# updated to use the "make" flow.
.PHONY: verify
verify:
$(warning "The 'verify' target is deprecated and will be removed soon. Please use instead 'ci-presubmit'")
bazel test //...

.PHONY: verify_deps
verify_deps:
@# this target can be removed once we've removed the pull-cert-manager-deps test from presubmits
@# for now, just make it a no-op so the tests don't fail
$(warning "The 'verify_deps' target is deprecated, does nothing, and will be removed soon. This target is not useful anymore with the new make flow.")
@true

# requires docker
.PHONY: verify_chart
verify_chart:
$(warning "The 'verify_chart' target is deprecated and will be removed soon. Please use instead 'verify-chart'.")
bazel build //deploy/charts/cert-manager
./hack/verify-chart-version.sh bazel-bin/deploy/charts/cert-manager/cert-manager.tgz

.PHONY: verify_upgrade
verify_upgrade:
$(warning "The 'verify_upgrade' target is deprecated and will be removed soon. Please use instead 'make e2e-setup-kind && ./hack/verify-upgrade.sh'.")
./hack/verify-upgrade.sh

.PHONY: cluster
cluster:
$(warning "The 'cluster' target is deprecated and will be removed soon. Please use instead 'make e2e-setup-kind'.")
./devel/ci-cluster.sh
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: these are moved into legacy.mk, not deleted

@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-make-test

@jakexks
Copy link
Copy Markdown
Member

jakexks commented Jul 1, 2022

The logs in pull-cert-manager-upgrade look good.

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2022
@jetstack-bot jetstack-bot merged commit ad50d45 into cert-manager:master Jul 1, 2022
@jetstack-bot jetstack-bot added this to the v1.9 milestone Jul 1, 2022
@SgtCoDFish SgtCoDFish deleted the upgrade-test-make branch July 4, 2022 08:33
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. area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants