Skip to content

Finishing mysql package migration to slog#40350

Merged
getvictor merged 4 commits intomainfrom
victor/40054-slog-mysql
Feb 24, 2026
Merged

Finishing mysql package migration to slog#40350
getvictor merged 4 commits intomainfrom
victor/40054-slog-mysql

Conversation

@getvictor
Copy link
Copy Markdown
Member

@getvictor getvictor commented Feb 23, 2026

Related issue: Resolves #40054

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    • Already present in previous PR

Testing

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

Summary by CodeRabbit

  • Chores
    • Migrated logging to a structured, context-aware backend for clearer, richer diagnostics and consistent log formatting.
    • Introduced broader context propagation and adjusted internal interfaces to support the new logging approach (no end-user behavior changes).

@getvictor
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 23, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Continues the slog migration by updating the MySQL platform/datastore layers (and related tools/commands/tests) to use log/slog loggers and context-aware logging instead of go-kit/log and Fleet’s legacy logger types.

Changes:

  • Switch MySQL DB option/config plumbing and datastore logger fields to *slog.Logger, updating call sites to pass logger.SlogLogger() where needed.
  • Replace go-kit level.*(...).Log(...) usage with DebugContext/InfoContext/WarnContext/ErrorContext.
  • Update tests/utilities and a few helper signatures to accept/propagate context.Context for slog logging.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/mysql-tests/rds/iam_auth.go Switch test tool to initialize/use slog logger.
tools/mdm/apple/setupexperience/main.go Pass slog logger into MySQL options via adapter.
tools/mdm/apple/applebmapi/main.go Pass slog logger into MySQL options via adapter.
tools/mdm/apple/apnspush/main.go Pass slog logger into MySQL options via adapter.
tools/dbutils/schema_generator.go Use discard *slog.Logger for schema generator MySQL init.
server/platform/mysql/common.go Change DBOptions logger to *slog.Logger and update connection logging.
server/datastore/mysql/vpp.go Migrate vpp datastore logs to slog.
server/datastore/mysql/testing_utils.go Update integration test datastore logger setup to slog.
server/datastore/mysql/statistics.go Migrate statistics datastore logs to slog.
server/datastore/mysql/software_titles.go Migrate warning log to slog (policy association case).
server/datastore/mysql/software_test.go Update tests for slog logger + ctx propagation changes.
server/datastore/mysql/software_installers.go Migrate installer label-conflict warning log to slog.
server/datastore/mysql/software.go Migrate software datastore logs to slog and add ctx to helper(s).
server/datastore/mysql/setup_experience.go Migrate setup experience logs to slog.
server/datastore/mysql/scripts.go Migrate scripts datastore logs to slog.
server/datastore/mysql/scim.go Migrate SCIM datastore logs + logger type to *slog.Logger.
server/datastore/mysql/queries.go Migrate query stats deletion error logs to slog.
server/datastore/mysql/policies.go Migrate policies datastore logs and logger plumbing to slog.
server/datastore/mysql/operating_system_vulnerabilities.go Add ctx + slog logger to Linux vuln result processing.
server/datastore/mysql/nanomdm_storage.go Pass slog logger to nano MDM MySQL storage.
server/datastore/mysql/mysql_test.go Update mysql datastore tests to use discard slog logger.
server/datastore/mysql/mysql.go Change datastore logger field to *slog.Logger and update txn helpers/log calls.
server/datastore/mysql/microsoft_mdm.go Migrate Windows MDM logs to slog; thread ctx into BitLocker helper.
server/datastore/mysql/mdm.go Migrate MDM datastore logs and logger types to slog.
server/datastore/mysql/labels.go Thread ctx into OS settings filter helpers.
server/datastore/mysql/in_house_apps.go Migrate label-conflict warning log to slog.
server/datastore/mysql/hosts.go Migrate host datastore logs to slog; thread ctx into OS settings filters.
server/datastore/mysql/host_identity_scep.go Pass slog logger into retry tx helper.
server/datastore/mysql/host_certificates.go Migrate host certificates logs to slog.
server/datastore/mysql/disk_encryption.go Migrate disk encryption logs to slog.
server/datastore/mysql/config.go Change mysql.Logger(...) DBOption signature to accept *slog.Logger.
server/datastore/mysql/apple_mdm.go Migrate Apple MDM datastore logs + helper logger types to slog.
server/datastore/mysql/android_mysql.go Change Android datastore logger type to *slog.Logger and update tx helpers.
server/datastore/mysql/android_hosts.go Migrate Android hosts logging to slog.
server/datastore/mysql/android_enterprise_test.go Update Android enterprise tests to pass slog logger to truncate helper.
server/datastore/mysql/android_device_test.go Update Android device tests to pass slog logger to truncate helper.
server/datastore/mysql/android.go Migrate Android datastore logs to slog.
server/datastore/mysql/activities.go Migrate activities datastore push error logging to slog.
ee/server/service/condaccess/depot/depot.go Migrate conditional access SCEP depot logger to *slog.Logger.
ee/server/integrationtest/condaccess/suite.go Pass slog logger into conditional access SCEP depot creation.
cmd/fleet/vuln_process.go Pass slog logger into mysql datastore creation.
cmd/fleet/serve.go Pass slog logger into mysql datastore + conditional access depot creation.

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

Comment thread server/platform/mysql/common.go
Comment thread server/platform/mysql/common.go
Comment thread server/datastore/mysql/software_test.go Outdated
Comment thread server/datastore/mysql/software.go
Comment thread server/datastore/mysql/hosts.go Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 23, 2026

Walkthrough

This PR migrates logging from go-kit/log and custom logging types to Go's standard log/slog across the codebase. It changes logger types to slog.Logger, replaces level. calls with context-aware methods (InfoContext, ErrorContext, DebugContext, WarnContext), threads context into many datastore and helper functions, and updates DB/logger wiring and test helpers to use slog equivalents. A few public/internal function signatures and struct fields were adjusted to accept *slog.Logger and some cached-stmt/delete helpers now accept context.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% 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 'Finishing mysql package migration to slog' clearly and specifically summarizes the main change—completing the MySQL package's migration to slog logging.
Description check ✅ Passed The description includes the related issue (#40054), confirms testing was completed (automated tests added/updated, manual QA done), and notes that changes files were already added in a previous PR.
Linked Issues check ✅ Passed The PR meets the objectives of linked issue #40054 by completing the slog migration work in the mysql package across multiple files (logger type changes, slog-based context-aware logging, API signature updates).
Out of Scope Changes check ✅ Passed All changes are directly related to the slog migration objective: logger type replacements, context-aware logging updates, and signature adjustments consistently align with completing the mysql package migration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch victor/40054-slog-mysql

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 and usage tips.

@getvictor
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 23, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
server/datastore/mysql/mdm.go (1)

2614-2659: ⚠️ Potential issue | 🟠 Major

PII leakage: email addresses logged at Info level.

Multiple Info-level log calls in reconcileHostEmailsFromMdmIdpAccountsDB emit email addresses — both embedded in a dynamically constructed message (Lines 2616–2621) and as a structured "email" attribute (Lines 2631, 2650, 2659). Email addresses are PII under GDPR/CCPA, and logging them at Info level risks exposing them in log aggregators, stdout captures, or wherever the slog handler writes.

Additionally, the message construction at Line 2616 concatenates email values directly into the message string, which is both a PII concern and non-idiomatic slog (the message should remain static).

Consider logging only opaque identifiers (e.g., host IDs, row counts, or account UUIDs) instead of email addresses:

🛡️ Proposed fix — strip emails from log statements
 if len(misses) > 0 {
-    // log the emails we'll be deleting
-    msg := "reconcile host emails: deleting emails"
-    for _, m := range misses {
-        idsToDelete = append(idsToDelete, m.ID)
-        msg += fmt.Sprintf(" %s", m.Email)
-    }
-    logger.InfoContext(ctx, msg, "host_id", hostID)
+    for _, m := range misses {
+        idsToDelete = append(idsToDelete, m.ID)
+    }
+    logger.DebugContext(ctx, "reconcile host emails: deleting stale mdm idp account emails",
+        "host_id", hostID, "count", len(misses))
 }
-    logger.InfoContext(ctx, "reconcile host emails: found duplicate mdm idp account host email", "host_id", hostID, "email", idp.Email, "account_uuid", idp.UUID)
+    logger.InfoContext(ctx, "reconcile host emails: found duplicate mdm idp account host email", "host_id", hostID, "account_uuid", idp.UUID)
-    logger.InfoContext(ctx, "reconcile host emails: update host mdm idp account email", "host_id", hostID, "email", idpEmail)
+    logger.DebugContext(ctx, "reconcile host emails: update host mdm idp account email", "host_id", hostID)
-    logger.InfoContext(ctx, "reconcile host emails: insert host mdm idp account email", "host_id", hostID, "email", idpEmail, "account_uuid", idp.UUID)
+    logger.DebugContext(ctx, "reconcile host emails: insert host mdm idp account email", "host_id", hostID, "account_uuid", idp.UUID)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/datastore/mysql/mdm.go` around lines 2614 - 2659, In
reconcileHostEmailsFromMdmIdpAccountsDB, remove PII by stopping inclusion of
idp.Email and idpEmail in Info-level logs and stop concatenating email values
into the log message; instead log static messages and non-PII identifiers (e.g.,
"host_id", hostID, "account_uuid", idp.UUID) and counts (e.g., len(idsToDelete),
len(hits)). Replace the dynamic-built msg that appends m.Email with a static
message like "reconcile host emails: deleting N emails" and pass "delete_count",
len(idsToDelete) (and optionally the slice length or individual DB row IDs if
non-PII) to logger.InfoContext; similarly change the duplicate and update/insert
logs (calls to logger.InfoContext that reference idp.Email or idpEmail) to omit
email fields and instead include "account_uuid" or counts/ids. Ensure all
logger.InfoContext calls in this function no longer include email values and
that message strings remain static (no direct concatenation of email values).
♻️ Duplicate comments (1)
server/datastore/mysql/disk_encryption.go (1)

170-172: Same log field mismatch as above (host_id vs host).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/datastore/mysql/disk_encryption.go` around lines 170 - 172, The log
field key and value are mismatched in the ds.logger.ErrorContext call in
disk_encryption.go: replace the field name "host_id" with the correct key "host"
(or alternatively pass host.ID if you intend the key to be "host_id") so the
key/value pair is consistent; update the ds.logger.ErrorContext invocation
accordingly (reference: ds.logger.ErrorContext(ctx, "Primary key already exists
in LUKS host_disk_encryption_keys. Falling back to update", "host_id", host)).
🧹 Nitpick comments (3)
server/datastore/mysql/mdm.go (1)

2189-2189: Non-idiomatic slog: use structured attributes instead of fmt.Sprintf in the message string.

Both lines embed dynamic data inside the message via fmt.Sprintf, which prevents log aggregators from grouping identical events and is inconsistent with the slog migration style used everywhere else in this file.

♻️ Proposed refactor
-ds.logger.DebugContext(ctx, fmt.Sprintf("counted %d android hosts for profile %s with mdm turned on but no profiles", row.Count, profileUUID))
+ds.logger.DebugContext(ctx, "counted android hosts for profile with mdm turned on but no profiles",
+    "count", row.Count, "profile_uuid", profileUUID)
-ds.logger.DebugContext(ctx, fmt.Sprintf("counted %d windows hosts for profile %s with mdm turned on but no profiles", row.Count, profileUUID))
+ds.logger.DebugContext(ctx, "counted windows hosts for profile with mdm turned on but no profiles",
+    "count", row.Count, "profile_uuid", profileUUID)

Also applies to: 2259-2259

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/datastore/mysql/mdm.go` at line 2189, Replace the fmt.Sprintf usage in
the DebugContext call so the message is static and the dynamic fields are passed
as structured attributes; specifically update the DebugContext invocation(s)
that currently use fmt.Sprintf("counted %d android hosts for profile %s with mdm
turned on but no profiles", row.Count, profileUUID) to something like a constant
message string and include row.Count and profileUUID as attributes (e.g.,
"counted android hosts for profile with mdm on but no profiles",
slog.Int("count", row.Count), slog.String("profile_uuid", profileUUID)); apply
the same change to the similar call referencing these symbols (the DebugContext
calls using row.Count and profileUUID around the referenced lines).
server/datastore/mysql/microsoft_mdm.go (2)

831-839: Duplicate log message obscures two distinct conditions.

Both branches log "no bitlocker status found for host", but they represent different states: one is sql.ErrNoRows (no MDM row at all) and the other is an empty status string after the CASE expression. Using distinct messages would make triage easier.

♻️ Proposed fix
-		ds.logger.DebugContext(ctx, "no bitlocker status found for host", "host_id", host.ID)
+		ds.logger.DebugContext(ctx, "no mdm row found for host, defaulting bitlocker status to enforcing", "host_id", host.ID)
 		dest.Status = fleet.DiskEncryptionEnforcing
 	}
 
 	if dest.Status == "" {
 		// This is unexpected. We know that disk encryption is enabled so we treat it failed to draw
 		// attention to the issue and log potential debugging
-		ds.logger.DebugContext(ctx, "no bitlocker status found for host", "host_id", host.ID)
+		ds.logger.DebugContext(ctx, "empty bitlocker status for host, defaulting to failed", "host_id", host.ID)
 		dest.Status = fleet.DiskEncryptionFailed
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/datastore/mysql/microsoft_mdm.go` around lines 831 - 839, The two
ds.logger.DebugContext calls currently use the same message "no bitlocker status
found for host" for different conditions; update them to distinct, descriptive
messages so triage is easier: when handling the sql.ErrNoRows branch (where you
set dest.Status = fleet.DiskEncryptionEnforcing) log something like "no MDM
bitlocker row for host" including "host_id" and host.ID, and when handling the
empty CASE result branch (where you set dest.Status =
fleet.DiskEncryptionFailed) log something like "empty bitlocker status from MDM
CASE for host" including "host_id" and host.ID; keep the same logger call
ds.logger.DebugContext and the surrounding logic unchanged.

1088-1088: Avoid fmt.Sprintf in slog message; use structured key-value attrs instead.

fmt.Sprintf is evaluated eagerly regardless of the logger's level. Passing the data as slog attributes is the idiomatic approach and allows the logger to skip formatting when the level is disabled.

♻️ Proposed refactor
-		ds.logger.DebugContext(ctx, fmt.Sprintf("counted %d windows hosts on team %v with mdm turned on but no profiles or bitlocker status", c.Count, teamID))
+		ds.logger.DebugContext(ctx, "counted windows hosts with mdm turned on but no profiles or bitlocker status", "count", c.Count, "team_id", teamID)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/datastore/mysql/microsoft_mdm.go` at line 1088, Replace the eager
fmt.Sprintf call passed into ds.logger.DebugContext with structured slog
key/value attributes so logging is deferred; specifically, in the DebugContext
invocation that currently does fmt.Sprintf("counted %d windows hosts on team %v
with mdm turned on but no profiles or bitlocker status", c.Count, teamID), call
ds.logger.DebugContext with a short message string and supply "count" (c.Count)
and "team_id" (teamID) as separate attributes/fields so formatting is only done
when the debug level is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@server/datastore/mysql/disk_encryption.go`:
- Around line 56-57: The log call in disk_encryption.go is passing the entire
host struct as the "host_id" field; update the ds.logger.ErrorContext invocation
(the call using ds.logger.ErrorContext(ctx, "Primary key already exists in
host_disk_encryption_keys. Falling back to update", "host_id", host)) to pass
the host's numeric ID (host.ID) instead of the full host object so the "host_id"
field contains only the identifier and reduces leaked data.

In `@server/datastore/mysql/software_test.go`:
- Line 3573: The test calls hostSoftwareInstalledPathsDelta with a nil logger
which causes a panic because hostSoftwareInstalledPathsDelta calls
logger.DebugContext(); update the test so it passes a discard logger instance
(e.g., slog.New(slog.DiscardHandler())) instead of nil when invoking
hostSoftwareInstalledPathsDelta (the call at toI, toD, err :=
hostSoftwareInstalledPathsDelta(...)). Ensure other subtests already using
slog.New(slog.DiscardHandler()) remain consistent.

---

Outside diff comments:
In `@server/datastore/mysql/mdm.go`:
- Around line 2614-2659: In reconcileHostEmailsFromMdmIdpAccountsDB, remove PII
by stopping inclusion of idp.Email and idpEmail in Info-level logs and stop
concatenating email values into the log message; instead log static messages and
non-PII identifiers (e.g., "host_id", hostID, "account_uuid", idp.UUID) and
counts (e.g., len(idsToDelete), len(hits)). Replace the dynamic-built msg that
appends m.Email with a static message like "reconcile host emails: deleting N
emails" and pass "delete_count", len(idsToDelete) (and optionally the slice
length or individual DB row IDs if non-PII) to logger.InfoContext; similarly
change the duplicate and update/insert logs (calls to logger.InfoContext that
reference idp.Email or idpEmail) to omit email fields and instead include
"account_uuid" or counts/ids. Ensure all logger.InfoContext calls in this
function no longer include email values and that message strings remain static
(no direct concatenation of email values).

---

Duplicate comments:
In `@server/datastore/mysql/disk_encryption.go`:
- Around line 170-172: The log field key and value are mismatched in the
ds.logger.ErrorContext call in disk_encryption.go: replace the field name
"host_id" with the correct key "host" (or alternatively pass host.ID if you
intend the key to be "host_id") so the key/value pair is consistent; update the
ds.logger.ErrorContext invocation accordingly (reference:
ds.logger.ErrorContext(ctx, "Primary key already exists in LUKS
host_disk_encryption_keys. Falling back to update", "host_id", host)).

---

Nitpick comments:
In `@server/datastore/mysql/mdm.go`:
- Line 2189: Replace the fmt.Sprintf usage in the DebugContext call so the
message is static and the dynamic fields are passed as structured attributes;
specifically update the DebugContext invocation(s) that currently use
fmt.Sprintf("counted %d android hosts for profile %s with mdm turned on but no
profiles", row.Count, profileUUID) to something like a constant message string
and include row.Count and profileUUID as attributes (e.g., "counted android
hosts for profile with mdm on but no profiles", slog.Int("count", row.Count),
slog.String("profile_uuid", profileUUID)); apply the same change to the similar
call referencing these symbols (the DebugContext calls using row.Count and
profileUUID around the referenced lines).

In `@server/datastore/mysql/microsoft_mdm.go`:
- Around line 831-839: The two ds.logger.DebugContext calls currently use the
same message "no bitlocker status found for host" for different conditions;
update them to distinct, descriptive messages so triage is easier: when handling
the sql.ErrNoRows branch (where you set dest.Status =
fleet.DiskEncryptionEnforcing) log something like "no MDM bitlocker row for
host" including "host_id" and host.ID, and when handling the empty CASE result
branch (where you set dest.Status = fleet.DiskEncryptionFailed) log something
like "empty bitlocker status from MDM CASE for host" including "host_id" and
host.ID; keep the same logger call ds.logger.DebugContext and the surrounding
logic unchanged.
- Line 1088: Replace the eager fmt.Sprintf call passed into
ds.logger.DebugContext with structured slog key/value attributes so logging is
deferred; specifically, in the DebugContext invocation that currently does
fmt.Sprintf("counted %d windows hosts on team %v with mdm turned on but no
profiles or bitlocker status", c.Count, teamID), call ds.logger.DebugContext
with a short message string and supply "count" (c.Count) and "team_id" (teamID)
as separate attributes/fields so formatting is only done when the debug level is
enabled.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ddeeb39 and 4fbd4a8.

📒 Files selected for processing (42)
  • cmd/fleet/serve.go
  • cmd/fleet/vuln_process.go
  • ee/server/integrationtest/condaccess/suite.go
  • ee/server/service/condaccess/depot/depot.go
  • server/datastore/mysql/activities.go
  • server/datastore/mysql/android.go
  • server/datastore/mysql/android_device_test.go
  • server/datastore/mysql/android_enterprise_test.go
  • server/datastore/mysql/android_hosts.go
  • server/datastore/mysql/android_mysql.go
  • server/datastore/mysql/apple_mdm.go
  • server/datastore/mysql/config.go
  • server/datastore/mysql/disk_encryption.go
  • server/datastore/mysql/host_certificates.go
  • server/datastore/mysql/host_identity_scep.go
  • server/datastore/mysql/hosts.go
  • server/datastore/mysql/in_house_apps.go
  • server/datastore/mysql/labels.go
  • server/datastore/mysql/mdm.go
  • server/datastore/mysql/microsoft_mdm.go
  • server/datastore/mysql/mysql.go
  • server/datastore/mysql/mysql_test.go
  • server/datastore/mysql/nanomdm_storage.go
  • server/datastore/mysql/operating_system_vulnerabilities.go
  • server/datastore/mysql/policies.go
  • server/datastore/mysql/queries.go
  • server/datastore/mysql/scim.go
  • server/datastore/mysql/scripts.go
  • server/datastore/mysql/setup_experience.go
  • server/datastore/mysql/software.go
  • server/datastore/mysql/software_installers.go
  • server/datastore/mysql/software_test.go
  • server/datastore/mysql/software_titles.go
  • server/datastore/mysql/statistics.go
  • server/datastore/mysql/testing_utils.go
  • server/datastore/mysql/vpp.go
  • server/platform/mysql/common.go
  • tools/dbutils/schema_generator.go
  • tools/mdm/apple/apnspush/main.go
  • tools/mdm/apple/applebmapi/main.go
  • tools/mdm/apple/setupexperience/main.go
  • tools/mysql-tests/rds/iam_auth.go

Comment thread server/datastore/mysql/disk_encryption.go Outdated
Comment thread server/datastore/mysql/software_test.go Outdated
@getvictor getvictor marked this pull request as ready for review February 23, 2026 23:09
@getvictor getvictor requested a review from a team as a code owner February 23, 2026 23:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 66.83673% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.28%. Comparing base (9e4a907) to head (cbc6f3b).
⚠️ Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/apple_mdm.go 60.71% 11 Missing ⚠️
server/datastore/mysql/mdm.go 60.00% 8 Missing ⚠️
server/datastore/mysql/policies.go 33.33% 6 Missing ⚠️
server/datastore/mysql/microsoft_mdm.go 79.16% 5 Missing ⚠️
server/datastore/mysql/software.go 64.28% 5 Missing ⚠️
server/datastore/mysql/queries.go 0.00% 4 Missing ⚠️
server/datastore/mysql/scripts.go 20.00% 4 Missing ⚠️
server/datastore/mysql/hosts.go 91.42% 3 Missing ⚠️
cmd/fleet/serve.go 0.00% 2 Missing ⚠️
server/datastore/mysql/disk_encryption.go 33.33% 2 Missing ⚠️
... and 14 more
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #40350    +/-   ##
========================================
  Coverage   66.27%   66.28%            
========================================
  Files        2459     2459            
  Lines      196694   197047   +353     
  Branches     8715     8715            
========================================
+ Hits       130364   130603   +239     
- Misses      54516    54623   +107     
- Partials    11814    11821     +7     
Flag Coverage Δ
backend 68.14% <66.83%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@getvictor getvictor merged commit ccc36a9 into main Feb 24, 2026
45 checks passed
@getvictor getvictor deleted the victor/40054-slog-mysql branch February 24, 2026 22:52
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.

slog migration (2)

3 participants