Skip to content

Commit

Permalink
chore!: promote ArtifactRegistry to v1 (#7389)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Jun 13, 2024
1 parent 93557f0 commit 9da3d88
Show file tree
Hide file tree
Showing 177 changed files with 671 additions and 13,206 deletions.
2 changes: 1 addition & 1 deletion .repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"ArtifactRegistry": {
"language": "php",
"distribution_name": "google/cloud-artifact-registry",
"release_level": "preview",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-artifact-registry/latest",
"library_type": "GAPIC_AUTO",
"api_shortname": "artifactregistry"
Expand Down
2 changes: 1 addition & 1 deletion ArtifactRegistry/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deep-copy-regex:
- source: /google/devtools/artifactregistry/(v1|v1beta2)/.*-php/(.*)
- source: /google/devtools/artifactregistry/(v1)/.*-php/(.*)
dest: /owl-bot-staging/ArtifactRegistry/$1/$2
api-name: ArtifactRegistry
5 changes: 2 additions & 3 deletions ArtifactRegistry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ on authenticating your client. Once authenticated, you'll be ready to start maki

### 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 removed ArtifactRegistry/metadata/V1Beta2/AptArtifact.php
Binary file not shown.
Binary file removed ArtifactRegistry/metadata/V1Beta2/File.php
Binary file not shown.
45 changes: 0 additions & 45 deletions ArtifactRegistry/metadata/V1Beta2/Package.php

This file was deleted.

Binary file removed ArtifactRegistry/metadata/V1Beta2/Repository.php
Binary file not shown.
78 changes: 0 additions & 78 deletions ArtifactRegistry/metadata/V1Beta2/Service.php

This file was deleted.

Binary file removed ArtifactRegistry/metadata/V1Beta2/Settings.php
Binary file not shown.
53 changes: 0 additions & 53 deletions ArtifactRegistry/metadata/V1Beta2/Tag.php

This file was deleted.

Binary file removed ArtifactRegistry/metadata/V1Beta2/Version.php
Binary file not shown.
Binary file removed ArtifactRegistry/metadata/V1Beta2/YumArtifact.php
Binary file not shown.
55 changes: 25 additions & 30 deletions ArtifactRegistry/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}/ArtifactRegistry").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'])
12 changes: 6 additions & 6 deletions ArtifactRegistry/src/V1/AptArtifact.php

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

2 changes: 0 additions & 2 deletions ArtifactRegistry/src/V1/AptArtifact/PackageType.php

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

Loading

0 comments on commit 9da3d88

Please sign in to comment.