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

Automatically switch to upload_graph when the graph is large #28621

Merged
merged 13 commits into from
Oct 27, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,14 @@ public DataflowPipelineJob run(Pipeline pipeline) {
hooks.modifyEnvironmentBeforeSubmission(newJob.getEnvironment());
}

// enable upload_graph when the graph is too large
if ((Utf8.encodedLength(newJob.toString()) >= CREATE_JOB_REQUEST_LIMIT_BYTES)
liferoad marked this conversation as resolved.
Show resolved Hide resolved
&& !hasExperiment(options, "upload_graph")) {
List<String> experiments = new ArrayList<>(options.getExperiments());
experiments.add("upload_graph");
options.setExperiments(ImmutableList.copyOf(experiments));
}

// Upload the job to GCS and remove the graph object from the API call. The graph
// will be downloaded from GCS by the service.
if (hasExperiment(options, "upload_graph")) {
Expand Down