Skip to content

Add native Splunk HEC log destination - #48455

Merged
sharon-fdm merged 15 commits into
mainfrom
worktree-splunk-log-destination
Jul 3, 2026
Merged

Add native Splunk HEC log destination#48455
sharon-fdm merged 15 commits into
mainfrom
worktree-splunk-log-destination

Conversation

@sharon-fdm

@sharon-fdm sharon-fdm commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Related issue: Resolves #25574

Checklist for submitter

  • Changes file added for user-visible changes in changes/
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.
  • Timeouts are implemented and retries are limited to avoid infinite loops

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Summary

  • Adds a new splunk log plugin that sends osquery logs directly to Splunk's HTTP Event Collector (HEC) endpoint
  • Eliminates the need for middleware like AWS Firehose when using Splunk as a log destination
  • Follows the same pattern as existing log destinations (Firehose, Kafka REST, NATS, etc.)
  • Includes insecure_skip_verify option for environments with self-signed TLS certs

UI changes

Follows the same pattern as the NATS log destination PR (#36527) -- adding "Splunk" to the display name, tooltip, and TypeScript type union. No new components, pages, or styles.

Manage automations modal -- "Log destination: Splunk"

image

Query details page -- "Log destination: Splunk"

image

Tooltip on hover

image

Edit query form -- "sent to your log destination: Splunk"

image

Save new query modal -- "sent to your log destination: Splunk"

image

How it works

The Splunk writer (server/logging/splunk.go) implements the fleet.JSONLogger interface. On startup it performs a health check against the HEC /services/collector/health endpoint. On each Write() call, it wraps each log entry in Splunk's HEC event format (adding time, index, source, sourcetype), batches them up to 1 MB, and POSTs to /services/collector/event with the Authorization: Splunk <token> header. If a batch exceeds 1 MB it flushes and starts a new one. Events over 1 MB are dropped with a log warning. Transient errors (HTTP 503) are retried with exponential backoff (up to 8 retries).

Configuration

osquery:
  status_log_plugin: splunk
  result_log_plugin: splunk

splunk:
  url: https://splunk.example.com:8088
  token: <HEC token>
  index: main
  source: fleet
  source_type: fleet:json
  insecure_skip_verify: false  # set true for self-signed certs

Or via environment variables:

FLEET_OSQUERY_STATUS_LOG_PLUGIN=splunk
FLEET_OSQUERY_RESULT_LOG_PLUGIN=splunk
FLEET_SPLUNK_URL=https://splunk.example.com:8088
FLEET_SPLUNK_TOKEN=<HEC token>
FLEET_SPLUNK_INDEX=main
FLEET_SPLUNK_SOURCE=fleet
FLEET_SPLUNK_SOURCE_TYPE=fleet:json

Files changed

  • server/logging/splunk.go -- Splunk HEC log writer with batching, retry, and health check
  • server/logging/splunk_test.go -- 9 unit tests
  • server/logging/splunk_integration_test.go -- 3 integration tests against real Splunk (gated by env var)
  • server/logging/logging.go -- Added SplunkConfig and case "splunk" to factory
  • server/config/config.go -- Added SplunkConfig struct and config flags
  • cmd/fleet/logging.go -- Wired Splunk config into logging builder
  • server/fleet/app.go -- Added SplunkConfig type for API responses (excludes token)
  • server/service/service_appconfig.go -- Added case "splunk" to logging plugin validation
  • frontend/interfaces/config.ts -- Added "splunk" to LogDestination type
  • frontend/components/LogDestinationIndicator/LogDestinationIndicator.tsx -- Added Splunk display name and tooltip
  • docs/Configuration/fleet-server-configuration.md -- Splunk config documentation
  • docs/Get started/FAQ.md -- Updated plugin list
  • articles/log-destinations.md -- Updated Splunk section with native HEC docs
  • changes/25574-splunk-log-destination -- Change file

Test plan

Unit tests (9 tests)

  • TestSplunkWrite -- sends 3 events, verifies HEC format, auth header, index/source/sourcetype
  • TestSplunkWriteEmpty -- empty logs don't trigger HTTP request
  • TestSplunkServerError -- HEC 403 propagates as error
  • TestSplunkHealthCheckFailure -- constructor fails on bad health
  • TestSplunkRecordTooBig -- oversized events (>1MB) are dropped, normal events still sent
  • TestSplunkSplitBatchBySize -- logs exceeding 1MB batch limit are split into multiple requests
  • TestSplunkRetryOnServiceUnavailable -- 503 retried with backoff, succeeds on 3rd attempt
  • TestSplunkRetryExhausted -- after 9 attempts (1 + 8 retries) returns error
  • TestSplunkMissingConfig -- empty URL/token returns descriptive error

Integration tests (3 tests, gated by SPLUNK_INTEGRATION_TEST=1)

  • TestSplunkIntegration -- 3 events sent via writer, queried back from Splunk REST API
  • TestSplunkIntegrationBatch -- 100 events in one Write(), all confirmed indexed
  • TestSplunkIntegrationBadToken -- bad token Write() returns 403

End-to-end test (macOS ARM64, real osquery agent)

  1. Started Splunk Enterprise, MySQL, Redis via Docker
  2. Built Fleet server from this branch with --osquery_status_log_plugin=splunk
  3. Set up Fleet, enrolled a real osquery 5.23.0 agent on this MacBook
  4. 83 real osquery status log events indexed in Splunk with correct source/sourcetype/index
  5. Each event contained full osquery data (hostIdentifier, host_uuid, calendarTime, severity, message, decorations)

Splunk showing real osquery events from Fleet

image

Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added native Splunk HEC logging destination for status, result, and audit logs.
    • Updated the log destination UI to display Splunk with a dedicated tooltip.
    • Added Splunk HEC configuration (URL/token/index/source/source type) including TLS verification control.
  • Bug Fixes
    • Improved log delivery with batching, retries for temporary HTTP failures, and safeguards for oversized events.
  • Tests
    • Added unit tests and optional integration tests covering routing, batching, retries, and error scenarios.

Add a new "splunk" log plugin that sends osquery status, result, and
audit logs directly to Splunk via the HTTP Event Collector (HEC) API,
removing the need for intermediate services like AWS Firehose.

Closes #25574

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.42857% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.00%. Comparing base (9805fb6) to head (6592b4a).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
server/logging/splunk.go 75.00% 15 Missing and 7 partials ⚠️
server/logging/logging.go 29.41% 12 Missing ⚠️
server/service/service_appconfig.go 0.00% 9 Missing ⚠️
...ogDestinationIndicator/LogDestinationIndicator.tsx 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #48455      +/-   ##
==========================================
+ Coverage   67.90%   68.00%   +0.09%     
==========================================
  Files        3678     3679       +1     
  Lines      233673   233808     +135     
  Branches    12415    12414       -1     
==========================================
+ Hits       158686   159001     +315     
+ Misses      60724    60504     -220     
- Partials    14263    14303      +40     
Flag Coverage Δ
backend 69.65% <68.38%> (+0.11%) ⬆️
frontend 58.95% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…lunk

- Added splunk.insecure_skip_verify config for self-signed certs
- Added integration tests that run against a real Splunk Docker container
  (gated behind SPLUNK_INTEGRATION_TEST=1 env var)
- Tests verify: event delivery, batch sending (100 events), bad token rejection
- All events were confirmed searchable in the Splunk index

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The app config endpoint validates log plugin names. Without this,
the Fleet API returned a 500 "unrecognized logging plugin: splunk"
when any API client fetched the config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use assert instead of require inside http.HandlerFunc (testifylint)
- Replace interface{} with any (modernize)
- Use fleethttp.NewClient instead of http.Client{} (gocritic ruleguard)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Drop events exceeding 1MB with a warning log (matches Firehose behavior)
- Retry on HTTP 503 with exponential backoff, up to 8 retries
- Add 4 new tests: RecordTooBig, SplitBatchBySize, RetryOnServiceUnavailable,
  RetryExhausted
- Add Splunk to LogDestination type and LogDestinationIndicator component
- Add Splunk config docs in fleet-server-configuration.md
- Add splunk to plugin lists in FAQ and config docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Splunk section previously only documented the Firehose workaround.
Now documents the native HEC integration as the primary method and
keeps the Firehose route as an alternative under a subsection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sharon-fdm
sharon-fdm marked this pull request as ready for review June 30, 2026 20:24
@sharon-fdm
sharon-fdm requested review from a team and rachaelshaw as code owners June 30, 2026 20:24
Copilot AI review requested due to automatic review settings June 30, 2026 20:25
@sharon-fdm
sharon-fdm requested a review from a team as a code owner June 30, 2026 20:25

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

This PR adds a new native Splunk HTTP Event Collector (HEC) log destination so Fleet can send osquery logs directly to Splunk without intermediary services, and wires the new destination through server config, API response types, and the UI log-destination indicator.

Changes:

  • Implement a new Splunk HEC JSON log writer with startup health check, batching, and retry logic (server/logging/splunk.go) plus unit/integration tests.
  • Wire Splunk config through Fleet server configuration + logging factory and expose a token-less subset via the appconfig API.
  • Add "splunk" to the frontend log destination type union and display/tooltip mapping.

Reviewed changes

Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/logging/splunk.go New Splunk HEC writer (health check, batching, retries).
server/logging/splunk_test.go Unit tests for Splunk writer behavior.
server/logging/splunk_integration_test.go Optional integration tests against a real Splunk instance.
server/logging/logging.go Add Splunk config and splunk plugin case in JSON logger factory.
server/config/config.go Add Splunk config struct + config flags/env mapping.
cmd/fleet/logging.go Wire loaded Splunk config into the logging config builder.
server/fleet/app.go Add API-facing SplunkConfig that excludes the token.
server/service/service_appconfig.go Include splunk plugin config in appconfig response (token excluded).
frontend/interfaces/config.ts Add "splunk" to LogDestination union.
frontend/components/LogDestinationIndicator/LogDestinationIndicator.tsx Add Splunk display name and tooltip text.
docs/Configuration/fleet-server-configuration.md Documentation update (contents excluded by policy).
docs/Get started/FAQ.md Documentation update (contents excluded by policy).
articles/log-destinations.md Documentation update (contents excluded by policy).
changes/25574-splunk-log-destination Change entry (contents excluded by policy).
Files excluded by content exclusion policy (4)
  • articles/log-destinations.md
  • changes/25574-splunk-log-destination
  • docs/Configuration/fleet-server-configuration.md
  • docs/Get started/FAQ.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/logging/splunk.go Outdated
Comment on lines +158 to +160
if resp.StatusCode == http.StatusServiceUnavailable && try < splunkMaxRetries {
return w.sendWithRetry(ctx, payload, try+1)
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 3ee256a -- body is now drained and closed before retrying.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 82c10ac2-89d0-48f6-8a8a-75705535910e

📥 Commits

Reviewing files that changed from the base of the PR and between 85d1ca2 and 6592b4a.

📒 Files selected for processing (4)
  • server/logging/logging.go
  • server/logging/splunk.go
  • server/logging/splunk_integration_test.go
  • server/logging/splunk_test.go
💤 Files with no reviewable changes (1)
  • server/logging/splunk_integration_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • server/logging/logging.go
  • server/logging/splunk.go

Walkthrough

This PR adds a native Splunk HTTP Event Collector log destination for osquery status, result, and audit logs. It adds Splunk configuration types and config-key wiring in server config, routes the values into logging setup, implements a Splunk log writer with batching, retries, and health checks, and updates the logging plugin switch and service mapping to use it. The frontend accepts and displays the new splunk destination, and unit plus integration tests cover the writer behavior.

Possibly related issues

Possibly related PRs

  • fleetdm/fleet#46893 — Both PRs touch cmd/fleet/logging.go’s buildLoggingConfig and the shared logging config construction path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a native Splunk HEC log destination.
Description check ✅ Passed The PR description largely matches the template, with related issue, checklist, testing, summary, UI changes, and implementation details filled in.
Linked Issues check ✅ Passed The changes implement direct osquery log delivery to Splunk HEC, matching the linked issue's goal to remove Firehose and other middleware.
Out of Scope Changes check ✅ Passed The modified files stay focused on Splunk logging, configuration, validation, UI labels, and tests, with no obvious unrelated additions.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-splunk-log-destination

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
server/config/config.go (1)

687-696: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoff

Splunk config has no per-log-type routing, unlike every other multi-destination plugin.

SplunkConfig exposes a single shared Index/Source/SourceType, whereas Firehose, Kinesis, Lambda, PubSub, KafkaREST, and Nats all define distinct Status*/Result*/Audit* fields that cmd/fleet/logging.go overrides per log type. As written, status, result, and audit logs sent to Splunk will all land with identical source/sourcetype/index, with no way to distinguish them at the destination — a capability every other supported backend provides.

If this is intentional (e.g., relying on event content alone to differentiate log types), consider noting it in the docs; otherwise, add per-log-type source/sourcetype fields to match the established pattern.

Also applies to: 809-809, 1697-1704, 2078-2085

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@server/config/config.go` around lines 687 - 696, SplunkConfig currently only
exposes shared Index/Source/SourceType fields, so Splunk logs cannot be routed
differently by log type like the other multi-destination plugins. Update
SplunkConfig and the Splunk setup path in cmd/fleet/logging.go to add and use
distinct Status*/Result*/Audit* source/sourcetype/index fields, matching the
pattern used by Firehose, Kinesis, Lambda, PubSub, KafkaREST, and Nats. Make
sure the per-log-type overrides are wired through the existing logging
configuration flow so status, result, and audit events can be distinguished at
the destination.
server/logging/splunk_integration_test.go (1)

58-63: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Poll for indexed events instead of sleeping a fixed 5s.

Splunk indexing latency is variable, so these sleeps will make the env-gated integration tests flaky on slower runners. Poll searchSplunk until the expected count arrives or a deadline expires.

Suggested change
-	time.Sleep(5 * time.Second)
-
-	events := searchSplunk(t, marker)
+	events := waitForSplunkEvents(t, marker, 3)
 	require.Len(t, events, 3, "should find all 3 test events in Splunk")
func waitForSplunkEvents(t *testing.T, marker string, want int) []string {
	t.Helper()

	deadline := time.Now().Add(30 * time.Second)
	for {
		events := searchSplunk(t, marker)
		if len(events) == want || time.Now().After(deadline) {
			return events
		}
		time.Sleep(500 * time.Millisecond)
	}
}

Also applies to: 97-100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@server/logging/splunk_integration_test.go` around lines 58 - 63, Replace the
fixed sleep in the Splunk integration test with polling so the test waits for
indexed events up to a deadline instead of assuming 5s is enough. Add or reuse a
helper like waitForSplunkEvents near searchSplunk that repeatedly calls
searchSplunk until the expected count is reached or timeout expires, then use it
in the test cases that currently sleep before asserting the event count.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@server/logging/logging.go`:
- Around line 233-246: The Splunk logger setup is failing fast because
initOsqueryLogging treats NewSplunkLogWriter errors as fatal during
construction. Update the splunk case to avoid making the live checkHealth inside
NewSplunkLogWriter a startup blocker, either by deferring the health check until
the first write or by converting that check to a warning-only path so fleet can
boot when Splunk HEC is temporarily unavailable. Keep the change localized to
NewSplunkLogWriter and the splunk branch in initOsqueryLogging.

In `@server/logging/splunk.go`:
- Around line 111-113: The splunk drop log in the logger path currently includes
a raw `event_prefix`, which can leak customer payload data into Fleet logs when
oversized events are rejected. Update the `w.logger.InfoContext` call in the
Splunk logging flow to remove the payload snippet and keep only safe metadata
such as the size and other non-content fields, preserving the existing
oversize-drop behavior without echoing event contents.
- Around line 141-159: The retry backoff in sendWithRetry uses time.Sleep, which
ignores ctx cancellation and makes retry tests wait the full exponential delay.
Replace the direct sleep in sendWithRetry with a context-aware wait using the
existing ctx, and move the delay calculation behind a small helper on the splunk
writer (or package-level function) that tests can override/stub. Keep the retry
flow and the try-based backoff behavior intact while ensuring canceled contexts
return immediately.

---

Nitpick comments:
In `@server/config/config.go`:
- Around line 687-696: SplunkConfig currently only exposes shared
Index/Source/SourceType fields, so Splunk logs cannot be routed differently by
log type like the other multi-destination plugins. Update SplunkConfig and the
Splunk setup path in cmd/fleet/logging.go to add and use distinct
Status*/Result*/Audit* source/sourcetype/index fields, matching the pattern used
by Firehose, Kinesis, Lambda, PubSub, KafkaREST, and Nats. Make sure the
per-log-type overrides are wired through the existing logging configuration flow
so status, result, and audit events can be distinguished at the destination.

In `@server/logging/splunk_integration_test.go`:
- Around line 58-63: Replace the fixed sleep in the Splunk integration test with
polling so the test waits for indexed events up to a deadline instead of
assuming 5s is enough. Add or reuse a helper like waitForSplunkEvents near
searchSplunk that repeatedly calls searchSplunk until the expected count is
reached or timeout expires, then use it in the test cases that currently sleep
before asserting the event count.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3f33d1b3-f438-4f8a-ae67-26cf08fa0781

📥 Commits

Reviewing files that changed from the base of the PR and between 0656141 and f71ba62.

⛔ Files ignored due to path filters (3)
  • articles/log-destinations.md is excluded by !**/*.md
  • docs/Configuration/fleet-server-configuration.md is excluded by !**/*.md
  • docs/Get started/FAQ.md is excluded by !**/*.md
📒 Files selected for processing (11)
  • changes/25574-splunk-log-destination
  • cmd/fleet/logging.go
  • frontend/components/LogDestinationIndicator/LogDestinationIndicator.tsx
  • frontend/interfaces/config.ts
  • server/config/config.go
  • server/fleet/app.go
  • server/logging/logging.go
  • server/logging/splunk.go
  • server/logging/splunk_integration_test.go
  • server/logging/splunk_test.go
  • server/service/service_appconfig.go

Comment thread server/logging/logging.go
Comment thread server/logging/splunk.go Outdated
Comment thread server/logging/splunk.go
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ackoff

- Remove event_prefix from oversized record log (security: avoid leaking payload data)
- Replace time.Sleep with timer/select that respects context cancellation
- Extract retry delay to stubable var (retry tests: 51s -> 0.01s)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@nulmete nulmete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall LGTM, please see my comments below

Comment thread server/logging/splunk.go Outdated
Comment thread server/logging/splunk.go
Comment on lines +20 to +33
// TestSplunkIntegration tests the Splunk HEC writer against a real Splunk instance.
//
// Prerequisites:
//
// docker run -d --name splunk-test --platform linux/amd64 \
// -p 8000:8000 -p 8088:8088 -p 8089:8089 \
// -e SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com \
// -e SPLUNK_START_ARGS=--accept-license \
// -e SPLUNK_PASSWORD=changeme123 \
// -e SPLUNK_HEC_TOKEN=test-hec-token-1234 \
// splunk/splunk:latest
//
// Run with: SPLUNK_INTEGRATION_TEST=1 go test ./server/logging/ -run TestSplunkIntegration -v
func TestSplunkIntegration(t *testing.T) {

@nulmete nulmete Jul 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This means we're not running this test in CI, right? If that's the case, then I'd look into mocking the Splunk server so that we get some value out of this set of tests. (Otherwise, we'd have to manually run this locally before merging a PR to detect regressions.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The unit tests (TestSplunkWrite, etc.) already use httptest servers and run in CI. These integration tests exist for manual validation against real Splunk. Same pattern as Firehose/Kinesis which also have no CI integration tests. Happy to remove the integration test file if you prefer keeping only the unit tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the unit tests should be enough, and since we're not running these integration tests in CI I don't see a reason to keep them. My personal preference is to delete them.

Comment thread server/logging/splunk_integration_test.go
Comment thread server/logging/splunk_integration_test.go Outdated
Comment thread server/logging/splunk.go
Comment thread server/logging/splunk.go
Comment thread server/logging/splunk.go Outdated
… retry tests

- Move URL/token validation from NewSplunkLogWriter to the factory in logging.go
- Truncate error response bodies to 512 bytes
- Add TestSplunkRetryBodyIntegrity: verifies payload is identical on every retry
- Add TestSplunkRetryNoNestedRetries: verifies exactly maxRetries+1 calls (no OOM)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: test-go (fleetctl, mysql:8.0.44) / test

Failed stage: Run Go Tests [❌]

Failed test name: TestGitOpsFullGlobal

Failure summary:

The workflow failed because Go tests in ./cmd/fleetctl/... did not pass (3 failures total), causing
make .run-go-tests to exit non-zero (Makefile:302, then make test-go at Makefile:417).
- The
specific failing test is TestGitOpsFullGlobal (both subtests useDeprecatedKeys=false and
useDeprecatedKeys=true) in cmd/fleetctl/fleetctl/gitops_test.go:2244 (error surfaced via
cmd/fleetctl/fleetctl/testing_utils_test.go:20).
- Failure reason: the test expected GitOps to apply
custom settings successfully, but the API returned HTTP 422 from POST
/api/latest/fleet/mdm/profiles/batch with: cannot set custom settings: Windows MDM isn't turned on,
so applying custom settings failed.

Relevant error logs:
1:  Runner name: 'ubuntu-8core-1000964526'
2:  Runner group name: 'default larger runners'
...

1281:  �[36;1mattempt=1�[0m
1282:  �[36;1m�[0m
1283:  �[36;1mwhile [ $attempt -le $max_attempts ]; do�[0m
1284:  �[36;1m  echo "Attempt $attempt of $max_attempts"�[0m
1285:  �[36;1m�[0m
1286:  �[36;1m  # Try to connect to MySQL�[0m
1287:  �[36;1m  if wait_for_mysql "mysql_test"; then�[0m
1288:  �[36;1m    # If MySQL is ready, try to connect to MySQL replica�[0m
1289:  �[36;1m    if wait_for_mysql "mysql_replica_test"; then�[0m
1290:  �[36;1m      # Both are ready, we're done�[0m
1291:  �[36;1m      echo "All MySQL connections successful"�[0m
1292:  �[36;1m      exit 0�[0m
1293:  �[36;1m    fi�[0m
1294:  �[36;1m  fi�[0m
1295:  �[36;1m�[0m
1296:  �[36;1m  # If we get here, at least one connection failed�[0m
1297:  �[36;1m  echo "Failed to connect to MySQL on attempt $attempt"�[0m
1298:  �[36;1m�[0m
1299:  �[36;1m  if [ $attempt -lt $max_attempts ]; then�[0m
1300:  �[36;1m    echo "Restarting containers and trying again..."�[0m
1301:  �[36;1m    restart_containers�[0m
1302:  �[36;1m  else�[0m
1303:  �[36;1m    echo "Maximum attempts reached. Failing the job."�[0m
1304:  �[36;1m    exit 1�[0m
...

1453:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
1454:  GOTOOLCHAIN: local
1455:  FLEET_PREVIEW_TAG: dev
1456:  ##[endgroup]
1457:  make .run-go-tests PKG_TO_TEST="./cmd/fleetctl/..."
1458:  make[1]: Entering directory '/home/runner/work/fleet/fleet'
1459:  Running Go tests with gotestsum:
1460:  gotestsum --format=testdox --jsonfile=/tmp/test-output.json -- -tags full,fts5,netgo -run=  -v -race=false -timeout=20m  -parallel 8 -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/fleetdm/fleet/v4/... ././cmd/fleetctl/... 
1461:  github.com/fleetdm/fleet/v4/cmd/fleetctl:
1462:  github.com/fleetdm/fleet/v4/cmd/fleetctl/fleetctl/fleetctltest:
1463:  github.com/fleetdm/fleet/v4/cmd/fleetctl/fleetctl/testing_utils:
1464:  github.com/fleetdm/fleet/v4/cmd/fleetctl/integrationtest:
1465:  github.com/fleetdm/fleet/v4/cmd/fleetctl/fleetctl/goquerycmd:
1466:  github.com/fleetdm/fleet/v4/cmd/fleetctl/integrationtest/preview:
1467:  �[32m✓�[0m Integrations preview (48.64s)
1468:  �[32m✓�[0m Preview fails on invalid license key (0.00s)
1469:  github.com/fleetdm/fleet/v4/cmd/fleetctl/integrationtest/package:
...

1580:  �[32m✓�[0m Apply specs deprecated keys app config windows updates.grace period days not a number (0.49s)
1581:  �[32m✓�[0m Apply specs deprecated keys app config windows updates.grace period days out of range (0.49s)
1582:  �[32m✓�[0m Apply specs deprecated keys config with FIM values for agent options (#869 9) (0.43s)
1583:  �[32m✓�[0m Apply specs deprecated keys config with blank required org name (0.42s)
1584:  �[32m✓�[0m Apply specs deprecated keys config with blank required server url (0.37s)
1585:  �[32m✓�[0m Apply specs deprecated keys config with invalid agent options command-line flags (0.52s)
1586:  �[32m✓�[0m Apply specs deprecated keys config with invalid agent options data type in dry-run (0.50s)
1587:  �[32m✓�[0m Apply specs deprecated keys config with invalid agent options data type with force (0.44s)
1588:  �[32m✓�[0m Apply specs deprecated keys config with invalid agent options in dry-run (0.37s)
1589:  �[32m✓�[0m Apply specs deprecated keys config with invalid key type (0.55s)
1590:  �[32m✓�[0m Apply specs deprecated keys config with invalid value for agent options command-line flags (0.39s)
1591:  �[32m✓�[0m Apply specs deprecated keys config with unknown key (0.48s)
1592:  �[32m✓�[0m Apply specs deprecated keys config with valid agent options command-line flags (0.43s)
1593:  �[32m✓�[0m Apply specs deprecated keys dry-run set with unsupported spec (0.40s)
1594:  �[32m✓�[0m Apply specs deprecated keys dry-run set with various specs, appconfig warning for legacy (0.73s)
1595:  �[32m✓�[0m Apply specs deprecated keys dry-run set with various specs, no errors (0.53s)
1596:  �[32m✓�[0m Apply specs deprecated keys empty config (0.39s)
...

1599:  �[32m✓�[0m Apply specs deprecated keys invalid agent options dry-run (0.39s)
1600:  �[32m✓�[0m Apply specs deprecated keys invalid agent options field type (0.48s)
1601:  �[32m✓�[0m Apply specs deprecated keys invalid agent options field type in overrides (0.51s)
1602:  �[32m✓�[0m Apply specs deprecated keys invalid agent options for existing team (0.43s)
1603:  �[32m✓�[0m Apply specs deprecated keys invalid agent options for new team (0.55s)
1604:  �[32m✓�[0m Apply specs deprecated keys invalid agent options force (0.50s)
1605:  �[32m✓�[0m Apply specs deprecated keys invalid known key's value type for team cannot be forced (0.59s)
1606:  �[32m✓�[0m Apply specs deprecated keys invalid team agent options command-line flag (0.40s)
1607:  �[32m✓�[0m Apply specs deprecated keys invalid top-level key for team (0.56s)
1608:  �[32m✓�[0m Apply specs deprecated keys macos updates deadline set but minimum version empty (0.46s)
1609:  �[32m✓�[0m Apply specs deprecated keys macos updates minimum version set but deadline empty (0.41s)
1610:  �[32m✓�[0m Apply specs deprecated keys macos updates.deadline with incomplete date (0.42s)
1611:  �[32m✓�[0m Apply specs deprecated keys macos updates.deadline with invalid date (0.44s)
1612:  �[32m✓�[0m Apply specs deprecated keys macos updates.deadline with timestamp (0.52s)
1613:  �[32m✓�[0m Apply specs deprecated keys macos updates.minimum version with build version (0.38s)
1614:  �[32m✓�[0m Apply specs deprecated keys missing required failing policies destination url (0.49s)
1615:  �[32m✓�[0m Apply specs deprecated keys missing required host status days count (0.40s)
...

1623:  �[32m✓�[0m Apply specs deprecated keys team config macos settings.enable disk encryption true (0.45s)
1624:  �[32m✓�[0m Apply specs deprecated keys team config macos settings.enable disk encryption with invalid value type (0.45s)
1625:  �[32m✓�[0m Apply specs deprecated keys team config macos settings.enable disk encryption without a value (0.66s)
1626:  �[32m✓�[0m Apply specs deprecated keys unknown key for team can be forced (0.52s)
1627:  �[32m✓�[0m Apply specs deprecated keys valid team agent options command-line flag (0.37s)
1628:  �[32m✓�[0m Apply specs deprecated keys windows updates unset valid (0.43s)
1629:  �[32m✓�[0m Apply specs deprecated keys windows updates valid (0.57s)
1630:  �[32m✓�[0m Apply specs deprecated keys windows updates.deadline days but grace period empty (0.55s)
1631:  �[32m✓�[0m Apply specs deprecated keys windows updates.deadline days not a number (0.37s)
1632:  �[32m✓�[0m Apply specs deprecated keys windows updates.deadline days out of range (0.41s)
1633:  �[32m✓�[0m Apply specs deprecated keys windows updates.grace period days but deadline empty (0.44s)
1634:  �[32m✓�[0m Apply specs deprecated keys windows updates.grace period days not a number (0.51s)
1635:  �[32m✓�[0m Apply specs deprecated keys windows updates.grace period days out of range (0.54s)
1636:  �[32m✓�[0m Apply specs dry-run set with unsupported spec (0.43s)
1637:  �[32m✓�[0m Apply specs dry-run set with various specs, appconfig warning for legacy (0.37s)
1638:  �[32m✓�[0m Apply specs dry-run set with various specs, no errors (0.46s)
1639:  �[32m✓�[0m Apply specs empty config (0.43s)
...

1642:  �[32m✓�[0m Apply specs invalid agent options dry-run (0.61s)
1643:  �[32m✓�[0m Apply specs invalid agent options field type (0.44s)
1644:  �[32m✓�[0m Apply specs invalid agent options field type in overrides (0.46s)
1645:  �[32m✓�[0m Apply specs invalid agent options for existing team (0.58s)
1646:  �[32m✓�[0m Apply specs invalid agent options for new team (0.45s)
1647:  �[32m✓�[0m Apply specs invalid agent options force (0.45s)
1648:  �[32m✓�[0m Apply specs invalid known key's value type for team cannot be forced (0.38s)
1649:  �[32m✓�[0m Apply specs invalid team agent options command-line flag (0.39s)
1650:  �[32m✓�[0m Apply specs invalid top-level key for team (0.57s)
1651:  �[32m✓�[0m Apply specs macos updates deadline set but minimum version empty (0.52s)
1652:  �[32m✓�[0m Apply specs macos updates minimum version set but deadline empty (0.36s)
1653:  �[32m✓�[0m Apply specs macos updates.deadline with incomplete date (0.51s)
1654:  �[32m✓�[0m Apply specs macos updates.deadline with invalid date (0.45s)
1655:  �[32m✓�[0m Apply specs macos updates.deadline with timestamp (0.47s)
1656:  �[32m✓�[0m Apply specs macos updates.minimum version with build version (0.37s)
1657:  �[32m✓�[0m Apply specs missing required failing policies destination url (0.37s)
1658:  �[32m✓�[0m Apply specs missing required host status days count (0.34s)
...

1677:  �[32m✓�[0m Apply specs windows updates.grace period days not a number (0.38s)
1678:  �[32m✓�[0m Apply specs windows updates.grace period days out of range (0.52s)
1679:  �[32m✓�[0m Apply team specs (0.66s)
1680:  �[32m✓�[0m Apply user roles (0.50s)
1681:  �[32m✓�[0m Apply user roles deprecated (0.56s)
1682:  �[32m✓�[0m Apply windows updates (0.47s)
1683:  �[32m✓�[0m Apply windows updates field omitted (0.00s)
1684:  �[32m✓�[0m Apply windows updates with null values (0.00s)
1685:  �[32m✓�[0m Apply windows updates with values (0.00s)
1686:  �[32m✓�[0m Can apply intervals in nanoseconds (0.31s)
1687:  �[32m✓�[0m Can apply intervals using durations (0.43s)
1688:  �[32m✓�[0m Clean status code err (0.00s)
1689:  �[32m✓�[0m Clean status code err bare wrapped status code err (0.00s)
1690:  �[32m✓�[0m Clean status code err nil (0.00s)
1691:  �[32m✓�[0m Clean status code err outer-wrapped status code err (0.00s)
1692:  �[32m✓�[0m Clean status code err plain error untouched (0.00s)
1693:  �[32m✓�[0m Compute label changes (0.00s)
...

1749:  �[32m✓�[0m Filename functions (0.00s)
1750:  �[32m✓�[0m Filename functions outfile name builds a file name using the name provided + current time (0.00s)
1751:  �[32m✓�[0m Filename functions outfile name with ext builds a file name using the name and extension provided + current time (0.00s)
1752:  �[32m✓�[0m FleetctlUpgradePacks empty packs (0.46s)
1753:  �[32m✓�[0m FleetctlUpgradePacks no pack (0.35s)
1754:  �[32m✓�[0m FleetctlUpgradePacks non empty (0.40s)
1755:  �[32m✓�[0m FleetctlUpgradePacks not admin (0.45s)
1756:  �[32m✓�[0m Format XML (0.00s)
1757:  �[32m✓�[0m Format XML XML with attributes (0.00s)
1758:  �[32m✓�[0m Format XML basic XML (0.00s)
1759:  �[32m✓�[0m Format XML empty XML (0.00s)
1760:  �[32m✓�[0m Format XML invalid XML (0.00s)
1761:  �[32m✓�[0m Format XML nested XML (0.00s)
1762:  �[32m✓�[0m Generate MDM apple (1.02s)
1763:  �[32m✓�[0m Generate MDM apple BM (0.44s)
1764:  �[32m✓�[0m Generate MDM apple CSR API call fails (0.49s)
1765:  �[32m✓�[0m Generate MDM apple successful run (0.52s)
1766:  �[32m✓�[0m Generate MDMVPP tokens (0.00s)
1767:  �[32m✓�[0m Generate MDMVPP tokens get VPP tokens error (0.00s)
1768:  �[32m✓�[0m Generate MDMVPP tokens multiple tokens with different teams (0.00s)
...

1786:  �[32m✓�[0m Generate org settings masked google workspace api key (0.00s)
1787:  �[32m✓�[0m Generate policies (0.00s)
1788:  �[32m✓�[0m Generate policies patch policy orphaned from fleet maintained app (0.00s)
1789:  �[32m✓�[0m Generate queries (0.00s)
1790:  �[32m✓�[0m Generate software (0.00s)
1791:  �[32m✓�[0m Generate software auto update schedule (0.00s)
1792:  �[32m✓�[0m Generate software script packages (0.00s)
1793:  �[32m✓�[0m Generate team settings (0.00s)
1794:  �[32m✓�[0m Generate team settings insecure (0.00s)
1795:  �[32m✓�[0m Generated org settings no SSO (0.00s)
1796:  �[32m✓�[0m Generated org settings okta conditional access not included (0.00s)
1797:  �[32m✓�[0m Get MDM command results (0.39s)
1798:  �[32m✓�[0m Get MDM command results command flag required (0.00s)
1799:  �[32m✓�[0m Get MDM command results command not found (0.01s)
1800:  �[32m✓�[0m Get MDM command results command results empty (0.01s)
1801:  �[32m✓�[0m Get MDM command results command results error (0.01s)
1802:  �[32m✓�[0m Get MDM command results darwin command results (0.00s)
1803:  �[32m✓�[0m Get MDM command results host specific results (0.00s)
1804:  �[32m✓�[0m Get MDM command results windows command results (0.00s)
1805:  �[32m✓�[0m Get MDM commands (0.41s)
1806:  �[32m✓�[0m Get apple BM (1.82s)
1807:  �[32m✓�[0m Get apple BM free license (0.39s)
1808:  �[32m✓�[0m Get apple BM premium license, multiple tokens (0.48s)
1809:  �[32m✓�[0m Get apple BM premium license, no token (0.49s)
1810:  �[32m✓�[0m Get apple BM premium license, single token (0.46s)
1811:  �[32m✓�[0m Get apple MDM (0.39s)
1812:  �[32m✓�[0m Get carve (0.40s)
1813:  �[32m✓�[0m Get carve with error (0.39s)
1814:  �[32m✓�[0m Get carves (0.34s)
...

1828:  �[32m✓�[0m Get hosts MDM get hosts - -mdm - -mdm-pending - (0.00s)
1829:  �[32m✓�[0m Get hosts MDM get hosts - -mdm-pending - -yaml - expected list hosts yaml.yml (0.01s)
1830:  �[32m✓�[0m Get hosts get hosts - -json - -remove-deprecated-keys (0.00s)
1831:  �[32m✓�[0m Get hosts get hosts - -json - expected list hosts json.json (0.00s)
1832:  �[32m✓�[0m Get hosts get hosts - -json test host - expected host detail response json.json (0.00s)
1833:  �[32m✓�[0m Get hosts get hosts - -yaml - expected list hosts yaml.yml (0.00s)
1834:  �[32m✓�[0m Get hosts get hosts - -yaml test host - expected host detail response yaml.yml (0.01s)
1835:  �[32m✓�[0m Get label (0.38s)
1836:  �[32m✓�[0m Get label usage include and exclude allowed (0.00s)
1837:  �[32m✓�[0m Get label usage include and exclude allowed macos (0.00s)
1838:  �[32m✓�[0m Get label usage include and exclude allowed macos# 01 (0.00s)
1839:  �[32m✓�[0m Get label usage include and exclude allowed macos# 02 (0.00s)
1840:  �[32m✓�[0m Get label usage include and exclude allowed windows (0.00s)
1841:  �[32m✓�[0m Get label usage include and exclude allowed windows# 01 (0.00s)
1842:  �[32m✓�[0m Get label usage include and exclude allowed windows# 02 (0.00s)
1843:  �[32m✓�[0m Get label usage include exclude overlap error (0.00s)
1844:  �[32m✓�[0m Get label usage include exclude overlap error macos (0.00s)
1845:  �[32m✓�[0m Get label usage include exclude overlap error macos# 01 (0.00s)
1846:  �[32m✓�[0m Get label usage include exclude overlap error macos# 02 (0.00s)
1847:  �[32m✓�[0m Get label usage include exclude overlap error windows (0.00s)
1848:  �[32m✓�[0m Get label usage include exclude overlap error windows# 01 (0.00s)
1849:  �[32m✓�[0m Get label usage include exclude overlap error windows# 02 (0.00s)
1850:  �[32m✓�[0m Get label usage multiple label keys error (0.00s)
1851:  �[32m✓�[0m Get label usage multiple label keys error macos (0.00s)
1852:  �[32m✓�[0m Get label usage multiple label keys error windows (0.00s)
1853:  �[32m✓�[0m Get label usage policy scopes (0.00s)
...

1869:  �[32m✓�[0m Get queries as observer team observer (0.01s)
1870:  �[32m✓�[0m Get query (0.40s)
1871:  �[32m✓�[0m Get query labels include all (0.51s)
1872:  �[32m✓�[0m Get reports labels include all (0.42s)
1873:  �[32m✓�[0m Get software titles (0.41s)
1874:  �[32m✓�[0m Get software versions (0.40s)
1875:  �[32m✓�[0m Get teams (0.77s)
1876:  �[32m✓�[0m Get teams YAML and apply (0.39s)
1877:  �[32m✓�[0m Get teams by name (0.42s)
1878:  �[32m✓�[0m Get teams expired license (0.38s)
1879:  �[32m✓�[0m Get teams not expired license (0.39s)
1880:  �[32m✓�[0m Get teams software from source of truth (0.38s)
1881:  �[32m✓�[0m Get user roles (0.55s)
1882:  �[32m✓�[0m Git ops ABM (6.16s)
1883:  �[32m✓�[0m Git ops ABM backwards compat (0.57s)
1884:  �[32m✓�[0m Git ops ABM both keys errors (0.58s)
1885:  �[32m✓�[0m Git ops ABM deprecated config with two tokens in the db fails (0.71s)
1886:  �[32m✓�[0m Git ops ABM new key all valid (0.67s)
1887:  �[32m✓�[0m Git ops ABM new key multiple elements (0.68s)
1888:  �[32m✓�[0m Git ops ABM no team is supported (0.54s)
1889:  �[32m✓�[0m Git ops ABM non existent org name fails (0.47s)
1890:  �[32m✓�[0m Git ops ABM not provided teams defaults to no team (0.46s)
1891:  �[32m✓�[0m Git ops ABM renamed new key all valid (0.77s)
1892:  �[32m✓�[0m Git ops ABM using an undefined team errors (0.72s)
1893:  �[32m✓�[0m Git ops EULA setting (4.78s)
...

1896:  �[32m✓�[0m Git ops EULA setting not a PDF file (0.54s)
1897:  �[32m✓�[0m Git ops EULA setting relative path to working dir to pdf file (no existing EULA uploaded) (0.59s)
1898:  �[32m✓�[0m Git ops EULA setting relative path to yaml file to pdf file (no existing EULA uploaded) (0.58s)
1899:  �[32m✓�[0m Git ops EULA setting uploading the same EULA again (0.67s)
1900:  �[32m✓�[0m Git ops EULA setting valid new pdf file (different EULA already uploaded) (0.74s)
1901:  �[32m✓�[0m Git ops EULA setting valid pdf file (no existing EULA uploaded) (0.61s)
1902:  �[32m✓�[0m Git ops MDM auth settings (0.52s)
1903:  �[32m✓�[0m Git ops SMTP settings (0.71s)
1904:  �[32m✓�[0m Git ops SSO server URL (0.56s)
1905:  �[32m✓�[0m Git ops SSO settings (0.40s)
1906:  �[32m✓�[0m Git ops android certificates add (0.62s)
1907:  �[32m✓�[0m Git ops android certificates change (0.53s)
1908:  �[32m✓�[0m Git ops android certificates delete all (0.53s)
1909:  �[32m✓�[0m Git ops android certificates delete one (0.70s)
1910:  �[32m✓�[0m Git ops app store app auto update (0.46s)
1911:  �[32m✓�[0m Git ops app store app auto update invalid auto-update window triggers error and does not call update software title auto update config (0.02s)
1912:  �[32m✓�[0m Git ops app store app auto update no auto update settings and no existing schedule does not call update software title auto update config (0.02s)
1913:  �[32m✓�[0m Git ops app store app auto update update software title auto update config is applied for i OS VPP apps (0.02s)
1914:  �[32m✓�[0m Git ops app store app auto update update software title auto update config is not called when no VPP apps provided (0.02s)
1915:  �[32m✓�[0m Git ops apple OS updates (0.52s)
1916:  �[32m✓�[0m Git ops apple OS updates ios updates (0.01s)
1917:  �[32m✓�[0m Git ops apple OS updates ios updates os updated when existing OS update declaration (0.01s)
1918:  �[32m✓�[0m Git ops apple OS updates ipados updates (0.01s)
1919:  �[32m✓�[0m Git ops apple OS updates ipados updates os updated when existing OS update declaration (0.01s)
1920:  �[32m✓�[0m Git ops apple OS updates macos updates (0.01s)
1921:  �[32m✓�[0m Git ops apple OS updates macos updates os updated when existing OS update declaration (0.01s)
1922:  �[32m✓�[0m Git ops basic global and no team (0.64s)
1923:  �[32m✓�[0m Git ops basic global and no team basic global and no-team.yml (0.06s)
1924:  �[32m✓�[0m Git ops basic global and no team both global and no-team.yml define controls -- should fail (0.01s)
1925:  �[32m✓�[0m Git ops basic global and no team controls only defined in no-team.yml (0.06s)
1926:  �[32m✓�[0m Git ops basic global and no team global DOES NOT define controls -- should fail (0.01s)
1927:  �[32m✓�[0m Git ops basic global and no team global and no-team.yml DO NOT define controls -- should fail (0.01s)
1928:  �[32m✓�[0m Git ops basic global and no team global defines software -- should fail (0.01s)
1929:  �[32m✓�[0m Git ops basic global and no team no-team provided without global -- should fail (0.01s)
1930:  �[32m✓�[0m Git ops basic global and no team no-team.yml defines policy with calendar events enabled -- should fail (0.01s)
1931:  �[32m✓�[0m Git ops basic global and no team unassigned provided without global -- should fail (0.01s)
1932:  �[32m✓�[0m Git ops basic global and team (0.60s)
...

1938:  �[32m✓�[0m Git ops custom settings global macos windows custom settings valid.yml (0.54s)
1939:  �[32m✓�[0m Git ops custom settings global windows custom settings invalid label mix 2 .yml (0.44s)
1940:  �[32m✓�[0m Git ops custom settings global windows custom settings invalid label mix.yml (0.87s)
1941:  �[32m✓�[0m Git ops custom settings global windows custom settings unknown label.yml (0.41s)
1942:  �[32m✓�[0m Git ops custom settings team macos custom settings valid deprecated.yml (0.47s)
1943:  �[32m✓�[0m Git ops custom settings team macos windows custom settings invalid labels mix 2 .yml (0.46s)
1944:  �[32m✓�[0m Git ops custom settings team macos windows custom settings invalid labels mix.yml (0.49s)
1945:  �[32m✓�[0m Git ops custom settings team macos windows custom settings unknown label.yml (0.41s)
1946:  �[32m✓�[0m Git ops custom settings team macos windows custom settings valid.yml (0.46s)
1947:  �[32m✓�[0m Git ops dry run rejects invalid label platform (0.37s)
1948:  �[32m✓�[0m Git ops exception enforcement (0.46s)
1949:  �[32m✓�[0m Git ops exception enforcement free tier (0.46s)
1950:  �[32m✓�[0m Git ops exceptions preserve omitted keys (0.45s)
1951:  �[32m✓�[0m Git ops features (0.54s)
1952:  �[32m✓�[0m Git ops filename validation (0.00s)
1953:  �[32m✓�[0m Git ops fleet failing policies webhook policy IDs (0.64s)
1954:  �[32m✓�[0m Git ops fleet webhooks and tickets enabled (0.56s)
...

2111:  �[32m✓�[0m New basic file structure has expected files (0.00s)
2112:  �[32m✓�[0m New basic file structure replaces and escapes org name template var (0.00s)
2113:  �[32m✓�[0m New basic file structure strips .template. from output filenames (0.00s)
2114:  �[32m✓�[0m New dir flag (0.01s)
2115:  �[32m✓�[0m New existing dir with force (0.01s)
2116:  �[32m✓�[0m New existing dir without force (0.00s)
2117:  �[32m✓�[0m New org name YAML quoting (0.01s)
2118:  �[32m✓�[0m New org name validation (0.02s)
2119:  �[32m✓�[0m New org name validation at max length (0.01s)
2120:  �[32m✓�[0m New org name validation control characters stripped (0.01s)
2121:  �[32m✓�[0m New org name validation only control characters (0.00s)
2122:  �[32m✓�[0m New org name validation only whitespace (0.00s)
2123:  �[32m✓�[0m New org name validation too long (0.00s)
2124:  �[32m✓�[0m New output messages (0.01s)
2125:  �[32m✓�[0m New template stripping (0.01s)
2126:  �[32m✓�[0m Print auth error (0.47s)
2127:  �[32m✓�[0m Print auth error SSO disabled shows default login message (0.00s)
2128:  �[32m✓�[0m Print auth error SSO enabled shows SSO instructions (0.00s)
2129:  �[32m✓�[0m Render template (0.00s)
...

2149:  �[32m✓�[0m Run api command get scripts full path missing (0.00s)
2150:  �[32m✓�[0m Run api command get scripts team (0.00s)
2151:  �[32m✓�[0m Run api command get scripts team no cache (0.00s)
2152:  �[32m✓�[0m Run api command get typo (0.00s)
2153:  �[32m✓�[0m Run api command upload script (0.00s)
2154:  �[32m✓�[0m Run script command (0.66s)
2155:  �[32m✓�[0m Run script command disabled scripts globally (0.00s)
2156:  �[32m✓�[0m Run script command host not found (0.01s)
2157:  �[32m✓�[0m Run script command invalid file type (0.00s)
2158:  �[32m✓�[0m Run script command invalid hashbang (0.01s)
2159:  �[32m✓�[0m Run script command invalid utf 8 (0.00s)
2160:  �[32m✓�[0m Run script command missing one of script-path and script-nqme (0.01s)
2161:  �[32m✓�[0m Run script command output truncated (0.01s)
2162:  �[32m✓�[0m Run script command posix shell hashbang (0.01s)
2163:  �[32m✓�[0m Run script command script empty (0.00s)
2164:  �[32m✓�[0m Run script command script failed (0.01s)
2165:  �[32m✓�[0m Run script command script killed (0.01s)
...

2220:  �[32m✓�[0m Validate git ops group EUA global-only run degrades id p but the team's in-run file disables EU A: accepted (0.00s)
2221:  �[32m✓�[0m Validate git ops group EUA global-only run degrades id p while a stored team keeps EUA on: rejected (#4337 1) (0.00s)
2222:  �[32m✓�[0m Validate git ops group EUA no EUA enabled anywhere is accepted (0.00s)
2223:  �[32m✓�[0m Validate git ops group EUA team enables EU A, global file adds complete id P: accepted (0.00s)
2224:  �[32m✓�[0m Validate git ops group EUA team enables EU A, global file adds id p missing entity id: rejected (0.00s)
2225:  �[32m✓�[0m Validate git ops group EUA team enables EU A, global file omits id P, stored has id P: rejected (overwrite clears) (0.00s)
2226:  �[32m✓�[0m Validate git ops group EUA team enables EU A, stored has id P, no global file: accepted (0.00s)
2227:  �[32m✓�[0m Validate git ops group EUA team enables EU A, stored has no id P, no global file: rejected (0.00s)
2228:  github.com/fleetdm/fleet/v4/cmd/fleetctl/integrationtest/gitops:
2229:  �[32m✓�[0m Git ops VPP (5.04s)
2230:  �[32m✓�[0m Git ops VPP all fleets is supported (0.78s)
2231:  �[32m✓�[0m Git ops VPP all teams is supported (0.69s)
2232:  �[32m✓�[0m Git ops VPP new key all valid (0.64s)
2233:  �[32m✓�[0m Git ops VPP new key multiple elements (0.58s)
2234:  �[32m✓�[0m Git ops VPP no team is supported (0.68s)
2235:  �[32m✓�[0m Git ops VPP non existent location fails (0.50s)
2236:  �[32m✓�[0m Git ops VPP not provided teams defaults to no team (0.57s)
2237:  �[32m✓�[0m Git ops VPP using an undefined team errors (0.59s)
2238:  �[32m✓�[0m Git ops existing team VPP apps with missing team (0.56s)
...

2331:  �[32m✓�[0m Git ops team software installers team software installer with display name.yml (1.42s)
2332:  �[32m✓�[0m Integrations enterprise gitops (319.41s)
2333:  �[32m✓�[0m Integrations enterprise gitops test CA integrations (3.94s)
2334:  �[32m✓�[0m Integrations enterprise gitops test FMA labels include all (6.10s)
2335:  �[32m✓�[0m Integrations enterprise gitops test IPA software installers (10.77s)
2336:  �[32m✓�[0m Integrations enterprise gitops test JSON configuration profile escaping (1.30s)
2337:  �[32m✓�[0m Integrations enterprise gitops test add manual labels (1.56s)
2338:  �[32m✓�[0m Integrations enterprise gitops test configuration profile escaping (1.37s)
2339:  �[32m✓�[0m Integrations enterprise gitops test delete CA with certificate templates (5.98s)
2340:  �[32m✓�[0m Integrations enterprise gitops test delete mac OS setup (5.12s)
2341:  �[32m✓�[0m Integrations enterprise gitops test deleting no team YAML (2.71s)
2342:  �[32m✓�[0m Integrations enterprise gitops test disallow software setup experience (123.83s)
2343:  �[32m✓�[0m Integrations enterprise gitops test disallow software setup experience all VPP with setup experience (1.25s)
2344:  �[32m✓�[0m Integrations enterprise gitops test disallow software setup experience no team VPP (1.15s)
2345:  �[32m✓�[0m Integrations enterprise gitops test disallow software setup experience no team installers (60.56s)
2346:  �[32m✓�[0m Integrations enterprise gitops test disallow software setup experience packages fail (60.69s)
2347:  �[32m✓�[0m Integrations enterprise gitops test dry run mac OS setup script with manual agent install conflict (0.44s)
...

2377:  �[32m✓�[0m Integrations enterprise gitops test omitted top level keys global (2.51s)
2378:  �[32m✓�[0m Integrations enterprise gitops test remove custom settings from default YAML (2.60s)
2379:  �[32m✓�[0m Integrations enterprise gitops test special case teams VPP apps (3.91s)
2380:  �[32m✓�[0m Integrations enterprise gitops test special case teams VPP apps all teams (2.45s)
2381:  �[32m✓�[0m Integrations enterprise gitops test special case teams VPP apps no team (1.29s)
2382:  �[32m✓�[0m Integrations enterprise gitops test unset configuration profile labels (5.05s)
2383:  �[32m✓�[0m Integrations enterprise gitops test unset software installer labels (11.52s)
2384:  �[32m✓�[0m Integrations enterprise starter library (5.05s)
2385:  �[32m✓�[0m Integrations enterprise starter library test apply starter library premium (3.57s)
2386:  �[32m✓�[0m Integrations gitops (2.40s)
2387:  �[32m✓�[0m Integrations gitops test fleet gitops (0.53s)
2388:  �[32m✓�[0m Integrations gitops test fleet gitops DDM fleet vars requires premium (0.12s)
2389:  �[32m✓�[0m Integrations gitops test fleet gitops with fleet secrets (0.26s)
2390:  �[32m✓�[0m Integrations starter library (1.65s)
2391:  �[32m✓�[0m Integrations starter library test apply starter library free (0.19s)
2392:  === �[31mFailed�[0m
2393:  === �[31mFAIL�[0m: cmd/fleetctl/fleetctl TestGitOpsFullGlobal/useDeprecatedKeys=false (0.04s)
2394:  time=level=INFO msg="request error" path=/api/latest/fleet/setup_experience/eula/metadata took=152.554µs uuid=2ab812b6-513b-4c9f-a6f6-61de29da7d25 err="not found"
2395:  [-] would've deleted report Query to delete
2396:  time=level=INFO msg="request error" path=/api/latest/fleet/setup_experience/eula/metadata took=142.976µs uuid=59ce9bf0-6542-4926-b2c7-1aeef65974c5 err="not found"
2397:  testing_utils_test.go:20: 
2398:  Error Trace:	/home/runner/work/fleet/fleet/cmd/fleetctl/fleetctl/testing_utils_test.go:20
2399:  /home/runner/work/fleet/fleet/cmd/fleetctl/fleetctl/gitops_test.go:2244
2400:  Error:      	Received unexpected error:
2401:  applying custom settings: POST /api/latest/fleet/mdm/profiles/batch received status 422 Validation Failed: cannot set custom settings: Windows MDM isn't turned on. For more information about setting up MDM, please visit https://fleetdm.com/learn-more-about/windows-mdm (API time: 1ms)
2402:  Test:       	TestGitOpsFullGlobal/useDeprecatedKeys=false
2403:  --- FAIL: TestGitOpsFullGlobal/useDeprecatedKeys=false (0.04s)
2404:  === �[31mFAIL�[0m: cmd/fleetctl/fleetctl TestGitOpsFullGlobal/useDeprecatedKeys=true (0.04s)
2405:  time=level=INFO msg="request error" path=/api/latest/fleet/setup_experience/eula/metadata took=113.763µs uuid=002fc28e-916a-4b83-9e50-4d896424f470 err="not found"
2406:  [-] would've deleted report Query to delete
2407:  time=level=INFO msg="request error" path=/api/latest/fleet/setup_experience/eula/metadata took=168.825µs uuid=19b2f3c4-897e-40d0-88be-a97f543bf5f7 err="not found"
2408:  testing_utils_test.go:20: 
2409:  Error Trace:	/home/runner/work/fleet/fleet/cmd/fleetctl/fleetctl/testing_utils_test.go:20
2410:  /home/runner/work/fleet/fleet/cmd/fleetctl/fleetctl/gitops_test.go:2244
2411:  Error:      	Received unexpected error:
2412:  applying custom settings: POST /api/latest/fleet/mdm/profiles/batch received status 422 Validation Failed: cannot set custom settings: Windows MDM isn't turned on. For more information about setting up MDM, please visit https://fleetdm.com/learn-more-about/windows-mdm (API time: 1ms)
2413:  Test:       	TestGitOpsFullGlobal/useDeprecatedKeys=true
2414:  --- FAIL: TestGitOpsFullGlobal/useDeprecatedKeys=true (0.04s)
2415:  === �[31mFAIL�[0m: cmd/fleetctl/fleetctl TestGitOpsFullGlobal (0.57s)
2416:  DONE 921 tests, 3 failures in 652.249s
2417:  make[1]: *** [Makefile:302: .run-go-tests] Error 1
2418:  make[1]: Leaving directory '/home/runner/work/fleet/fleet'
2419:  make: *** [Makefile:417: test-go] Error 2
2420:  ##[error]Process completed with exit code 2.
2421:  Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2422:  ##[group]Run actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
2423:  with:
2424:  name: fleetctl-mysql8.0.44-coverage
2425:  path: ./coverage.txt
2426:  if-no-files-found: error
2427:  compression-level: 6
...

2430:  RACE_ENABLED: false
2431:  GO_TEST_TIMEOUT: 20m
2432:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2433:  RUN_TESTS_ARG: 
2434:  CI_TEST_PKG: fleetctl
2435:  NEED_DOCKER: 1
2436:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2437:  GOTOOLCHAIN: local
2438:  ##[endgroup]
2439:  (node:44669) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2440:  (Use `node --trace-deprecation ...` to show where the warning was created)
2441:  With the provided path, there will be 1 file uploaded
2442:  Artifact name is valid!
2443:  Root directory input is valid!
2444:  Beginning upload of artifact content to blob storage
2445:  (node:44669) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2446:  Uploaded bytes 2310363
2447:  Finished uploading artifact content to blob storage!
2448:  SHA256 hash of uploaded artifact zip is 5dbefc2de1f061d11b1682cb3d1f067d9adc2c7423a86be6b35cccff4acaa81b
2449:  Finalizing artifact upload
2450:  Artifact fleetctl-mysql8.0.44-coverage.zip successfully finalized. Artifact ID 8018138022
2451:  Artifact fleetctl-mysql8.0.44-coverage has been successfully uploaded! Final size is 2310363 bytes. Artifact ID is 8018138022
2452:  Artifact download URL: https://github.com/fleetdm/fleet/actions/runs/28535757456/artifacts/8018138022
2453:  ##[group]Run c1grep() { grep "$@" || test $? = 1; }
2454:  �[36;1mc1grep() { grep "$@" || test $? = 1; }�[0m
2455:  �[36;1mc1grep -oP 'FAIL: .*$' /tmp/gotest.log > /tmp/summary.txt�[0m
2456:  �[36;1mc1grep 'test timed out after' /tmp/gotest.log >> /tmp/summary.txt�[0m
2457:  �[36;1mc1grep 'fatal error:' /tmp/gotest.log >> /tmp/summary.txt�[0m
2458:  �[36;1mc1grep -A 10 'panic: runtime error: ' /tmp/gotest.log >> /tmp/summary.txt�[0m
2459:  �[36;1mc1grep ' FAIL\t' /tmp/gotest.log >> /tmp/summary.txt�[0m
2460:  �[36;1mGO_FAIL_SUMMARY=$(head -n 5 /tmp/summary.txt | sed ':a;N;$!ba;s/\n/\\n/g')�[0m
2461:  �[36;1mecho "GO_FAIL_SUMMARY=$GO_FAIL_SUMMARY"�[0m
2462:  �[36;1mif [[ -z "$GO_FAIL_SUMMARY" ]]; then�[0m
2463:  �[36;1m  GO_FAIL_SUMMARY="unknown, please check the build URL"�[0m
2464:  �[36;1mfi�[0m
2465:  �[36;1mGO_FAIL_SUMMARY=$GO_FAIL_SUMMARY envsubst < .github/workflows/config/slack_payload_template.json > ./payload.json�[0m
2466:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2467:  env:
2468:  RACE_ENABLED: false
2469:  GO_TEST_TIMEOUT: 20m
2470:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2471:  RUN_TESTS_ARG: 
2472:  CI_TEST_PKG: fleetctl
2473:  NEED_DOCKER: 1
2474:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2475:  GOTOOLCHAIN: local
2476:  ##[endgroup]
2477:  GO_FAIL_SUMMARY=FAIL: TestGitOpsFullGlobal/useDeprecatedKeys=false (0.04s)\nFAIL: TestGitOpsFullGlobal/useDeprecatedKeys=true (0.04s)
2478:  Node 20 is being deprecated. This workflow is running with Node 24 by default. If you need to temporarily use Node 20, you can set the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true environment variable. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2479:  ##[group]Run actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
2480:  with:
2481:  name: fleetctl-mysql8.0.44-test-log
2482:  path: /tmp/gotest.log
2483:  if-no-files-found: error
2484:  compression-level: 6
...

2487:  RACE_ENABLED: false
2488:  GO_TEST_TIMEOUT: 20m
2489:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2490:  RUN_TESTS_ARG: 
2491:  CI_TEST_PKG: fleetctl
2492:  NEED_DOCKER: 1
2493:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2494:  GOTOOLCHAIN: local
2495:  ##[endgroup]
2496:  (node:44691) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2497:  (Use `node --trace-deprecation ...` to show where the warning was created)
2498:  With the provided path, there will be 1 file uploaded
2499:  Artifact name is valid!
2500:  Root directory input is valid!
2501:  Beginning upload of artifact content to blob storage
2502:  (node:44691) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2503:  Uploaded bytes 11015
...

2519:  RACE_ENABLED: false
2520:  GO_TEST_TIMEOUT: 20m
2521:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2522:  RUN_TESTS_ARG: 
2523:  CI_TEST_PKG: fleetctl
2524:  NEED_DOCKER: 1
2525:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2526:  GOTOOLCHAIN: local
2527:  ##[endgroup]
2528:  (node:44703) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2529:  (Use `node --trace-deprecation ...` to show where the warning was created)
2530:  With the provided path, there will be 1 file uploaded
2531:  Artifact name is valid!
2532:  Root directory input is valid!
2533:  Beginning upload of artifact content to blob storage
2534:  (node:44703) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2535:  Uploaded bytes 205
...

2551:  RACE_ENABLED: false
2552:  GO_TEST_TIMEOUT: 20m
2553:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2554:  RUN_TESTS_ARG: 
2555:  CI_TEST_PKG: fleetctl
2556:  NEED_DOCKER: 1
2557:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2558:  GOTOOLCHAIN: local
2559:  ##[endgroup]
2560:  (node:44715) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2561:  (Use `node --trace-deprecation ...` to show where the warning was created)
2562:  With the provided path, there will be 1 file uploaded
2563:  Artifact name is valid!
2564:  Root directory input is valid!
2565:  Beginning upload of artifact content to blob storage
2566:  (node:44715) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2567:  Uploaded bytes 105077
...

2600:  RACE_ENABLED: false
2601:  GO_TEST_TIMEOUT: 20m
2602:  DOCKER_COMMAND: docker compose -f docker-compose.yml -f docker-compose-redis-cluster.yml up -d mysql_test mysql_replica_test redis redis-cluster-1 redis-cluster-2 redis-cluster-3 redis-cluster-4 redis-cluster-5 redis-cluster-6 redis-cluster-setup s3 saml_idp mailhog mailpit smtp4dev_test
2603:  RUN_TESTS_ARG: 
2604:  CI_TEST_PKG: fleetctl
2605:  NEED_DOCKER: 1
2606:  ARTIFACT_PREFIX: fleetctl-mysql8.0.44
2607:  GOTOOLCHAIN: local
2608:  ##[endgroup]
2609:  (node:44728) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2610:  (Use `node --trace-deprecation ...` to show where the warning was created)
2611:  With the provided path, there will be 1 file uploaded
2612:  Artifact name is valid!
2613:  Root directory input is valid!
2614:  Beginning upload of artifact content to blob storage
2615:  (node:44728) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2616:  Uploaded bytes 133

@nulmete nulmete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I'd remove the integration tests since we won't be running those in CI.

Comment on lines +20 to +33
// TestSplunkIntegration tests the Splunk HEC writer against a real Splunk instance.
//
// Prerequisites:
//
// docker run -d --name splunk-test --platform linux/amd64 \
// -p 8000:8000 -p 8088:8088 -p 8089:8089 \
// -e SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com \
// -e SPLUNK_START_ARGS=--accept-license \
// -e SPLUNK_PASSWORD=changeme123 \
// -e SPLUNK_HEC_TOKEN=test-hec-token-1234 \
// splunk/splunk:latest
//
// Run with: SPLUNK_INTEGRATION_TEST=1 go test ./server/logging/ -run TestSplunkIntegration -v
func TestSplunkIntegration(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the unit tests should be enough, and since we're not running these integration tests in CI I don't see a reason to keep them. My personal preference is to delete them.

@mike-j-thomas
mike-j-thomas removed their request for review July 3, 2026 12:21
@sharon-fdm
sharon-fdm merged commit b36be84 into main Jul 3, 2026
47 of 49 checks passed
@sharon-fdm
sharon-fdm deleted the worktree-splunk-log-destination branch July 3, 2026 16:14
@sharon-fdm sharon-fdm mentioned this pull request Jul 7, 2026
36 tasks
@sharon-fdm sharon-fdm linked an issue Jul 8, 2026 that may be closed by this pull request
36 tasks
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.

New log destination: Splunk Send osquery data to Splunk

4 participants