Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Windows grains include extraneous empty strings #66936

Open
4 of 9 tasks
nf-brentsaner opened this issue Sep 29, 2024 · 0 comments
Open
4 of 9 tasks

[BUG] Windows grains include extraneous empty strings #66936

nf-brentsaner opened this issue Sep 29, 2024 · 0 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@nf-brentsaner
Copy link

Description
Aside from being weirdly divergent from other grains in their construction (e.g. on Windows, osrelease_info should probably be a split form of osversion), osrelease_info has extra empty strings.

Setup
N/A

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap .MSI to install

Steps to Reproduce the behavior

# salt --out=json 'WIN*' grains.items | grep -Ev '^jid:' | jq '.[] | with_entries(if (.key|test("^(os|lsb)")) then ( {key: .key, value: .value } ) else empty end )'
{
  "os": "Windows",
  "os_family": "Windows",
  "osfullname": "Microsoft Windows Server 2022 Standard",
  "osmanufacturer": "Microsoft Corporation",
  "osrelease": "2022Server",
  "osversion": "10.0.20348",
  "osservicepack": null,
  "osrelease_info": [
    2022,
    ""
  ],
  "osfinger": "Windows-2022Server"
}
{
  "os": "Windows",
  "os_family": "Windows",
  "osfullname": "Microsoft Windows Server 2019 Standard",
  "osmanufacturer": "Microsoft Corporation",
  "osrelease": "2019Server",
  "osversion": "10.0.17763",
  "osservicepack": null,
  "osrelease_info": [
    2019,
    ""
  ],
  "osfinger": "Windows-2019Server"
}

Expected behavior
osrelease_info should not have an empty second element.

Screenshots
N/A

Versions Report
N/A

Additional context
N/A

@nf-brentsaner nf-brentsaner added Bug broken, incorrect, or confusing behavior needs-triage labels Sep 29, 2024
@twangboy twangboy self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants