Skip to content

Commit

Permalink
feat: add use_topic_schema for Cloud Storage Subscriptions (#1948)
Browse files Browse the repository at this point in the history
* feat: add use_topic_schema for Cloud Storage Subscriptions

PiperOrigin-RevId: 643385701

Source-Link: googleapis/googleapis@f29a82a

Source-Link: googleapis/googleapis-gen@f8f3f60
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjhmM2Y2MGFkMmFiNGU4MWZlMDI0MzY4YWQwNDMwOTAwMTc0ZTgyYiJ9

* build: ignore owl-bot-staging while doing owlbot PRs

* build: exclude the owl-bot-staging tree from the header CI

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* build: more updates to help owlbot

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: feywind <57276408+feywind@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 10, 2024
1 parent de0fad7 commit 120fa1b
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
test/fixtures
build/
docs/
owl-bot-staging/
protos/
samples/generated/
system-test/**/fixtures
12 changes: 12 additions & 0 deletions .github/.header-checker-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
allowedCopyrightHolders:
- 'Google LLC'
allowedLicenses:
- 'Apache-2.0'
- 'MIT'
- 'BSD-3'
sourceFileExtensions:
- 'ts'
- 'js'
- 'java'
ignoreFiles:
- 'owl-bot-staging/**'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/docs/
/out/
/build/
samples/build/
system-test/secrets.js
system-test/*key.json
*.lock
Expand Down
4 changes: 3 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
node.owlbot_main(templates_excludes=[
'src/index.ts',
'.github/PULL_REQUEST_TEMPLATE.md',
'.github/release-please.yml'
'.github/release-please.yml',
'.github/header-checker-lint.yaml',
'.eslintignore'
])
8 changes: 8 additions & 0 deletions protos/google/pubsub/v1/pubsub.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,10 @@ message CloudStorageConfig {
// data (for example, an ordering_key, if present) are added as entries in
// the attributes map.
bool write_metadata = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. When true, the output Cloud Storage file will be serialized
// using the topic schema, if it exists.
bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Possible states for a Cloud Storage subscription.
Expand All @@ -1188,6 +1192,10 @@ message CloudStorageConfig {
// Cannot write to the destination because enforce_in_transit is set to true
// and the destination locations are not in the allowed regions.
IN_TRANSIT_LOCATION_RESTRICTION = 4;

// Cannot write to the Cloud Storage bucket due to an incompatibility
// between the topic schema and subscription settings.
SCHEMA_MISMATCH = 5;
}

// Required. User-provided name for the Cloud Storage bucket.
Expand Down
9 changes: 8 additions & 1 deletion protos/protos.d.ts

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

33 changes: 32 additions & 1 deletion protos/protos.js

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

10 changes: 9 additions & 1 deletion protos/protos.json

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

1 change: 1 addition & 0 deletions samples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/

0 comments on commit 120fa1b

Please sign in to comment.