Facts/os: avoid blank linux os.version on rolling releases#834
Open
asger-weirsoee wants to merge 1 commit intogoauthentik:mainfrom
Open
Facts/os: avoid blank linux os.version on rolling releases#834asger-weirsoee wants to merge 1 commit intogoauthentik:mainfrom
asger-weirsoee wants to merge 1 commit intogoauthentik:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #834 +/- ##
===========================================
+ Coverage 16.58% 38.08% +21.50%
===========================================
Files 204 203 -1
Lines 6827 6968 +141
===========================================
+ Hits 1132 2654 +1522
+ Misses 5553 3980 -1573
- Partials 142 334 +192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to os-release(5)
PRETTY_NAME=
A pretty operating system name in a format suitable for presentation to the user. May or may not contain a release code name or OS version of some kind, as suitable. If not set, a default of "PRETTY_NAME="Linux"" may be used
So, version is not guaranteed to be present in PRETTY_NAME, and parsing a version from it can legitimately result in an empty value on rolling-release distributions.
This means that the entire check-in request is rejected because os.version is present but blank
The endpoint requires a value if version is sent, so the agent should either: