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

Streamline beam.Init() requirement for Go pipelines. #19226

Open
kennknowles opened this issue Jun 3, 2022 · 2 comments
Open

Streamline beam.Init() requirement for Go pipelines. #19226

kennknowles opened this issue Jun 3, 2022 · 2 comments

Comments

@kennknowles
Copy link
Member

When writing a Go pipeline it's necessary to call beam.Init() at the beginning of your code, but right now there is nearly no validation or checking around that. This makes it very easy for a new user of Beam Go to accidentally leave it out and not get a clear signal for why their pipeline isn't being executed as expected. This issue is for tracking progress towards streamlining this requirement to improve the user experience.

In the short term this can be easily improved by improving documentation and examples to clearly communicate the necessity of beam.Init(), and also add log warnings to provide some signal if the user forgot to call it.

In the long term, the best solution to this would be to try avoiding the problem all together (for example by removing the need for beam.Init(), or having it called implicitly without relying on users to call it), or to create a stronger failure state, for example by having pipelines without beam.Init() immediately break with a clear message notifying the user that it was not called.

Imported from Jira BEAM-6113. Original Jira may contain additional context.
Reported by: danoliveira.

@damccorm
Copy link
Contributor

damccorm commented Jun 6, 2022

Adding the good first issue tag because I think the short term solutions don't require a ton of context. The longer term solution might be harder(though failing pipelines without beam.Init might be doable)

@damccorm damccorm added go and removed sdk-go labels Jun 16, 2022
@mohamedawnallah
Copy link
Contributor

.take-issue

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

No branches or pull requests

3 participants