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

Fixes Splunk Aggregation Data #1615

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Fixes Splunk Aggregation Data #1615

merged 3 commits into from
Feb 4, 2025

Conversation

kalverra
Copy link
Collaborator

@kalverra kalverra commented Feb 4, 2025


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve the FlakeGuard tool by introducing additional parameters to the aggregate-results command for enhanced reporting and integration capabilities. These parameters include GitHub workflow details and Splunk integration options, enabling better tracking and analysis of test results. They ensure that aggregated test reports contain valuable metadata for identifying the source of test runs, and facilitate the integration with external systems like Splunk for logging and monitoring.

What

  • tools/flakeguard/Makefile

    • Added parameters --github-workflow-run-url, --splunk-url, --splunk-token, --splunk-event to the aggregate-results command for example, example_flaky_panic, and example_timeout targets. This enhances the detail in reports generated by FlakeGuard by including GitHub Actions workflow information and Splunk integration details.
  • tools/flakeguard/cmd/aggregate_results.go

    • Removed manual assignment of metadata such as HeadSHA, BaseSHA, RepoURL, GitHubWorkflowName, and GitHubWorkflowRunURL to aggregatedReport inside the aggregate-results command execution. Instead, these are now set through the reports.With... functional options, streamlining the process of adding metadata to aggregated reports.
  • tools/flakeguard/reports/data.go

    • Changed the SplunkEvent type from a custom string type to a generic string for flexibility in specifying event types when sending data to Splunk.
  • tools/flakeguard/reports/io.go

    • Introduced new functional options WithBaseSha, WithHeadSha, WithRepoURL, WithGitHubWorkflowName, and WithGitHubWorkflowRunURL to the LoadAndAggregate function. These options allow setting corresponding metadata in the aggregated report, improving the configurability and usefulness of the reports.
    • Modified the WithSplunk option and the splunk-related data structures to use a simple string instead of the SplunkEvent type. This aligns with the changes in data.go to simplify Splunk integration.
    • Added checks for example Splunk URLs to prevent actual data transmission during example runs, enhancing the tool's usability in development or testing environments without sending data to a real Splunk instance.
    • Updated the aggregate function to directly include the new metadata options (baseSha, headSha, repoURL, gitHubWorkflowName, gitHubWorkflowRunURL) in the fullReport initialization, streamlining the aggregation process.
  • tools/flakeguard/reports/io_test.go

    • Adjusted test constants to reflect changes in the splunkEvent type, ensuring that the test suite remains consistent with the application code changes.

@cl-sonarqube-production
Copy link

@kalverra kalverra merged commit 5a24bd8 into main Feb 4, 2025
58 of 62 checks passed
@kalverra kalverra deleted the flakeguardAggregations branch February 4, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants