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

refactor: ignore already closed error #1285

Merged
merged 3 commits into from
Aug 7, 2022
Merged

Conversation

KnisterPeter
Copy link
Member

This hides the file already cloesd error as it is
distracting in the output and does not provide any value.

This hides the `file already cloesd` error as it is
distracting in the output and does not provide any value.
@KnisterPeter KnisterPeter requested a review from a team as a code owner July 29, 2022 08:09
@KnisterPeter KnisterPeter self-assigned this Jul 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ CREDENTIALS secretlint yes no 1.01s
✅ EDITORCONFIG editorconfig-checker 1 0 0.02s
✅ GIT git_diff yes no 0.01s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #1285 (d8c4f5d) into master (4f8da0a) will increase coverage by 4.11%.
The diff coverage is 74.22%.

@@            Coverage Diff             @@
##           master    #1285      +/-   ##
==========================================
+ Coverage   57.50%   61.62%   +4.11%     
==========================================
  Files          32       40       +8     
  Lines        4594     5529     +935     
==========================================
+ Hits         2642     3407     +765     
- Misses       1729     1850     +121     
- Partials      223      272      +49     
Impacted Files Coverage Δ
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/model/step_result.go 0.00% <ø> (ø)
pkg/container/docker_run.go 14.03% <14.88%> (+8.49%) ⬆️
pkg/container/docker_pull.go 33.33% <33.33%> (ø)
pkg/container/file_collector.go 43.11% <43.11%> (ø)
pkg/common/git/git.go 50.00% <47.91%> (ø)
pkg/container/docker_auth.go 47.61% <50.00%> (+2.61%) ⬆️
pkg/model/workflow.go 54.32% <50.00%> (+3.40%) ⬆️
pkg/exprparser/interpreter.go 73.37% <53.48%> (-0.02%) ⬇️
pkg/model/planner.go 50.73% <60.00%> (+0.32%) ⬆️
... and 30 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@mergify mergify bot requested a review from a team July 29, 2022 15:23
@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2022

@KnisterPeter this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Aug 3, 2022
@ChristopherHX
Copy link
Contributor

You also removed the nil check for the error, this could cause a log print with a nil err.

No I didn't test this change yet

@KnisterPeter
Copy link
Member Author

I've tested it and it's fine

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

I couldn't trigger a nil error print, other than that it looks much cleaner than in the initial PR

We need to pin the linter version, it doesn't make sense to get a red check for existing code due to new linting rules

@mergify mergify bot removed the needs-work Extra attention is needed label Aug 6, 2022
@mergify mergify bot merged commit 92ddcda into master Aug 7, 2022
@mergify mergify bot deleted the ignore-already-closed branch August 7, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants