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

Mark num_finite_buckets required for cloud logging metric bucket_options #8780

Merged
2 changes: 2 additions & 0 deletions mmv1/products/logging/Metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ properties:
- bucket_options.0.linear_buckets.0.offset
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: width
at_least_one_of:
Expand Down Expand Up @@ -246,6 +247,7 @@ properties:
- bucket_options.0.exponential_buckets.0.scale
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: growthFactor
at_least_one_of:
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the requirement for at_least_one_of for all 3 of the child fields numFiniteBuckets, growthFactor, and scale

Copy link
Member

Choose a reason for hiding this comment

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

This is why the build fails, the two restrictions (required, at least one of) are conflicting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func ResourceLoggingProjectSink() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
Description: `Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:[email protected]. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set unique_writer_identity to true.`,
}
return schm
Expand Down