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

Generate library for google/monitoring/metricsscope/v1 #832

Closed
1 task done
Tracked by #745
coryan opened this issue Jan 24, 2025 · 0 comments · Fixed by #860
Closed
1 task done
Tracked by #745

Generate library for google/monitoring/metricsscope/v1 #832

coryan opened this issue Jan 24, 2025 · 0 comments · Fixed by #860
Assignees
Labels
api: monitoring Issues related to the Cloud Monitoring API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@coryan
Copy link
Contributor

coryan commented Jan 24, 2025

This is blocked by:


Generate with:

cargo new --lib --vcs none src/generated/monitoring/metricsscope/v1
taplo fmt Cargo.toml 
go -C generator/ run ./cmd/sidekick generate     -project-root ..     -specification-source google/monitoring/metricsscope/v1     -service-config google/monitoring/metricsscope/v1/monitoring.yaml -output src/generated/monitoring/metricsscope/v1
cargo fmt

The build fails:

typos && cargo fmt && cargo clippy -- --deny warnings && cargo test && cargo doc
error[E0433]: failed to resolve: use of undeclared type `GetOperation`
   --> src/generated/monitoring/metricsscope/v1/src/builders.rs:187:30
    |
187 |                     let op = GetOperation::new(stub)
    |                              ^^^^^^^^^^^^ use of undeclared type `GetOperation`
    |
help: a type alias with a similar name exists
    |
187 |                     let op = Operation::new(stub)
    |                              ~~~~~~~~~
help: consider importing this struct
    |
18  +     use longrunning::builders::operations::GetOperation;
    |

I think because the YAML file does not even list GetOperation in the HTTP rules overrides:

https://github.com/googleapis/googleapis/blob/master/google/monitoring/metricsscope/v1/monitoring.yaml

Unlike the prior cases (Bigtable and Cloud Build), where they do:

http:
  rules:
  - selector: google.longrunning.Operations.CancelOperation
    post: '/v2/{name=operations/**}:cancel'
  - selector: google.longrunning.Operations.DeleteOperation
    delete: '/v2/{name=operations/**}'
  - selector: google.longrunning.Operations.GetOperation
    get: '/v2/{name=operations/**}'
  - selector: google.longrunning.Operations.ListOperations
    get: '/v2/{name=operations/projects/**}/operations'

https://github.com/googleapis/googleapis/blob/47444ff0e3c8bca6c74ee0e8412aa747a9e0126d/google/bigtable/admin/v2/bigtableadmin_v2.yaml#L45-L54

@coryan coryan added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: monitoring Issues related to the Cloud Monitoring API. labels Jan 24, 2025
@coryan coryan self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: monitoring Issues related to the Cloud Monitoring API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant