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

monitoringdashboard: round trip tests #2191

Conversation

justinsb
Copy link
Collaborator

@justinsb justinsb commented Jun 28, 2024

Create a script to run our round-trip tests, also stop excluding some fields we
have added support for, and normalize more values to be valid
(e.g. alignment_period only supports whole seconds)

@justinsb justinsb force-pushed the monitoringdashboard_cleanup_roundtrips branch from ffeb042 to 277273f Compare June 29, 2024 15:01
@justinsb justinsb changed the title WIP: round trip tests monitoringdashboard: round trip tests Jun 29, 2024
Create a script to run our round-trip tests, also stop excluding some fields we
have added support for, and normalize more values to be valid
(e.g. alignment_period only supports whole seconds)
@justinsb justinsb force-pushed the monitoringdashboard_cleanup_roundtrips branch from 277273f to 4f47814 Compare June 29, 2024 15:03
@@ -142,8 +142,16 @@ func Duration_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string {
return nil
}

d := in.AsDuration()
s := fmt.Sprintf("%vs", d.Seconds())
// We want to report the duration without truncation (do don't want to map via float64)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue we're fixing is that if translation to float64 products a number that is too big (uses exponents) or too small (nanosecond precision), it wasn't round-tripping.

In theory this is in the production code, in practice it doesn't make a difference for reasonable values.


unimplementedFields.Insert(widgetPath + ".id")
unimplementedFields.Insert(widgetPath + ".time_series_table.data_sets[].time_series_query.time_series_filter.statistical_time_series_filter")
unimplementedFields.Insert(widgetPath + ".time_series_table.data_sets[].time_series_query.time_series_filter.pick_time_series_filter.interval")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't found any examples for statisticial_time_series_filter or interval, so I'm not sure if we should try to support it yet.

// This one might be a bug?
unimplementedFields.Insert(widgetPath + ".xy_chart.data_sets[].min_alignment_period.nanos")

unimplementedFields.Insert(widgetPath + ".scorecard.thresholds[].target_axis")
unimplementedFields.Insert(widgetPath + ".scorecard.blank_view")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Blank view I think we probably should support, but I think it can go into 1.121 if need be.

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

This is very cool! Thank you so much

/hold one comment about reverting a release note.

cc @jingyih

@@ -35,6 +35,7 @@ output fields from GCP APIs are in `status.observedState.*`
* Added `pieChart` widgets.
* Added `sectionHeader` widgets.
* Added `singleViewGroup` widgets.
* Added `timeSeriesTable` widgets.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I want to merge the PR without this change. Do you mind reverting?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, just checked that the timeSeriesTable field has been checked in. Thank you for updating this note!

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuwenma
Copy link
Collaborator

yuwenma commented Jul 1, 2024

/hold cancel

@google-oss-prow google-oss-prow bot merged commit c9317f5 into GoogleCloudPlatform:master Jul 1, 2024
13 checks passed
@yuwenma yuwenma added this to the 1.120 milestone Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants