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

chore!: promote AssuredWorkloads to V1 #7391

Merged
merged 2 commits into from
Jun 13, 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
2 changes: 1 addition & 1 deletion .repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"AssuredWorkloads": {
"language": "php",
"distribution_name": "google/cloud-assured-workloads",
"release_level": "preview",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-assured-workloads/latest",
"library_type": "GAPIC_AUTO",
"api_shortname": "assuredworkloads"
Expand Down
2 changes: 1 addition & 1 deletion AssuredWorkloads/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deep-copy-regex:
- source: /google/cloud/assuredworkloads/(v1|v1beta1)/.*-php/(.*)
- source: /google/cloud/assuredworkloads/(v1)/.*-php/(.*)
dest: /owl-bot-staging/AssuredWorkloads/$1/$2
api-name: AssuredWorkloads
5 changes: 2 additions & 3 deletions AssuredWorkloads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ foreach ($workloads as $workload) {

### 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
Binary file not shown.
41 changes: 0 additions & 41 deletions AssuredWorkloads/metadata/V1Beta1/AssuredworkloadsService.php

This file was deleted.

Binary file not shown.
55 changes: 25 additions & 30 deletions AssuredWorkloads/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,37 @@

import synthtool as s
from synthtool.languages import php
from synthtool import _tracked_paths

logging.basicConfig(level=logging.DEBUG)

src = Path(f"../{php.STAGING_DIR}/AssuredWorkloads").resolve()
dest = Path().resolve()

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

# Change the wording for the deprecation warning.
s.replace(
'src/*/*_*.php',
r'will be removed in the next major release',
'will be removed in a future release')
# Added so that we can pass copy_excludes in the owlbot_main() call
_tracked_paths.add(src)

### [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
php.owlbot_main(src=src, dest=dest)

# fix relative cloud.google.com links
# remove class_alias code
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([
'npm',
'exec',
'--yes',
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
'**/Client/*',
'--write',
'--parser=php',
'--single-quote',
'--print-width=120'])
4 changes: 2 additions & 2 deletions AssuredWorkloads/src/V1/AcknowledgeViolationRequest.php

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

187 changes: 0 additions & 187 deletions AssuredWorkloads/src/V1/AssuredWorkloadsServiceGrpcClient.php

This file was deleted.

Loading
Loading