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

internal/civisibility: Add auto test retries telemetry metric #3028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions internal/civisibility/utils/net/settings_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (c *client) GetSettings() (*SettingsResponseData, error) {
if responseObject.Data.Attributes.EarlyFlakeDetection.Enabled {
settingsResponseType = append(settingsResponseType, telemetry.EfdEnabledSettingsResponseType...)
}
if responseObject.Data.Attributes.FlakyTestRetriesEnabled {
settingsResponseType = append(settingsResponseType, telemetry.FlakyTestRetriesEnabledSettingsResponseType...)
}
telemetry.GitRequestsSettingsResponse(settingsResponseType)
return &responseObject.Data.Attributes, nil
}
7 changes: 4 additions & 3 deletions internal/civisibility/utils/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ const (
type SettingsResponseType []string

var (
CoverageEnabledSettingsResponseType SettingsResponseType = []string{"coverage_enabled"}
ItrSkipEnabledSettingsResponseType SettingsResponseType = []string{"itrskip_enabled"}
EfdEnabledSettingsResponseType SettingsResponseType = []string{"early_flake_detection_enabled:true"}
CoverageEnabledSettingsResponseType SettingsResponseType = []string{"coverage_enabled"}
ItrSkipEnabledSettingsResponseType SettingsResponseType = []string{"itrskip_enabled"}
EfdEnabledSettingsResponseType SettingsResponseType = []string{"early_flake_detection_enabled:true"}
FlakyTestRetriesEnabledSettingsResponseType SettingsResponseType = []string{"flaky_test_retries_enabled:true"}
)

// removeEmptyStrings removes empty string values inside an array or use the same if not empty string is found.
Expand Down
Loading