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

Return a consumererror.permanent from componenterror.CombineErrors() when necessary #1743

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

huyan0
Copy link
Member

@huyan0 huyan0 commented Sep 4, 2020

This PR changescomponenterror.CombineErrors() to return an error of type consumererror.permanent if any error passed to it is permanent. This PR also has some minor reformating of the testcases in error_test.go to make the "{}" align and more readable.

resolves #1736

cc @bogdandrutu

@codecov
Copy link

codecov bot commented Sep 4, 2020

Codecov Report

Merging #1743 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1743   +/-   ##
=======================================
  Coverage   92.39%   92.39%           
=======================================
  Files         256      256           
  Lines       18190    18195    +5     
=======================================
+ Hits        16806    16811    +5     
  Misses        970      970           
  Partials      414      414           
Impacted Files Coverage Δ
component/componenterror/errors.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 90.74% <0.00%> (ø)

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 3eb3b66...9ddd14a. Read the comment docs.

Comment on lines +58 to 61
if permanent {
return consumererror.Permanent(fmt.Errorf("[%s]", strings.Join(errMsgs, "; ")))
}
return fmt.Errorf("[%s]", strings.Join(errMsgs, "; "))
Copy link
Member

Choose a reason for hiding this comment

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

err := fmt.Errorf("[%s]", strings.Join(errMsgs, "; "))
if permanent {
  err = consumererror.Permanent(err)
}
return err

@bogdandrutu
Copy link
Member

@anuraaga I think you have access to the org branch. Can you update this, it is an easy change.

@bogdandrutu
Copy link
Member

Merging this since the internship I think is done. I will fix the comment in a followup PR.

@bogdandrutu bogdandrutu merged commit c725934 into open-telemetry:master Sep 11, 2020
bogdandrutu added a commit to bogdandrutu/opentelemetry-collector that referenced this pull request Sep 11, 2020
bogdandrutu added a commit that referenced this pull request Sep 11, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
…etry#1743)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.38.0 to 1.39.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.38.0...v1.39.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <[email protected]>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
…y#1743)

Bumps [boto3](https://github.com/boto/boto3) from 1.24.19 to 1.24.20.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.24.19...1.24.20)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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.

Return a consumererror.permanent from componenterror.CombineErrors() when necessary
2 participants