Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Failed Collector build does not exit with error code #21

Closed
eroteme opened this issue Mar 10, 2021 · 4 comments
Closed

Failed Collector build does not exit with error code #21

eroteme opened this issue Mar 10, 2021 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@eroteme
Copy link
Contributor

eroteme commented Mar 10, 2021

When running our pipeline for our opentelemetry collector build, a failure did not cause our pipeline to fail.

I think this is due to no errors being passed backup to main. Is there a reason why errors cannot be passed back to the main package and the run of the build return non zero exit code if there was an issue.

If not then I'll create a PR for proposal.

@eroteme eroteme changed the title Failed Collector build does not exit with error Failed Collector build does not exit with error code Mar 10, 2021
@jpkrohling
Copy link
Member

I'm not quite sure I understand the problem description. Are you talking about a runtime error, or is it about an error while building the distribution? Are you able to provide a manifest + otelcol config file that demonstrates the problem?

@jpkrohling jpkrohling added the question Further information is requested label Mar 11, 2021
@eroteme
Copy link
Contributor Author

eroteme commented Mar 11, 2021

When I tried to build collector v0.22.0 in our pipeline the build of the collector failed (runtime error) due to issue fixed by Pull #19. However, the pipeline succeeded as the otelcol-builder did not return an error exit code. Looking at main() no errors are propagated back to the main run of the program and so any errors are effectively ignored in terms of return code.

My question is there a reason for this, or should I create a pull request that propagates the errors back to main so that builder can exit with a non-zero exit code. This would allow my pipeline to fail if the build of the collector fails.

@jpkrohling
Copy link
Member

Oh, I see what you mean now. You are not talking about the main that is generated as part of the builder, but the builder's main. Yes, agree that the builder should propagate any errors that it gets from the underlying commands it runs.

@jpkrohling jpkrohling added bug Something isn't working good first issue Good for newcomers and removed question Further information is requested labels Mar 11, 2021
@eroteme
Copy link
Contributor Author

eroteme commented Apr 1, 2021

PR #28 closes this issue

@eroteme eroteme closed this as completed Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants