Skip to content

feat: regenerate google-cloud-monitoring#8640

Open
jskeet wants to merge 2 commits into
googleapis:mainfrom
jskeet:local-owlbot-google-cloud-monitoring
Open

feat: regenerate google-cloud-monitoring#8640
jskeet wants to merge 2 commits into
googleapis:mainfrom
jskeet:local-owlbot-google-cloud-monitoring

Conversation

@jskeet

@jskeet jskeet commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR regenerates the google-cloud-monitoring package after fixing its OwlBot configuration to point to the correct path in googleapis-gen.

Highlights

  • Updated .OwlBot.yaml to use the new source path google-monitoring-nodejs and staging destination google-monitoring.
  • Regenerated the client library using OwlBot.
  • Protos updated with reserved fields.
  • Applied formatting updates across all TS files.
  • Note on README.md / webpack.config.js changes: A template fallback occurred during post-processing due to the staging path mismatch (see details below).

Detailed Rationale for Changes

Why was the OwlBot configuration updated?

The source path in googleapis-gen for this library was changed from google-cloud-monitoring-nodejs to google-monitoring-nodejs. The old path no longer exists, causing OwlBot generation to fail. The configuration was updated to match:

  • Source: /google/monitoring/google-monitoring-nodejs
  • Destination: /owl-bot-staging/google-monitoring
Why did the README.md release level revert to preview and links change to google-monitoring?

Because the staging destination in .OwlBot.yaml was changed to /owl-bot-staging/google-monitoring (which does not match the actual package directory packages/google-cloud-monitoring), the OwlBot post-processor was unable to locate the existing package metadata (.repo-metadata.json) during template generation.

As a result, the template generator fell back to default settings:

  1. Reverted the release level from stable to preview.
  2. Changed the header to "Cloud Monitoring API: Nodejs Client" (default pretty name instead of "Stackdriver Monitoring").
  3. Generated incorrect URLs pointing to packages/google-monitoring instead of packages/google-cloud-monitoring:
-[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest
-[product-docs]: https://cloud.google.com/monitoring/docs
+[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring/samples
+[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring/CHANGELOG.md
+[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring
  1. Reverted the copyright year in webpack.config.js to 2021:
-// Copyright 2026 Google LLC
+// Copyright 2021 Google LLC

Note: As noted by reviewers, fixing this internal misconfiguration is out of scope for this PR.

What formatting changes were applied?

The TypeScript generator or prettier configuration resulted in minor formatting changes across all generated client and test files. Example of formatting changes:

-import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax';
+import type {
+  Callback,
+  CallOptions,
+  Descriptors,
+  ClientOptions,
+  PaginationCallback,
+  GaxCall,
+} from 'google-gax';

-  private _defaults: {[method: string]: gax.CallSettings};
+  private _defaults: { [method: string]: gax.CallSettings };

User-facing Changes

None. The changes consist of formatting updates, proto updates (reserved fields), and documentation template fallbacks. The API surface remains functionally identical.

@jskeet jskeet requested a review from a team as a code owner June 15, 2026 08:21
@jskeet

jskeet commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

This is another case (that I'd missed before) where the OwlBot configuration refers to a non-existent path in googleapis-gen.

The first commit fixes the config, the second runs OwlBot locally.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the google-cloud-monitoring package, transitioning its status from stable to preview, renaming references from "Stackdriver Monitoring" to "Cloud Monitoring API", and applying extensive code formatting updates across several TypeScript files. Additionally, the protobuf definitions are updated with reserved fields. A critical issue was identified in .OwlBot.yaml where the destination path in deep-copy-regex was incorrectly changed to /owl-bot-staging/google-monitoring instead of /owl-bot-staging/google-cloud-monitoring, which leads to broken links in the auto-generated README.md.

Comment thread packages/google-cloud-monitoring/.OwlBot.yaml
@feywind

feywind commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

tbh I think this is a misconfiguration on the internal side that put stuff in the wrong place, but it's out of scope for this PR to fix it.

@feywind feywind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel pretty good about most of these changes, because it looks like mostly formatting stuff. There are a couple that may need some looking at, though, like the README changes. Those might be some kind of template fail.


| Sample | Source Code |
| --------------------------- | --------------------------------- |
| create alert policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring/samples/generated/v3/alert_policy_service.create_alert_policy.js) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the "open in cloud shell" links are missing now, and I'm guessing that wasn't on purpose?


See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm guessing these are also still supposed to be here, unless the links are just wrong.

deep-copy-regex:
- source: /google/monitoring/google-cloud-monitoring-nodejs
dest: /owl-bot-staging/google-cloud-monitoring
begin-after-commit-hash: ed3195d0a29ae8c2608dc5a2aa2590554a3f9d14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure I've ever seen begin-after-commit-hash so I just want to make sure this one was on purpose.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OwlBot runs the generation for all Git commit in googleapis-gen, not just the latest. Librarian runs the generation for the commit listed in the librarian.yaml. Therefore this is not a problem for Librarian.

@suztomo

suztomo commented Jun 16, 2026

Copy link
Copy Markdown
Member

I enriched the pull request description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants