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

feat: add Rpc Context to CommonProtos #6095

Closed
wants to merge 2 commits into from
Closed
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: 2 additions & 0 deletions CommonProtos/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ deep-copy-regex:
dest: /owl-bot-staging/CommonProtos/devtools-protos/$1
- source: /google/cloud/common/.*-php/(.*)
dest: /owl-bot-staging/CommonProtos/common-protos/$1
- source: /google/rpc/context/.*-php/(.*)
dest: /owl-bot-staging/CommonProtos/rpccontext-protos/$1
api-name: CommonProtos
109 changes: 109 additions & 0 deletions CommonProtos/metadata/Context/AttributeContext.php

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

34 changes: 34 additions & 0 deletions CommonProtos/metadata/Context/AuditContext.php

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

10 changes: 10 additions & 0 deletions CommonProtos/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
audit_src = Path(f"../{php.STAGING_DIR}/CommonProtos/audit-protos").resolve()
devtools_src = Path(f"../{php.STAGING_DIR}/CommonProtos/devtools-protos").resolve()
common_src = Path(f"../{php.STAGING_DIR}/CommonProtos/common-protos").resolve()
rpccontext_src = Path(f"../{php.STAGING_DIR}/CommonProtos/rpccontext-protos").resolve()
dest = Path().resolve()

# Added so that we can pass copy_excludes in the owlbot_main() call
_tracked_paths.add(audit_src)
_tracked_paths.add(devtools_src)
_tracked_paths.add(common_src)
_tracked_paths.add(rpccontext_src)

# use owlbot_copy_version instead of owlbot_main and set "version_string"
# manually because some common protos do not have a version
Expand Down Expand Up @@ -61,6 +63,14 @@
],
version_string="common",
)
php.owlbot_copy_version(
src=rpccontext_src,
dest=dest,
copy_excludes=[
rpccontext_src / "**/[A-Z]*_*.php"
],
version_string="context",
)

# remove class_alias code (but keep the existing class aliases)
sources = list(Path(".").glob("src/**/*.php"))
Expand Down
Loading