cert-manager-operator icon indicating copy to clipboard operation
cert-manager-operator copied to clipboard

quality-of-life: Improve local development tooling

Open sebrandon1 opened this issue 6 months ago • 2 comments
trafficstars

This PR updates the Makefile with .PHONY targets, better error handling for deploy/undeploy, and adds README.md sections on cleanup, tests, and linting.

Makefile Enhancements:

  • Added .PHONY declarations to multiple targets (local-run, build-operator, build, run, image-build, image-push, deploy, undeploy, test-e2e-wait-for-stable-state, test-e2e-debug-cluster, lint) to ensure proper execution and avoid conflicts with files of the same name. [1] [2] [3] [4] [5]

  • Improved the deploy target to create the cert-manager-operator namespace if it does not exist, ensuring smoother deployment.

  • Enhanced the undeploy target to ignore not-found errors when deleting resources, improving robustness.

  • Added a check in the lint target to ensure golangci-lint is installed before running, providing a clearer error message if it is missing.

Documentation Updates:

  • Added a "Cleaning up the deployment" section in README.md, explaining how to remove the Cert Manager Operator and its associated resources using make undeploy.

  • Introduced a "Running tests locally" section in README.md, detailing how to execute unit tests and generate a coverage report.

  • Added a "Linting the code" section in README.md, describing how to run make lint to check for linting issues using golangci-lint.

sebrandon1 avatar May 05 '25 15:05 sebrandon1

/retest

bharath-b-rh avatar Sep 10 '25 06:09 bharath-b-rh

Walkthrough

Adds numerous PHONY Makefile targets for local run, build, run, image build/push, deploy/undeploy with namespace handling, opm download, and e2e wait/debug flows, plus a lint invocation tweak. README gains additional sections for cleanup, testing, and linting, including duplicated guidance blocks.

Changes

Cohort / File(s) Summary of changes
Build, run, deploy, and test automation
Makefile
Adds PHONY targets: local-run, build-operator, build, run, image-build, image-push, deploy, undeploy, opm, test-e2e-wait-for-stable-state, test-e2e-debug-cluster. Implements namespace guard in deploy, safe deletion in undeploy, opm downloader, e2e wait/debug orchestration, and a minor lint command adjustment.
Documentation updates
README.md
Adds sections for cleanup (make undeploy), running tests (make test, coverage), and linting (make lint), with some duplicated sections appearing in multiple locations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "quality-of-life: Improve local development tooling" concisely and accurately summarizes the primary intent of the changeset — Makefile additions and improvements to local developer workflows (and accompanying README updates) — making it clear and relevant for reviewers scanning history.
Description Check ✅ Passed The PR description directly describes the Makefile and README changes present in the diff, listing added .PHONY targets, deploy/undeploy robustness, a lint precheck, and the new documentation sections, so it is on-topic and adequately related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Sep 15 '25 16:09 coderabbitai[bot]

@sebrandon1: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Sep 15 '25 17:09 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bharath-b-rh, sebrandon1

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[bot] avatar Sep 16 '25 11:09 openshift-ci[bot]

no user facing changes /label docs-approved /label qe-approved /label px-approved

bharath-b-rh avatar Sep 16 '25 11:09 bharath-b-rh