Skip to content

Commit

Permalink
chore!: promote Dataflow to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Dec 17, 2024
1 parent 70dd30d commit 792186d
Show file tree
Hide file tree
Showing 148 changed files with 590 additions and 5,696 deletions.
4 changes: 2 additions & 2 deletions .repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@
"Dataflow": {
"language": "php",
"distribution_name": "google/cloud-dataflow",
"release_level": "preview",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataflow/latest",
"library_type": "GAPIC_AUTO",
"api_shortname": "dataflow"
Expand Down Expand Up @@ -1599,4 +1599,4 @@
"library_type": "GAPIC_AUTO",
"api_shortname": "workflows"
}
}
}
4 changes: 2 additions & 2 deletions Dataflow/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deep-copy-regex:
- source: /google/dataflow/v1beta3/.*-php/(.*)
dest: /owl-bot-staging/Dataflow/v1beta3/$1
- source: /google/dataflow/(v1beta3)/.*-php/(.*)
dest: /owl-bot-staging/Dataflow/$1/$2
api-name: Dataflow
5 changes: 2 additions & 3 deletions Dataflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ for more information about the debugging tools.

### Version

This component is considered beta. As such, it should be expected to be mostly
stable and we're working towards a release candidate. We will address issues
and requests with a higher priority.
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in
any minor or patch releases. We will address issues and requests with the highest priority.

### Next Steps

Expand Down
43 changes: 10 additions & 33 deletions Dataflow/owlbot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,37 +32,14 @@

php.owlbot_main(src=src, dest=dest)

# Change the wording for the deprecation warning.
# remove class_alias code
s.replace(
'src/*/*_*.php',
r'will be removed in the next major release',
'will be removed in a future release')

### [START] protoc backwards compatibility fixes

# roll back to private properties.
s.replace(
"src/**/V*/**/*.php",
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
r"""Generated from protobuf field \1
*/
private $""")

# Replace "Unwrapped" with "Value" for method names.
s.replace(
"src/**/V*/**/*.php",
r"public function ([s|g]\w{3,})Unwrapped",
r"public function \1Value"
)

### [END] protoc backwards compatibility fixes

# fix relative cloud.google.com links
s.replace(
"src/**/V*/**/*.php",
r"(.{0,})\]\((/.{0,})\)",
r"\1](https://cloud.google.com\2)"
)
"src/V*/**/*.php",
r"^// Adding a class alias for backwards compatibility with the previous class name.$"
+ "\n"
+ r"^class_alias\(.*\);$"
+ "\n",
'')

# format generated clients
subprocess.run([
Expand All @@ -72,8 +49,8 @@
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
'**/Gapic/*',
'**/Client/*',
'--write',
'--parser=php',
'--single-quote',
'--print-width=80'])
'--print-width=120'])
12 changes: 6 additions & 6 deletions Dataflow/src/V1beta3/AutoscalingEvent.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions Dataflow/src/V1beta3/AutoscalingEvent_AutoscalingEventType.php

This file was deleted.

4 changes: 2 additions & 2 deletions Dataflow/src/V1beta3/AutoscalingSettings.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Dataflow/src/V1beta3/BigQueryIODetails.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Dataflow/src/V1beta3/BigTableIODetails.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dataflow/src/V1beta3/CheckActiveJobsRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dataflow/src/V1beta3/CheckActiveJobsResponse.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions Dataflow/src/V1beta3/Client/FlexTemplatesServiceClient.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,6 @@
use Google\Cloud\Dataflow\V1beta3\LaunchFlexTemplateRequest;
use Google\Cloud\Dataflow\V1beta3\LaunchFlexTemplateResponse;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides a service for Flex templates. This feature is not ready yet.
Expand Down Expand Up @@ -148,9 +147,6 @@ private static function getClientDefaults()
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
* @type false|LoggerInterface $logger
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
Expand Down Expand Up @@ -198,8 +194,10 @@ public function __call($method, $args)
*
* @experimental
*/
public function launchFlexTemplate(LaunchFlexTemplateRequest $request, array $callOptions = []): LaunchFlexTemplateResponse
{
public function launchFlexTemplate(
LaunchFlexTemplateRequest $request,
array $callOptions = []
): LaunchFlexTemplateResponse {
return $this->startApiCall('LaunchFlexTemplate', $request, $callOptions)->wait();
}
}
6 changes: 1 addition & 5 deletions Dataflow/src/V1beta3/Client/JobsV1Beta3Client.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,6 @@
use Google\Cloud\Dataflow\V1beta3\SnapshotJobRequest;
use Google\Cloud\Dataflow\V1beta3\UpdateJobRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: Provides a method to create and modify Google Cloud Dataflow jobs.
Expand Down Expand Up @@ -163,9 +162,6 @@ private static function getClientDefaults()
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
* @type false|LoggerInterface $logger
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
Expand Down
6 changes: 1 addition & 5 deletions Dataflow/src/V1beta3/Client/MessagesV1Beta3Client.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,6 @@
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Dataflow\V1beta3\ListJobMessagesRequest;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: The Dataflow Messages API is used for monitoring the progress of
Expand Down Expand Up @@ -149,9 +148,6 @@ private static function getClientDefaults()
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
* @type false|LoggerInterface $logger
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
Expand Down
18 changes: 9 additions & 9 deletions Dataflow/src/V1beta3/Client/MetricsV1Beta3Client.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,6 @@
use Google\Cloud\Dataflow\V1beta3\GetStageExecutionDetailsRequest;
use Google\Cloud\Dataflow\V1beta3\JobMetrics;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Log\LoggerInterface;

/**
* Service Description: The Dataflow Metrics API lets you monitor the progress of Dataflow
Expand Down Expand Up @@ -154,9 +153,6 @@ private static function getClientDefaults()
* @type callable $clientCertSource
* A callable which returns the client cert as a string. This can be used to
* provide a certificate and private key to the transport layer for mTLS.
* @type false|LoggerInterface $logger
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
* }
*
* @throws ValidationException
Expand Down Expand Up @@ -206,8 +202,10 @@ public function __call($method, $args)
*
* @experimental
*/
public function getJobExecutionDetails(GetJobExecutionDetailsRequest $request, array $callOptions = []): PagedListResponse
{
public function getJobExecutionDetails(
GetJobExecutionDetailsRequest $request,
array $callOptions = []
): PagedListResponse {
return $this->startApiCall('GetJobExecutionDetails', $request, $callOptions);
}

Expand Down Expand Up @@ -272,8 +270,10 @@ public function getJobMetrics(GetJobMetricsRequest $request, array $callOptions
*
* @experimental
*/
public function getStageExecutionDetails(GetStageExecutionDetailsRequest $request, array $callOptions = []): PagedListResponse
{
public function getStageExecutionDetails(
GetStageExecutionDetailsRequest $request,
array $callOptions = []
): PagedListResponse {
return $this->startApiCall('GetStageExecutionDetails', $request, $callOptions);
}
}
Loading

0 comments on commit 792186d

Please sign in to comment.