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

[common-go] Do not log EOF errors decoding JSON #5696

Merged
merged 1 commit into from
Sep 15, 2021
Merged

[common-go] Do not log EOF errors decoding JSON #5696

merged 1 commit into from
Sep 15, 2021

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Sep 14, 2021

Description

There is no check to the output generated by commands that emit JSON logs.
The PR checks we have a valid logrus entry in JSON format and verifies for conditions like empty content, end of lines, mixed content and invalid JSON.

Related Issue(s)

Internal link: https://cloudlogging.app.goo.gl/PS8PUnkJ7HZbMASS8

How to test

Release Notes

NONE

/approve no-issue

@aledbf
Copy link
Member Author

aledbf commented Sep 14, 2021

/assign @csweichel

@codecov
Copy link

codecov bot commented Sep 14, 2021

Codecov Report

Merging #5696 (eeda4f1) into main (a45506d) will increase coverage by 13.63%.
The diff coverage is 0.00%.

❗ Current head eeda4f1 differs from pull request most recent head 734d18c. Consider uploading reports for the commit 734d18c to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main    #5696       +/-   ##
===========================================
+ Coverage   19.04%   32.67%   +13.63%     
===========================================
  Files           2      104      +102     
  Lines         168    20334    +20166     
===========================================
+ Hits           32     6645     +6613     
- Misses        134    13111    +12977     
- Partials        2      578      +576     
Flag Coverage Δ
components-blobserve-app 29.49% <ø> (?)
components-common-go-lib 30.37% <0.00%> (?)
components-content-service-api-go-lib ∅ <ø> (?)
components-content-service-app 14.51% <ø> (?)
components-content-service-lib 14.51% <ø> (?)
components-ee-agent-smith-app 25.82% <ø> (?)
components-ee-kedge-app 45.48% <ø> (?)
components-ee-ws-scheduler-app 63.16% <ø> (?)
components-image-builder-api-go-lib ∅ <ø> (?)
components-image-builder-app 34.44% <ø> (?)
components-image-builder-bob-app ∅ <ø> (?)
components-image-builder-mk3-app 6.75% <ø> (?)
components-local-app-app-linux ?
components-local-app-app-windows ?
components-registry-facade-app 11.67% <ø> (?)
components-registry-facade-lib 11.67% <ø> (?)
components-service-waiter-app ∅ <ø> (?)
components-supervisor-app 38.02% <ø> (?)
components-workspacekit-app 7.15% <ø> (?)
components-ws-daemon-api-go-lib ∅ <ø> (?)
components-ws-daemon-app 22.35% <0.00%> (?)
components-ws-daemon-nsinsider-app ∅ <ø> (?)
components-ws-manager-api-go-lib ∅ <ø> (?)
components-ws-manager-app 38.58% <ø> (?)
components-ws-proxy-app 66.87% <ø> (?)
dev-loadgen-app ∅ <ø> (?)
dev-poolkeeper-app ∅ <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/common-go/log/log.go 8.04% <0.00%> (ø)
components/ws-daemon/pkg/content/initializer.go 0.00% <0.00%> (ø)
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go
components/ws-daemon/pkg/content/archive.go 58.88% <0.00%> (ø)
components/supervisor/pkg/dropwriter/dropwriter.go 73.46% <0.00%> (ø)
components/content-service/pkg/git/porcelain.go 91.89% <0.00%> (ø)
components/ws-proxy/pkg/proxy/proxy.go 30.35% <0.00%> (ø)
components/common-go/util/duration.go 45.45% <0.00%> (ø)
components/ws-daemon/pkg/resources/controller.go 31.06% <0.00%> (ø)
... and 98 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 a45506d...734d18c. Read the comment docs.

@aledbf
Copy link
Member Author

aledbf commented Sep 14, 2021

/werft run

👍 started the job as gitpod-build-aledbf-eof.8

@aledbf aledbf force-pushed the aledbf/eof branch 3 times, most recently from ea07653 to e91ae75 Compare September 14, 2021 22:28
@roboquat roboquat added size/L and removed size/M labels Sep 14, 2021
@aledbf aledbf force-pushed the aledbf/eof branch 4 times, most recently from 054d056 to 5d23b6c Compare September 14, 2021 23:46
@csweichel
Copy link
Contributor

/lgtm

@aledbf
Copy link
Member Author

aledbf commented Sep 15, 2021

/approve no-issue

@csweichel
Copy link
Contributor

/lgtm

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, csweichel

Associated issue requirement bypassed by: aledbf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Successfully merging this pull request may close these issues.

None yet

3 participants