Skip to content

Conversation

@chingor13
Copy link
Collaborator

@chingor13 chingor13 commented Apr 1, 2020

Regenerates the Logging Client with the v2 Gapic configuration which includes multi-pattern resource names

NOTE if you are only using the hand-written layer, no changes should be necessary. The protobuf messages and generated clients are part of the public surface area so this is a major version bump.

Breaking proto message changes

  • Removes startTime and endTime fields from LogSink protobuf message
  • Removes metadata field from LogEntry protobuf message

Resource ames

Rather than providing an abstract base class for a resource name type, we provide a concrete base class which serves as the default resource name.

For example, we previously provided an abstract class LogName with concrete implementations of BillingLogName, FolderLogName, OrganizationLogName, and ProjectLogName from which you would pick one to use. Now LogName behaves like a ProjectLogName by default but can also be used to build all types - LogName.ofProjectLogName, LogName.ofBillingLogName, LogName.ofFolderLogName, LogName.ofOrganizationLogName. If you were using the LogNames.parse(String) static method, you can now use LogName.parse(String).

BREAKING CHANGE:

  • If you only use com.google.cloud.logging classes (without the v2), you should not need to change any code.
  • Removes start/endTime from LogSink protobuf messages
  • Removes metadata from LogEntry protobuf messages
  • Removes old resource name types in favor of the new multi-pattern resource names
yoshi-automation and others added 21 commits March 30, 2020 15:10
2d68fe9 commit 2d68fe9 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Tue Mar 10 16:42:05 2020 +0100 deps: update core dependencies to v1.93.1 (#113) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | patch | `1.93.0` -> `1.93.1` | | [com.google.cloud:google-cloud-core-bom](https://togithub.com/googleapis/java-core) | patch | `1.93.0` -> `1.93.1` | --- ### Release Notes <details> <summary>googleapis/java-core</summary> ### [`v1.93.1`](https://togithub.com/googleapis/java-core/blob/master/CHANGELOG.md#&#8203;1931httpswwwgithubcomgoogleapisjava-corecomparev1930v1931-2020-02-28) [Compare Source](https://togithub.com/googleapis/java-core/compare/v1.93.0...v1.93.1) </details> --- ### Renovate configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-logging).
…ion to v1.0.12 (#114) 193777e commit 193777e Author: WhiteSource Renovate <bot@renovateapp.com> Date: Tue Mar 10 16:45:19 2020 +0100 samples: update dependency com.google.cloud.samples:shared-configuration to v1.0.12 (#114)
….0 (#112) 10990f5 commit 10990f5 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Mon Mar 23 18:22:53 2020 +0100 chore(deps): update dependency com.google.cloud:libraries-bom to v4.3.0 (#112) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `4.1.1` -> `4.3.0` | --- ### Renovate configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-logging).
9fa1e4b commit 9fa1e4b Author: Jeff Ching <chingor@google.com> Date: Mon Mar 23 19:33:27 2020 -0700 chore: enable context aware commits (#118)
87ebf36 commit 87ebf36 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Thu Mar 26 00:21:23 2020 +0100 deps: update dependency com.google.api:api-common to v1.9.0 (#120) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.api:api-common](https://togithub.com/googleapis/api-common-java) | minor | `1.8.1` -> `1.9.0` | --- ### Release Notes <details> <summary>googleapis/api-common-java</summary> ### [`v1.9.0`](https://togithub.com/googleapis/api-common-java/releases/v1.9.0) [Compare Source](https://togithub.com/googleapis/api-common-java/compare/v1.8.1...v1.9.0) 03-25-2020 14:09 PST #### New Features - Add `@BetaApi` `ApiFutres.catchingAsync()` ([#&#8203;117](https://togithub.com/googleapis/api-common-java/pull/117)) ##### Dependencies - Update guava to v28.2-android ([#&#8203;110](https://togithub.com/googleapis/api-common-java/pull/110)) - Update error_prone_annotations to v2.2.3 ([#&#8203;111](https://togithub.com/googleapis/api-common-java/pull/111)) </details> --- ### Renovate configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-logging).
a531870 commit a531870 Author: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Date: Fri Mar 27 15:44:08 2020 +0000 chore: release 1.101.0 (#106) 🤖 I have created a release \*beep\* \*boop\* --- ## [1.101.0](https://www.github.com/googleapis/java-logging/compare/v1.100.0...v1.101.0) (2020-03-25) ### Features * add CmekSettings options ([#89](https://www.github.com/googleapis/java-logging/issues/89)) ([f76206d](https://www.github.com/googleapis/java-logging/commit/f76206d6d137fec9e73ef7e93a8b77193d71166c)) ### Bug Fixes * **regen:** undeprecate resourcenames until multi-pattern resource names are available ([#108](https://www.github.com/googleapis/java-logging/issues/108)) ([4ca5895](https://www.github.com/googleapis/java-logging/commit/4ca5895f2bb83fcf1c7ecf908aae1c50d9cd89d9)) ### Dependencies * update core dependencies ([#61](https://www.github.com/googleapis/java-logging/issues/61)) ([a73322c](https://www.github.com/googleapis/java-logging/commit/a73322cb0e8f43eb253a4004189f1e4d387dcb1c)) * update core dependencies ([#85](https://www.github.com/googleapis/java-logging/issues/85)) ([5e61aa7](https://www.github.com/googleapis/java-logging/commit/5e61aa7180934af6b63e845f2d172c6e6d08d0ee)) * update core dependencies ([#92](https://www.github.com/googleapis/java-logging/issues/92)) ([4fe64cc](https://www.github.com/googleapis/java-logging/commit/4fe64cc5fa0c680733e42cfc6d40c9e7aaac77a6)) * update core dependencies to v1.93.1 ([#113](https://www.github.com/googleapis/java-logging/issues/113)) ([2d68fe9](https://www.github.com/googleapis/java-logging/commit/2d68fe9a9653d08eec5427f877848cbc25c47c4b)) * update core deps ([#109](https://www.github.com/googleapis/java-logging/issues/109)) ([75d38f1](https://www.github.com/googleapis/java-logging/commit/75d38f1d6d56605f5d446cc581a5abf96256c3f4)) * update dependency com.google.api:api-common to v1.9.0 ([#120](https://www.github.com/googleapis/java-logging/issues/120)) ([87ebf36](https://www.github.com/googleapis/java-logging/commit/87ebf36b455478357ea1c0185584d5813244ade8)) * update dependency com.google.http-client:google-http-client-bom to v1.34.1 ([#81](https://www.github.com/googleapis/java-logging/issues/81)) ([dacc7db](https://www.github.com/googleapis/java-logging/commit/dacc7db6775a5489f1d43467bbece7fd781e14ba)) * update dependency com.google.http-client:google-http-client-bom to v1.34.2 ([#94](https://www.github.com/googleapis/java-logging/issues/94)) ([55f6936](https://www.github.com/googleapis/java-logging/commit/55f6936f9933d17d29ea5244d93b9460837a7c70)) * update dependency com.google.protobuf:protobuf-bom to v3.11.3 ([#87](https://www.github.com/googleapis/java-logging/issues/87)) ([dee31b3](https://www.github.com/googleapis/java-logging/commit/dee31b386b7b930419013a17cb1ae0399d7a5bdf)) * update dependency com.google.protobuf:protobuf-bom to v3.11.4 ([#95](https://www.github.com/googleapis/java-logging/issues/95)) ([954897e](https://www.github.com/googleapis/java-logging/commit/954897e43c746961d69550644f1dd5a2936d50e5)) ### Documentation * **regen:** update sample code to set total timeout, add API client header test ([#91](https://www.github.com/googleapis/java-logging/issues/91)) ([133a762](https://www.github.com/googleapis/java-logging/commit/133a762a93f0bd2725edc5342eada77459c78896)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
…-plugin to v3.2.0 (#116) 42e2a20 commit 42e2a20 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Fri Mar 27 17:22:05 2020 +0100 build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.2.0 (#116) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-javadoc-plugin | minor | `3.1.1` -> `3.2.0` | --- ### Renovate configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-logging).
1c749aa commit 1c749aa Author: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Date: Fri Mar 27 16:36:05 2020 +0000 chore: release 1.101.1-SNAPSHOT (#121) 🤖 I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
…uration to v1.0.13 (#119) e3c2b4c commit e3c2b4c Author: WhiteSource Renovate <bot@renovateapp.com> Date: Fri Mar 27 20:53:32 2020 +0100 chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.13 (#119)
c983911 commit c983911 Author: Vadym Matsishevskyi <25311427+vam-google@users.noreply.github.com> Date: Mon Mar 30 13:47:15 2020 -0700 chore: Migrate logging synth.py to bazel (#124) This PR migrates only synth.py but does not commit the regenerated files. The generation was tested and it works, the updated files are not commited due to breaking changes not related to bazel migration. There is already an open PR with those braking changes: #111
…uration to v1.0.14 (#123) 7b255a7 commit 7b255a7 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Mon Mar 30 22:48:03 2020 +0200 chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.14 (#123)
…lugin in Bazel workspace. googleapis/googleapis@6de6e93 commit 6de6e938b7df1cd62396563a067334abeedb9676 Author: Google APIs <noreply@google.com> Date: Mon Mar 2 16:21:10 2020 -0800 chore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace. PiperOrigin-RevId: 298474513
googleapis/googleapis@8f488ef commit 8f488efd7bda33885cb674ddd023b3678c40bd82 Author: Google APIs <noreply@google.com> Date: Fri Mar 6 09:13:30 2020 -0800 feat: Migrate logging to GAPIC v2; release new features. IMPORTANT: This is a breaking change for client libraries in all languages. Committer: @lukesneeringer, @jskeet PiperOrigin-RevId: 299370279
googleapis/googleapis@91e1fb5 commit 91e1fb5ef9829c0c7a64bfa5bde330e6ed594378 Author: Google APIs <noreply@google.com> Date: Fri Mar 6 11:53:17 2020 -0800 chore: update protobuf (protoc) version to 3.11.2 PiperOrigin-RevId: 299404145
…ugin in googleapis/WORKSPACE. googleapis/googleapis@7727af0 commit 7727af0e39df1ae9ad715895c8576d7b65cf6c6d Author: Google APIs <noreply@google.com> Date: Tue Mar 10 15:14:59 2020 -0700 feat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE. PiperOrigin-RevId: 300188410
…ources Chore: Update copyright years googleapis/googleapis@64ab974 commit 64ab9744073de81fec1b3a6a931befc8a90edf90 Author: Google APIs <noreply@google.com> Date: Tue Mar 17 07:59:57 2020 -0700 Fix: Introduce location-based organization/folder/billing-account resources Chore: Update copyright years PiperOrigin-RevId: 301373760
googleapis/googleapis@5058c1c commit 5058c1c96d0ece7f5301a154cf5a07b2ad03a571 Author: Google APIs <noreply@google.com> Date: Tue Mar 17 13:43:18 2020 -0700 Update GAPIC v2 with batching parameters for Logging API PiperOrigin-RevId: 301443847
googleapis/googleapis@0e9f1f6 commit 0e9f1f60ded9ad1c2e725e37719112f5b487ab65 Author: Google APIs <noreply@google.com> Date: Tue Mar 17 16:44:00 2020 -0700 bazel: Use latest release of gax_java PiperOrigin-RevId: 301480457
…. new commits: - fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79) googleapis/googleapis@8bea81b commit 8bea81bfa461698981b3d3a488a95633d2f6e9ff Author: Google APIs <noreply@google.com> Date: Thu Mar 26 14:44:25 2020 -0700 chore: use latest protoc-java-resource-name-plugin in bazel WORKSPACE. new commits: - fix: stop generating `parseList` and `toStringList` if a multi-pattern resource name has subclasses (#79) committer: @hzyi-google PiperOrigin-RevId: 303197602
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 1, 2020
@codecov
Copy link

codecov bot commented Apr 1, 2020

Codecov Report

Merging #127 into master will decrease coverage by 1.22%.
The diff coverage is 66.55%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #127 +/- ## ============================================ - Coverage 76.73% 75.51% -1.23%  + Complexity 579 543 -36  ============================================ Files 42 42 Lines 3426 3508 +82 Branches 237 213 -24 ============================================ + Hits 2629 2649 +20  - Misses 651 714 +63  + Partials 146 145 -1 
Impacted Files Coverage Δ Complexity Δ
...gle/cloud/logging/v2/stub/ConfigServiceV2Stub.java 5.26% <0.00%> (-1.41%) 1.00 <0.00> (ø)
...loud/logging/v2/stub/GrpcMetricsServiceV2Stub.java 91.66% <ø> (-0.59%) 11.00 <0.00> (-1.00)
...le/cloud/logging/v2/stub/LoggingServiceV2Stub.java 11.11% <0.00%> (ø) 1.00 <0.00> (ø)
...le/cloud/logging/v2/stub/MetricsServiceV2Stub.java 14.28% <ø> (ø) 1.00 <0.00> (ø)
...ogle/cloud/logging/v2/ConfigServiceV2Settings.java 24.56% <12.50%> (ø) 3.00 <0.00> (?)
...gle/cloud/logging/v2/LoggingServiceV2Settings.java 42.10% <25.00%> (ø) 4.00 <0.00> (?)
...oogle/cloud/logging/v2/MetricsServiceV2Client.java 60.71% <40.00%> (ø) 18.00 <2.00> (?)
...google/cloud/logging/v2/ConfigServiceV2Client.java 49.20% <40.62%> (ø) 45.00 <14.00> (?)
...oogle/cloud/logging/v2/LoggingServiceV2Client.java 65.85% <45.45%> (ø) 17.00 <6.00> (?)
...gle/cloud/logging/v2/MetricsServiceV2Settings.java 37.83% <50.00%> (ø) 3.00 <0.00> (?)
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5624afc...c957ecd. Read the comment docs.

@chingor13 chingor13 changed the title fix!: remove logging resource names feat!: remove Start/EndTime from LogSink, Metadata from LogEntry, implement multipattern resource names Apr 2, 2020
@chingor13 chingor13 marked this pull request as ready for review April 2, 2020 17:28
@chingor13 chingor13 requested a review from a team April 2, 2020 17:28
@chingor13 chingor13 mentioned this pull request Apr 2, 2020
elharo
elharo previously requested changes Apr 2, 2020
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is going to require a major version bump.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is marked as a breaking change and will be a 2.0. The underlying API also removed fields from the service and these changes should appear in the release notes.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let's update the version in the pom.xml in this PR then.

@elharo
Copy link
Contributor

elharo commented Apr 2, 2020 via email

@chingor13
Copy link
Collaborator Author

The feat! indicates a breaking change which prompts a major version bump.

@elharo elharo dismissed their stale review April 2, 2020 21:38

feat!

@chingor13 chingor13 requested a review from a team April 3, 2020 18:04
@chingor13 chingor13 added this to the 2.0 milestone Apr 3, 2020
@chingor13 chingor13 requested a review from kolea2 June 5, 2020 22:11
@chingor13
Copy link
Collaborator Author

This PR got stale after being open too long. Regenerating and applying the same fixes in #174

@chingor13 chingor13 closed this Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

5 participants