mik-laj commented on a change in pull request #8550:
URL: https://github.com/apache/airflow/pull/8550#discussion_r416185616



##########
File path: tests/providers/google/cloud/operators/test_dataflow_system.py
##########
@@ -26,4 +37,198 @@
 class CloudDataflowExampleDagsSystemTest(GoogleSystemTest):
     @provide_gcp_context(GCP_DATAFLOW_KEY)
     def test_run_example_dag_function(self):
-        self.run_dag('example_gcp_dataflow', CLOUD_DAG_FOLDER)
+        self.run_dag("example_gcp_dataflow", CLOUD_DAG_FOLDER)
+
+
+GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "example-project")
+GCR_FLEX_TEMPLATE_IMAGE = 
f"gcr.io/{GCP_PROJECT_ID}/samples-dataflow-streaming-beam-sql:latest"
+
+# 
https://github.com/GoogleCloudPlatform/java-docs-samples/tree/954553c/dataflow/flex-templates/streaming_beam_sql
+GCS_TEMPLATE_PARTS = urlparse(GCS_FLEX_TEMPLATE_TEMPLATE_PATH)
+GCS_FLEX_TEMPLATE_BUCKET_NAME = GCS_TEMPLATE_PARTS.netloc
+
+
+EXAMPLE_FLEX_TEMPLATE_REPO = "GoogleCloudPlatform/java-docs-samples"
+EXAMPLE_FLEX_TEMPLATE_COMMIT = "deb0745be1d1ac1d133e1f0a7faa9413dbfbe5fe"
+EXAMPLE_FLEX_TEMPLATE_SUBDIR = "dataflow/flex-templates/streaming_beam_sql"
+
+
[email protected]("mysql", "postgres")
[email protected]_file(GCP_GCS_TRANSFER_KEY)
+class CloudDataflowExampleDagFlexTemplateJavagSystemTest(GoogleSystemTest):
+    @provide_gcp_context(GCP_GCS_TRANSFER_KEY, 
project_id=GoogleSystemTest._project_id())
+    def setUp(self) -> None:
+        # Create a Cloud Storage bucket
+        self.execute_cmd(["gsutil", "mb", 
f"gs://{GCS_FLEX_TEMPLATE_BUCKET_NAME}"])
+
+        # Build image with pipeline
+        with NamedTemporaryFile() as f:
+            f.write(
+                textwrap.dedent(
+                    """\
+                    steps:

Review comment:
       I removed some build steps. 
   
https://github.com/apache/airflow/pull/8550/commits/aa29389cac91f29f5f37b268fa61c0a3eaabd663
   
   In order to build this Docker image I used Google Cloud Build. The Cloud 
Build service will provide a new virtual machine for each build. Each build 
contains many steps. Each step is described by a Docker image. As a result of 
the build, a new Docker image is built.
   
   I personally would not worry about a large number of images, because after 
the build is completed, the virtual machine is deleted. It does not run on the 
local machine.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to