Skip to content

Conversation

Skarlso
Copy link
Member

@Skarlso Skarlso commented Jul 12, 2019

@michelvocks You are going to love this one... :D

@@ -27,13 +27,13 @@ func SettingsPollOn(c echo.Context) error {
gaia.Cfg.Poll = true
err = pipeline.StartPoller()
if err != nil {
c.String(http.StatusBadRequest, err.Error())
return c.String(http.StatusBadRequest, err.Error())
Copy link
Member Author

Choose a reason for hiding this comment

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

@michelvocks We had a couple of these. :DDDD we weren't returning errors man. :D

Copy link
Member

Choose a reason for hiding this comment

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

🙈 oh no. Good catch!

@codecov-io
Copy link

Codecov Report

Merging #191 into master will decrease coverage by 0.31%.
The diff coverage is 61.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #191      +/-   ##
==========================================
- Coverage   62.59%   62.28%   -0.32%     
==========================================
  Files          48       48              
  Lines        3914     3932      +18     
==========================================
- Hits         2450     2449       -1     
- Misses       1069     1079      +10     
- Partials      395      404       +9
Impacted Files Coverage Δ
workers/scheduler/create_cmd.go 62.5% <ø> (ø) ⬆️
handlers/workers.go 48.12% <ø> (ø) ⬆️
handlers/user.go 39.68% <0%> (ø) ⬆️
handlers/pipeline_run.go 0% <0%> (ø) ⬆️
workers/pipeline/update_pipeline.go 52.54% <100%> (ø) ⬆️
handlers/auth.go 95% <100%> (ø) ⬆️
workers/pipeline/build_cpp.go 95.12% <100%> (ø) ⬆️
workers/pipeline/pipeline.go 94.06% <100%> (-0.05%) ⬇️
store/memdb/memdb.go 53.67% <100%> (ø) ⬆️
workers/pipeline/build_python.go 82.53% <100%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86e92ba...bc07eb8. Read the comment docs.

Copy link
Member

@michelvocks michelvocks left a comment

Choose a reason for hiding this comment

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

Nice! Thanks @Skarlso
Wondering if we should try to check errors in general instead of explicitly ignoring them?

@@ -41,7 +41,7 @@ type Payload struct {

func signBody(secret, body []byte) []byte {
computed := hmac.New(sha1.New, secret)
computed.Write(body)
_, _ = computed.Write(body)
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering why we explicitly ignore errors here instead of doing what is recommended - checking the error and fail if there is one? 😅

"net/http"
"strconv"
"time"

"github.com/gaia-pipeline/gaia/helper/stringhelper"

Copy link
Member

Choose a reason for hiding this comment

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

I don't know what is wrong with go-import (this always happens for me too) but this looks really ugly 😒

@@ -27,13 +27,13 @@ func SettingsPollOn(c echo.Context) error {
gaia.Cfg.Poll = true
err = pipeline.StartPoller()
if err != nil {
c.String(http.StatusBadRequest, err.Error())
return c.String(http.StatusBadRequest, err.Error())
Copy link
Member

Choose a reason for hiding this comment

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

🙈 oh no. Good catch!

@@ -18,6 +17,8 @@ import (
"testing"
"time"

"github.com/pkg/errors"

Copy link
Member

Choose a reason for hiding this comment

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

😒

Copy link
Member Author

Choose a reason for hiding this comment

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

hhehehehhe :D

@Skarlso
Copy link
Member Author

Skarlso commented Jul 15, 2019

@michelvocks I have the handling in a different PR. This is part 1 basically. The handling and propagations of some of these errors when I was not ignoring them was actually causing some test failures.

And thus require a lot more thought and work to have them right. So I wanted to do this in one patch and then go over all the _-s and handle them if that's okay with you.

@michelvocks
Copy link
Member

Gotcha! Cool. Then LGTM 😄

@Skarlso Skarlso merged commit 6d5d92e into gaia-pipeline:master Jul 15, 2019
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 61.48148% with 52 lines in your changes missing coverage. Please review.

Project coverage is 62.28%. Comparing base (86e92ba) to head (bc07eb8).
Report is 62 commits behind head on master.

Files with missing lines Patch % Lines
security/ca.go 36.00% 8 Missing and 8 partials ⚠️
handlers/pipeline.go 75.00% 6 Missing and 1 partial ⚠️
workers/pipeline/ticker.go 30.00% 7 Missing ⚠️
workers/pipeline/create_pipeline.go 37.50% 5 Missing ⚠️
workers/pipeline/git.go 55.55% 4 Missing ⚠️
handlers/pipeline_run.go 0.00% 3 Missing ⚠️
handlers/settings.go 40.00% 2 Missing and 1 partial ⚠️
workers/scheduler/scheduler.go 50.00% 3 Missing ⚠️
plugin/plugin.go 75.00% 2 Missing ⚠️
handlers/user.go 0.00% 1 Missing ⚠️
... and 1 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #191      +/-   ##
==========================================
- Coverage   62.59%   62.28%   -0.32%     
==========================================
  Files          48       48              
  Lines        3914     3932      +18     
==========================================
- Hits         2450     2449       -1     
- Misses       1069     1079      +10     
- Partials      395      404       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants