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

Mark YamlTemplate as GA #1531

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ public ImageSpec buildSpecModel(boolean validateFlag) {
block.name(), Arrays.asList(block.content())))
.collect(Collectors.toList()));

if (templateAnnotation.type().equals(TemplateType.YAML)) {
metadata.setMainClass("");
} else if (templateAnnotation.placeholderClass() != null
if (templateAnnotation.placeholderClass() != null
&& templateAnnotation.placeholderClass() != void.class) {
metadata.setMainClass(templateAnnotation.placeholderClass().getName());
} else {
Expand Down
4 changes: 2 additions & 2 deletions plugins/core-plugin/src/main/resources/README-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ mvn clean package -PtemplatesStage \
-DbucketName="$BUCKET_NAME" \
-DstagePrefix="templates" \
-DtemplateName="${spec.metadata.internalName}" \
<#if language == 'PYTHON'>
<#if language == 'PYTHON' || language == 'YAML'>
-f python
<#elseif flex>
-f v2/${spec.metadata.module!}
Expand Down Expand Up @@ -196,7 +196,7 @@ mvn clean package -PtemplatesRun \
-DjobName="${spec.metadata.internalName?lower_case?replace("_", "-")}-job" \
-DtemplateName="${spec.metadata.internalName}" \
-Dparameters="<#list spec.metadata.parameters as parameter>${parameter.name}=$${parameter.name?replace('([a-z])([A-Z])', '$1_$2', 'r')?upper_case?replace("-", "_")}<#sep>,</#sep></#list>" \
<#if language == 'PYTHON'>
<#if language == 'PYTHON' || language == 'YAML'>
-f python
<#elseif flex>
-f v2/${spec.metadata.module!}
Expand Down
14 changes: 11 additions & 3 deletions python/README_Yaml_Template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

YAML Template (Experimental) template
YAML Template
---
YAML pipeline. Reads YAML from Cloud Storage and dynamically expands YAML into
Beam pipeline graph.
The YAML Template is used to run Dataflow pipelines written in Beam YAML. The
YAML pipeline can be passed to the template directly as a raw string or the
location of a Beam YAML pipeline file stored in Google Cloud Storage can
optionally be passed.

For launching a Beam YAML pipeline directly from the gcloud command line, see
https://cloud.google.com/sdk/gcloud/reference/dataflow/yaml.

For more information on Beam YAML, see
https://beam.apache.org/documentation/sdks/yaml/.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@
name = "Yaml_Template",
category = TemplateCategory.GET_STARTED,
type = Template.TemplateType.YAML,
displayName = "YAML Template (Experimental)",
displayName = "YAML",
description =
"YAML pipeline. Reads YAML from Cloud Storage and dynamically expands YAML into "
+ "Beam pipeline graph.",
"The YAML Template is used to run Dataflow pipelines written in Beam YAML. "
+ "The YAML pipeline can be passed to the template directly as a raw string or the location "
+ "of a Beam YAML pipeline file stored in Google Cloud Storage can optionally be passed."
+ "\n\n"
+ "For launching a Beam YAML pipeline directly from the gcloud command line, see "
+ "https://cloud.google.com/sdk/gcloud/reference/dataflow/yaml"
+ "\n\n"
+ "For more information on Beam YAML, see https://beam.apache.org/documentation/sdks/yaml/",
flexContainerName = "yaml-template",
contactInformation = "https://cloud.google.com/support")
contactInformation = "https://cloud.google.com/support",
requirements = {
"A valid Beam YAML pipeline.",
})
public interface YAMLTemplate {
@TemplateParameter.Text(
order = 1,
Expand Down
Loading