This is an automated email from the ASF dual-hosted git repository. lostluck pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new 5e8c258 [BEAM-13419] Check for initialization in dataflow runner (#16765) 5e8c258 is described below commit 5e8c25838b90870c1ca604e3fe02887a6393d876 Author: Danny McCormick <dannymccorm...@google.com> AuthorDate: Mon Feb 7 15:51:22 2022 -0500 [BEAM-13419] Check for initialization in dataflow runner (#16765) --- sdks/go/pkg/beam/runners/dataflow/dataflow.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdks/go/pkg/beam/runners/dataflow/dataflow.go b/sdks/go/pkg/beam/runners/dataflow/dataflow.go index 89c3797..4cd877f 100644 --- a/sdks/go/pkg/beam/runners/dataflow/dataflow.go +++ b/sdks/go/pkg/beam/runners/dataflow/dataflow.go @@ -155,6 +155,10 @@ var unique int32 // Execute runs the given pipeline on Google Cloud Dataflow. It uses the // default application credentials to submit the job. func Execute(ctx context.Context, p *beam.Pipeline) (beam.PipelineResult, error) { + if !beam.Initialized() { + panic("Beam has not been initialized. Call beam.Init() before pipeline construction.") + } + // (1) Gather job options project := gcpopts.GetProjectFromFlagOrEnvironment(ctx)