Skip to content

Commit 2cb8167

Browse files
committed
feat!: owlbot updates for Spanner V2
1 parent 43ef9b4 commit 2cb8167

File tree

188 files changed

+429
-2278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+429
-2278
lines changed

Spanner/owlbot.py

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -70,56 +70,15 @@
7070
# copy GPBMetadata file to metadata
7171
s.move(admin_library / f'proto/src/GPBMetadata/Google/Spanner', f'metadata/', merge=php._merge)
7272

73-
74-
# Fix test namespaces
75-
s.replace(
76-
'tests/Unit/Admin/Database/*/*.php',
77-
r'namespace Google\\Cloud\\Spanner\\Admin\\Database\\Tests\\Unit',
78-
r'namespace Google\\Cloud\\Spanner\\Tests\\Unit\\Admin\\Database')
73+
# remove class_alias code
7974
s.replace(
80-
'tests/Unit/Admin/Instance/*/*.php',
81-
r'namespace Google\\Cloud\\Spanner\\Admin\\Instance\\Tests\\Unit',
82-
r'namespace Google\\Cloud\\Spanner\\Tests\\Unit\\Admin\\Instance')
83-
84-
# fix test group
85-
s.replace(
86-
'tests/**/Admin/Database/V1/*Test.php',
87-
'@group database',
88-
'@group spanner-admin-database')
89-
90-
s.replace(
91-
'tests/**/Admin/Instance/V1/*Test.php',
92-
'@group instance',
93-
'@group spanner-admin-instance')
94-
95-
# remove ReadOnly class_alias code
96-
s.replace(
97-
"src/V*/**/PBReadOnly.php",
98-
r"^// Adding a class alias for backwards compatibility with the \"readonly\" keyword.$"
75+
"src/V*/**/*.php",
76+
r"^// Adding a class alias for backwards compatibility with the previous class name.$"
9977
+ "\n"
100-
+ r"^class_alias\(PBReadOnly::class, __NAMESPACE__ . '\\ReadOnly'\);$"
78+
+ r"^class_alias\(.*\);$"
10179
+ "\n",
10280
'')
10381

104-
### [START] protoc backwards compatibility fixes
105-
106-
# roll back to private properties.
107-
s.replace(
108-
"src/**/V*/**/*.php",
109-
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
110-
r"""Generated from protobuf field \1
111-
*/
112-
private $""")
113-
114-
# Replace "Unwrapped" with "Value" for method names.
115-
s.replace(
116-
"src/**/V*/**/*.php",
117-
r"public function ([s|g]\w{3,})Unwrapped",
118-
r"public function \1Value"
119-
)
120-
121-
### [END] protoc backwards compatibility fixes
122-
12382
# fix relative cloud.google.com links
12483
s.replace(
12584
"src/**/V*/**/*.php",

Spanner/src/Admin/Database/V1/AddSplitPointsRequest.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/Backup.php

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupInfo.php

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupInstancePartition.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupSchedule.php

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/Backup_State.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

Spanner/src/Admin/Database/V1/Client/DatabaseAdminClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2023 Google LLC
3+
* Copyright 2024 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Spanner/src/Admin/Database/V1/CopyBackupEncryptionConfig.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/CopyBackupEncryptionConfig_EncryptionType.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)