Repository navigation
WQL arrays: document the rendering, keep rows whose properties are all empty (#201) - #204
Conversation
…empty arrays WinRM's XML carries no type information: a one-element array is identical to a scalar and an empty array is left out of the response (checked on Windows Server 2022, with both the SELECT * and the explicit-property response shapes). Only a CIM GetClass request could tell arrays apart, and it costs one more request per class and fails on 2008 R2 — not worth it to add a trailing "|". wmi-java drops its trailing separator instead, and the connectors that relied on it are fixed. Closes #201 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c130b8abc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
WinRM leaves an empty or NULL array out of the response, so selecting only such a property yields instances with no property element, and the parser dropped them: SELECT IPSecPermitTCPPorts FROM Win32_NetworkAdapterConfiguration returned no rows on tc-win2022, where WMI returns one per adapter. Every instance is now a row (2 rows on that host), on which string() returns null for the property. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex please review again |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ac378c666
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
WinRM leaves out an empty or NULL array (checked again on tc-win2022: adapter 0's NULL DefaultIPGateway, IPAddress, ... are absent, not xsi:nil), so rows can carry different property sets. Taking the names from the first row only lost their case when that row was empty (and the legacy executor's case-sensitive lookup then missed the later values), and with SELECT * it hid IPAddress & co. from the columns of every row. The test fixture that showed a NULL array as xsi:nil now uses a scalar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex please review again |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #201. That issue proposed adding a trailing separator to WQL array values (
a|b|) to match wmi-java. That turned out not to be implementable reliably, so the alignment goes the other way: wmi-java drops its trailing separator.Why winrm-java can't add the trailing separator
WinRM's XML has no type information. On Windows Server 2022, with both the
SELECT *(p:Win32_OperatingSystem) and the explicit-property (w:XmlFragment) response shapes:<MUILanguages>fr-FR</MUILanguages>(a one-elementstring[]) is identical to<Caption>…</Caption>.IPSecPermitTCPPortsonWin32_NetworkAdapterConfiguration), while a NULL isxsi:nil.msftwinrm:UsePreciseArrayschanges nothing on the WMI plugin's resource URI.Only a CIM GetClass request (
cim-xml/2/cim-schema/2/*with__cimnamespaceandClassNameselectors) reportsPROPERTY.ARRAY. It works on 2016 and 2022, but the resource URI doesn't exist on 2008 R2, and it costs one more request per class. Not worth it for a trailing pipe.What changes
wql.mdand theWqlRowJavadoc. There's no trailing separator, a one-element array reads like a scalar, and an empty or NULL array is left out of the response (sostring()returnsnull).SELECT IPSecPermitTCPPorts FROM Win32_NetworkAdapterConfigurationreturned no rows on tc-win2022, where WMI returns one per adapter. Every instance is now a row; the PR adds a test and a CHANGELOG entry.WqlResult.columns()used to read the property names of the first row only. A leading empty row then lost the names' case, and withSELECT *an adapter without IP configuration hidIPAddressandDefaultIPGatewayfrom the columns of every row. It now reads the names of every row.a|b,a, and an empty string for an empty array.|, and WinStorageSpaces' predicted failure never fired over WMI.3|. Without it the connector wasn't detected, controllers were dropped, and absent batteries were no longer excluded.null, which crashes regex filters. It's now an empty string, like the WMI extension.Tests
mvn verifypasses.🤖 Generated with Claude Code