[telemetry] godev/cmd/worker: skip empty partition in charts

1 view
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

May 17, 2024, 2:54:35 PMMay 17
to Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Robert Findley, Peter Weinberger

Hyang-Ah Hana Kim submitted the change with unreviewed changes

Unreviewed changes

4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

The name of the file: godev/cmd/worker/main_test.go
Insertions: 2, Deletions: 2.

@@ -9,7 +9,7 @@

- tconfig "golang.org/x/telemetry/internal/config"
+ "golang.org/x/telemetry/internal/config"

@@ -366,7 +366,7 @@

func Test_charts(t *testing.T) {
dat := nest(reports)
- cfg := &tconfig.Config{
+ cfg := &config.Config{
UploadConfig: &telemetry.UploadConfig{
GOOS: []string{"darwin"},
GOARCH: []string{"amd64"},

Change information

Commit message:
godev/cmd/worker: skip empty partition in charts

When there is no data to draw, do not include in the charts data.
Previously, this resulted in adding null to chartdata > Programs >
Charts and caused the frontend javascript to throw an exception.

Update charts.ts to handle chart json files that contain null charts.

While we are here,
* remove the exception for cmd/go (which does not have version).
After CL 585198 go toolchain programs will produce counter files
with the program field filled with the go version.
* fix the program version handling since now toolchains will have
version strings that are not semver.

Fixes golang/go#67397
Change-Id: I0c037afbbfd931b70ada310dba9d67b49521ad94
Reviewed-by: Robert Findley <rfin...@google.com>
  • M godev/cmd/worker/main.go
  • M godev/cmd/worker/main_test.go
  • M godev/go.mod
  • M godev/go.sum
  • M internal/content/telemetrygodev/charts.ts
Change size: L
Delta: 5 files changed, 242 insertions(+), 44 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Robert Findley
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: I0c037afbbfd931b70ada310dba9d67b49521ad94
Gerrit-Change-Number: 585479
Gerrit-PatchSet: 6
Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Peter Weinberger <p...@google.com>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
Reply all
Reply to author
0 new messages