Skip to content

Commit

Permalink
ci: fix codespell and golint
Browse files Browse the repository at this point in the history
Signed-off-by: Leela Venkaiah G <[email protected]>
  • Loading branch information
leelavg committed Jan 4, 2024
1 parent fdaac0b commit 5de31b6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion controllers/storageclient_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type StorageClientReconciler struct {
OperatorNamespace string
OperatorVersion string

// this can be part of reconciler as after a plaform update
// this can be part of reconciler as after a platform update
// operator will get restarted and fetches latest version
PlatformVersion string
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ var _ = BeforeSuite(func() {
Expect(err).ToNot(HaveOccurred(), "failed to run manager")
}()

// create auxillary resources
// create auxiliary resources
operatorNS := &corev1.Namespace{}
operatorNS.Name = testOperatorNamespace
Expect(k8sClient.Create(ctx, operatorNS)).Should(Succeed())
Expand Down
8 changes: 4 additions & 4 deletions controllers/upgrade_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (

const (
ocsClientOperatorSubscriptionPackageName = "ocs-client-operator"
// TODO(lgangava): there can be "eus" or "fast" or "canditate" supported channels
// TODO(lgangava): there can be "eus" or "fast" or "candidate" supported channels
// and custom channels also might exist, either get this data as part of a configmap
// or cut the name by '-'
subscriptionChannelNamePrefix = "stable-"
Expand Down Expand Up @@ -125,7 +125,7 @@ func (r *UpgradeReconciler) Reconcile(ctx context.Context, _ ctrl.Request) (ctrl
// differentiate between reconciler errors and not upgradeable errors
conditionStatus = metav1.ConditionFalse
conditionMessage = fmt.Sprintf("Operator could not be upgraded due to: %v", err)
r.log.Error(err, "an error occured during reconcilePhases")
r.log.Error(err, "an error occurred during reconcilePhases")
}
err = errors.Join(err, r.setOperatorCondition(conditionStatus, conditionMessage))

Expand Down Expand Up @@ -154,7 +154,7 @@ func (r *UpgradeReconciler) reconcileSubscriptionChannel() error {
desiredVersions := make([]string, 0, len(storageClientList.Items))
for idx := range storageClientList.Items {
desiredVersion := storageClientList.Items[idx].Status.Operator.DesiredVersion
// usually these versions will not have patch version, so we are adding an arbitrary num for semver comparision
// usually these versions will not have patch version, so we are adding an arbitrary num for semver comparison
desiredVersion += dummyPatchVersion
desiredVersions = append(desiredVersions, desiredVersion)
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func (r *UpgradeReconciler) reconcileSubscriptionChannel() error {
if platformVersion.Major < channelVersion.Major || platformVersion.Minor < channelVersion.Minor {
return fmt.Errorf("subscription channel name is changed outside of operator (subscription is ahead of platform)")
}
// TODO (lgangava): as of now there's no way to distingush desiredVersion vs stale desiredVersion
// TODO (lgangava): as of now there's no way to distinguish desiredVersion vs stale desiredVersion
// and we aren't checking dependents for updating operatorcondition

return nil
Expand Down
2 changes: 1 addition & 1 deletion controllers/upgrade_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var _ = Describe("Upgrade Controller", func() {
})
})

When("a storageclient desired verison and subscription is same", func() {
When("a storageclient desired version and subscription is same", func() {
BeforeEach(func() {
createClient(client1)
setSubscriptionChannel(testCurrentVersion)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func main() {

platformVersion, err := controllers.GetPlatformVersion(context.TODO(), apiClient)
if err != nil {
setupLog.Error(err, "unable to find platform verison")
setupLog.Error(err, "unable to find platform version")
os.Exit(1)
}

Expand Down
4 changes: 0 additions & 4 deletions service/status-report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/config"
)

const (
csvPrefix = "ocs-client-operator"
)

// TODO: refactor main as the responsibilities grew significantly
func main() {
scheme := runtime.NewScheme()
Expand Down

0 comments on commit 5de31b6

Please sign in to comment.