Skip to content
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

chore/remove-controller-errors #130

Merged
merged 3 commits into from
Apr 6, 2024
Merged

Conversation

puffitos
Copy link
Collaborator

@puffitos puffitos commented Apr 6, 2024

Motivation

Closes #123

Changes

Removed the errors from the controller functions, as they aren't/ produced at all.

For additional information look at the commits.

Tests done

  • Unit tests succeeded

TODO

  • I've assigned this PR to myself
  • I've labeled this PR correctly

The ChecksController had mutliple functions which should return errors
but no errors were returned. This commit fixes that and cleans up the tests
that expected errors to be returned (but were never also used, as no error could
ever be returned).

Signed-off-by: Bruno Bressi <[email protected]>
@puffitos puffitos self-assigned this Apr 6, 2024
@puffitos puffitos requested review from lvlcn-t and eumel8 as code owners April 6, 2024 13:14
@puffitos puffitos added the area/checks-controller Issues/PRs related to the ChecksController label Apr 6, 2024
Copy link
Collaborator

@lvlcn-t lvlcn-t left a comment

Choose a reason for hiding this comment

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

Some minor things

pkg/sparrow/controller.go Outdated Show resolved Hide resolved
pkg/sparrow/controller_test.go Outdated Show resolved Hide resolved
pkg/sparrow/controller_test.go Outdated Show resolved Hide resolved
pkg/sparrow/run.go Show resolved Hide resolved
puffitos added 2 commits April 6, 2024 15:43
Removed the unsued error field from the error struct and the error check
that is no longer needed.
@puffitos puffitos requested a review from lvlcn-t April 6, 2024 13:48
@puffitos puffitos merged commit 95debe9 into main Apr 6, 2024
11 checks passed
@lvlcn-t lvlcn-t deleted the chore/remove-controller-errors branch April 6, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks-controller Issues/PRs related to the ChecksController housekeeping
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code smell: no error returned in any controller function
2 participants