Skip to content

PMM-13596: surpress authorization error from timezone #263

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

Merged
merged 2 commits into from
May 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/pmm-dump/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func getPMMServiceAgentsIds(pmmURL string, c *client.Client, serviceID string) (
return agentsIDs, nil
}

// getTimeZone returns empty string result if there is no preferred timezone in pmm-server graphana settings.
// getTimeZone returns empty string result if there is no preferred timezone in pmm-server Grafana settings.
func getPMMTimezone(pmmURL string, c *client.Client) (string, error) {
type tzResp struct {
Timezone string `json:"timezone"`
Expand All @@ -226,12 +226,12 @@ func composeMeta(pmmURL string, c *client.Client, exportServices bool, cli *king
return nil, errors.Wrap(err, "failed to get PMM version")
}

var pmmTz *string
pmmTzRaw, err := getPMMTimezone(pmmURL, c)
if err != nil {
return nil, errors.Wrap(err, "failed to get PMM timezone")
}
var pmmTz *string
if len(pmmTzRaw) == 0 || pmmTzRaw == "browser" {
log.Err(err).Msg("failed to get PMM timezone")
pmmTz = nil
} else if len(pmmTzRaw) == 0 || pmmTzRaw == "browser" {
pmmTz = nil
} else {
pmmTz = &pmmTzRaw
Expand Down
Loading