-
Notifications
You must be signed in to change notification settings - Fork 2
WIP: Enable unit tests #62
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
base: main
Are you sure you want to change the base?
Conversation
Changelist by BitoThis pull request implements the following key changes.
|
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.
Code Review Agent Run #3b2911
Actionable Suggestions - 1
-
controllers/infrastructure/byomachine_controller.go - 1
- Incorrect error return in success path · Line 476-476
Additional Suggestions - 2
-
scripts/fetch_ext_bins.sh - 1
-
Dynamic architecture detection depends on Go availability · Line 19-19The script now dynamically detects architecture using `go version` command, which is more robust than hardcoding 'amd64'. However, this assumes `go` is installed and available in PATH.
code suggestion
@@ -19,1 +19,1 @@ -goarch="$(go version | awk '{print $NF}' | egrep -o '[^/]+$')" +goarch="$(go version 2>/dev/null | awk '{print $NF}' | egrep -o '[^/]+$' || echo "amd64")"
-
-
agent/host_agent_test.go - 1
-
Duplicate installation script content in secret · Line 307-307The change adds `WithKeyData("install", "echo install-k8s")` but the same data is already set by `WithData("echo install-k8s")`. This creates semantic duplication as both methods add the same script content.
code suggestion
@@ -307,1 +307,1 @@ - fakeInstallationSecret := builder.Secret(ns.Name, fakeInstallationSecret).WithData("echo install-k8s").WithKeyData("install", "echo install-k8s").Build() + fakeInstallationSecret := builder.Secret(ns.Name, fakeInstallationSecret).WithKeyData("install", "echo install-k8s").Build()
-
Review Details
-
Files reviewed - 16 · Commit Range:
dc90562..986148b- .github/workflows/docs-lint.yaml
- .github/workflows/lgtm.yaml
- .github/workflows/prow-github-actions.yaml
- Makefile
- agent/cloudinit/file_writer.go
- agent/host_agent_test.go
- agent/main.go
- agent/reconciler/reconciler_test.go
- apis/infrastructure/v1beta1/byohost_webhook.go
- common/bootstraptoken/token.go
- controllers/infrastructure/byomachine_controller.go
- controllers/infrastructure/k8sinstallerconfig_controller.go
- installer/internal/algo/common_ubuntu.go
- scripts/fetch_ext_bins.sh
- test/e2e/BYOHDockerFile
- test/e2e/docker_helper.go
-
Files skipped - 3
- .github/workflows/ci.yml - Reason: Filter setting
- .github/workflows/lint.yml - Reason: Filter setting
- .golangci.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
| return ctrl.Result{}, err | ||
| return installerConfig, nil, ctrl.Result{}, err | ||
| } | ||
| return installerConfig, helper, ctrl.Result{}, err |
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.
The getInstallerConfigAndHelper function returns err in the success path, which could be nil. This could lead to confusion as the caller might interpret a non-nil error when there isn't one.
Code suggestion
Check the AI-generated fix before applying
| return installerConfig, helper, ctrl.Result{}, err | |
| return installerConfig, helper, ctrl.Result{}, nil |
Code Review Run #3b2911
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
Code Review Agent Run #b90833Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Summary by Bito
This pull request implements various improvements to CI workflows, build tooling, and scripts while fixing bugs in key components. It updates the Makefile to exclude agent-specific tests during coverage runs and fixes a misleading warning message in reconciler tests. These changes optimize workflows, improve test output accuracy, and enhance system reliability while providing clearer test feedback.