-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Possible Regression with CloudWatch Timestamps in v1.34.9 #3498
Comments
I believe i am experiencing the same issue. My scripts have stopped working. |
Same here |
Thanks @Sutto for bringing this to our attention and thanks @niebloomj and @saraogivinay for confirming this. I'm able to reproduce the described behavior, we'll work on fixing this shortly. In the meantime as a temporary workaround you can reformat t, _ := time.Parse(time.RFC3339, time.Now().Format(time.RFC3339))
input := &cloudwatch.PutMetricDataInput{
MetricData: []*cloudwatch.MetricDatum{
{
MetricName: aws.String("go-3498"),
Timestamp: aws.Time(t),
Value: aws.Float64(0.50),
Unit: aws.String("Count"),
},
},
Namespace: aws.String("go-3498"),
} |
You can also simplify this with Time.Truncate, and avoid the input := &cloudwatch.PutMetricDataInput{
MetricData: []*cloudwatch.MetricDatum{
{
MetricName: aws.String("go-3498"),
Timestamp: aws.Time(t.Truncate(time.Second)),
Value: aws.Float64(0.50),
Unit: aws.String("Count"),
},
},
Namespace: aws.String("go-3498"),
} |
=== ### Service Client Updates * `service/cloudfront`: Updates service API and documentation * You can now manage CloudFront's additional, real-time metrics with the CloudFront API. * `service/cur`: Updates service API and documentation * This release add MONTHLY as the new supported TimeUnit for ReportDefinition. * `service/elasticmapreduce`: Updates service API, documentation, and paginators * Amazon EMR adds support for ICMP, port -1, in Block Public Access Exceptions and API access for EMR Notebooks execution. You can now non-interactively execute EMR Notebooks and pass input parameters. * `service/route53`: Updates service documentation * Documentation updates for Route 53 ### SDK Bugs * `private/protocol`: Limit iso8601 fractional second precision to milliseconds ([#3507](#3507)) * Fixes [#3498](#3498)
Release v1.34.13 (2020-08-28) === ### Service Client Updates * `service/cloudfront`: Updates service API and documentation * You can now manage CloudFront's additional, real-time metrics with the CloudFront API. * `service/cur`: Updates service API and documentation * This release add MONTHLY as the new supported TimeUnit for ReportDefinition. * `service/elasticmapreduce`: Updates service API, documentation, and paginators * Amazon EMR adds support for ICMP, port -1, in Block Public Access Exceptions and API access for EMR Notebooks execution. You can now non-interactively execute EMR Notebooks and pass input parameters. * `service/route53`: Updates service documentation * Documentation updates for Route 53 ### SDK Bugs * `private/protocol`: Limit iso8601 fractional second precision to milliseconds ([#3507](#3507)) * Fixes [#3498](#3498)
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
The latest release (and I suspect #3489) is causing a regression with all code that uses the cloudwatch SDK for us. We just went from 1.34.7 to 1.34.9, and in code that posts custom metrics started receiving exceptions such as:
We aren't serializing times, instead passing
aws.Time(time.Now())
, and the only change was to bump our SDK version as above.Version of AWS SDK for Go?
v1.34.9
Version of Go (
go version
)?1.13.6
To Reproduce (observed behavior)
timestamp
ofaws.Time(time.Now())
(I unfortunately don't have a full code sample as my go is rusty, but can get one if it helps)
Expected behavior
It to continue to work as it previously did, especially since we're not explicitly constructing ISO8601 times?
Additional context
I'm assuming there is possibly a difference in the level of granularity supported for ISO8601 timestamp (hence the above PR being the possible cause?).
The text was updated successfully, but these errors were encountered: