feat: add CI/CD pipelines, e2e smoke test, Go 1.26 toolchain, and Renovate #1
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
brooktrails/forgejo-runner-operator!1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ci-e2e-toolchain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add Forgejo Actions workflows for CI (build+test on every push/PR),
next-Go compatibility testing (weekly, allow-failure), image publishing
to Harbor on master/tags, and a kind-based e2e smoke test that validates
the full reconciliation loop.
Include the e2e driver script (hack/e2e-smoke.sh) which can also be run
locally. Configure Renovate to track Go modules, Go toolchain versions,
and container base images.
Update Go toolchain from 1.23 to 1.26 across go.mod and both
Containerfiles. Fix webhook bind address in manager.yaml from :9443
to :9444 to match the code default.
Also includes prior uncommitted work: webhook admission controller,
enhanced CRD with validation, expanded RBAC, Kubernetes backend
implementation, unit tests, and CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Automated review by pr-reviewer v0.8.0 | Full Review | anthropic | tracking id
r-bd4d3f-2b7f8cStatus: ✅ Completed
This is a substantial PR that adds CI/CD pipelines, E2E testing, and upgrades the Go toolchain to 1.26. Let me provide a detailed review:
Overall Assessment
This PR makes significant infrastructure improvements and adds important missing functionality. The changes are well-structured and follow good practices.
Positive Aspects
✅ Comprehensive CI/CD Setup: The workflow structure is well-designed with separate jobs for CI, E2E testing, next-Go compatibility testing, and publishing.
✅ E2E Testing: The kind-based smoke test is a great addition that validates the core reconciliation flow.
✅ Code Quality: Extensive test coverage has been added, particularly for webhooks and backend functionality.
✅ Documentation: The CLAUDE.md file provides excellent project context and development guidance.
✅ Renovate Configuration: Thoughtful dependency management setup with appropriate grouping and scheduling.
Issues and Concerns
1. Critical: Go 1.26 Doesn't Exist Yet 🚨
Location:
go.mod, bothContainerfiles, and all CI workflowsIssue: Go 1.26 hasn't been released yet. The latest stable version is 1.23.x.
Impact: This will break builds immediately since Go 1.26 doesn't exist.
Fix: Revert to Go 1.23 or 1.24 if available.
2. Webhook Address Inconsistency
Location:
config/manager/manager.yamlline 42Issue: The webhook port is changed to 9444 but the container port name is still "webhook" which might be confusing since there are now two different webhook services (admission webhooks on 9443, Forgejo webhooks on 9444).
Recommendation: Consider renaming the port to "forgejo-webhook" for clarity.
3. E2E Test Security Concerns
Location:
hack/e2e-smoke.shlines 97-105Issue: The E2E test grants
cluster-adminprivileges to the default service account, which is overly permissive.Recommendation: Use the actual RBAC from
config/rbac/role.yamlinstead.4. Missing Error Handling in E2E Script
Location:
hack/e2e-smoke.shline 36Issue: The
make container-build-controllercommand references a target that may not exist in the Makefile.Impact: The E2E test might fail with unclear error messages.
5. Potential Race Condition in Tests
Location:
internal/webhook/receiver_test.golines 274-284Issue: The test tries to handle webhook requests with a nil client, which will panic. The defer/recover logic makes the test behavior unpredictable.
Recommendation: Mock the Kubernetes client properly or skip the integration parts in unit tests.
6. Harbor Registry Hardcoded
Location:
.forgejo/workflows/publish.ymllines 8-11Issue: The Harbor registry URL is hardcoded to
harbor.brooktrails.org.Recommendation: Consider making this configurable or documenting that forks need to change this.
Minor Issues
7. Inconsistent Image References
Location: Various test files
Issue: Some tests reference
forgejo-runner:latestwhile others usecode.forgejo.org/forgejo/runner:12.Recommendation: Standardize on one pattern.
8. Renovate Configuration
Location:
renovate.jsonlines 21-25Issue: The configuration tries to track container images in samples, but the
config/samples/directory doesn't exist in this diff.Testing Gaps
While test coverage is extensive, I notice:
Architecture Review
The overall architecture looks solid:
Breaking Changes
The webhook port change from 9443 to 9444 could be considered a breaking change for existing deployments, but it's necessary to separate admission webhooks from Forgejo webhooks.
Recommendations
make container-build-controllertarget existsVerdict
While this PR adds significant value with comprehensive CI/CD, testing, and documentation improvements, the Go 1.26 issue is a critical blocker that will break builds.
Verdict: Request Changes
The primary issue is the non-existent Go 1.26 version that needs to be fixed before this can be merged. The E2E test RBAC permissions should also be tightened for security best practices.
Automated review by pr-reviewer v0.11.0 | Full Review | anthropic | tracking id
r-be07b1-d94ac4Status: ✅ Completed
✅ Verdict: Approve — This is a comprehensive, well-structured pull request that adds essential CI/CD infrastructure, testing, and validation features while maintaining high code quality standards.
Review: CI/CD, E2E Testing, Go 1.26 Toolchain, and Renovate
This is an excellent, comprehensive pull request that significantly enhances the project's development infrastructure and code quality. The changes are well-organized, thoroughly tested, and follow Kubernetes operator best practices.
✅ Strengths
CI/CD Infrastructure
Testing & Validation
Code Quality & Architecture
Toolchain & Dependencies
🔍 Technical Observations
Webhook Implementation
The admission webhook implementation in
api/v1alpha1/runnerpool_webhook.gois particularly well done:E2E Test Design
The smoke test (
hack/e2e-smoke.sh) is cleverly designed:Backend Architecture
The Kubernetes backend shows good architectural decisions:
RBAC & Security
🔧 Technical Details
Makefile Targets
The PR appears to reference several make targets (
container-build-controller,container-build) that aren't visible in the diff - ensure these exist in the Makefile.Container Build Process
The workflows and E2E test assume multi-stage container builds work correctly. The Containerfile changes look good for Go 1.26.
Webhook Port Configuration
Good catch fixing the webhook bind address from
:9443to:9444in both the code and manifests - this prevents conflicts with the controller-runtime webhook server.📋 Minor Notes
🎯 Overall Assessment
This PR demonstrates excellent engineering practices:
The code quality is consistently high across all changes, with proper separation of concerns, good error handling, and comprehensive test coverage. The CI/CD infrastructure is production-ready and will provide good development velocity.
Recommendation: Approve - This is a well-executed, comprehensive enhancement that significantly improves the project's development and operational capabilities.