Skip to content

facts: omit blank OS strings#960

Open
dominic-r wants to merge 1 commit into
mainfrom
sdko/omit-empty-os-facts
Open

facts: omit blank OS strings#960
dominic-r wants to merge 1 commit into
mainfrom
sdko/omit-empty-os-facts

Conversation

@dominic-r
Copy link
Copy Markdown
Member

@dominic-r dominic-r commented Jun 1, 2026

Summary

Omit optional OS fact strings when platform cannot report a non-empty value.

This follows up on 3179a52 / #949: OS version extraction was improved there, but a remaining empty result was still wrapped with api.PtrString(""). Because the generated API client only omits nil pointers, that serialized as "version": "" during agent check-in.

Related

This fixes the blank OS version producer-side issue seen by authentik endpoint e2e tests. The separate authentik proxy e2e CI fix is goauthentik/authentik#22770.

Validation

  • go test ./pkg/platform/facts/os
  • go test ./pkg/platform/facts/...
  • git diff --check

@dominic-r dominic-r self-assigned this Jun 1, 2026
dominic-r added a commit to goauthentik/authentik that referenced this pull request Jun 1, 2026
Bind proxy e2e containers to per-test host ports and clean up stopped labelled containers so CI runner port collisions do not cascade across tests.

Endpoint e2e blank OS version failures are fixed in goauthentik/platform#960.

Agent-thread: https://sdko.org/internal/threads/019e808d-fc02-7182-bf00-c3912c0ece92

A7k-product: product

A7k-product-repo: 1

Co-authored-by: Agent <agent@svc.sdko.net>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.10%. Comparing base (1ae84b7) to head (48f6153).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #960      +/-   ##
==========================================
- Coverage   38.21%   38.10%   -0.12%     
==========================================
  Files         227      227              
  Lines        8412     8418       +6     
==========================================
- Hits         3215     3208       -7     
- Misses       4812     4824      +12     
- Partials      385      386       +1     
Flag Coverage Δ
go-e2e 45.63% <100.00%> (-0.18%) ⬇️
go-integration 17.59% <100.00%> (+0.07%) ⬆️
go-macos-26 15.91% <100.00%> (+0.07%) ⬆️
go-ubuntu-24.04 15.56% <100.00%> (+0.07%) ⬆️
go-ubuntu-24.04-arm 15.19% <100.00%> (+0.07%) ⬆️
go-windows-2025 15.24% <100.00%> (+0.07%) ⬆️
swift 3.40% <ø> (ø)

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.

Only set optional OS name and version facts when platform can report a non-empty value, so generated API requests omit unknown values instead of sending blank strings.

Agent-thread: https://sdko.org/internal/threads/019e808d-fc02-7182-bf00-c3912c0ece92

A7k-product: platform

Co-authored-by: Agent <agent@svc.sdko.net>
@dominic-r dominic-r force-pushed the sdko/omit-empty-os-facts branch from 7b72148 to 48f6153 Compare June 1, 2026 00:43
@dominic-r dominic-r requested a review from BeryJu June 1, 2026 00:44
@authentik-automation
Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-960--authentik-pkg.netlify.app

@authentik-automation authentik-automation Bot temporarily deployed to pull request June 1, 2026 00:55 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant