Skip to content

Conversation

presztak
Copy link
Collaborator

Currently, in a non-clustered environment, validation fails when the value of the --columns flag includes any phrase containing 'L', because we check whether the 'L' shorthand (for Location) is present, which isn't allowed in such environments.

However, users can also specify custom column keys, like:
--columns devices:uwe-work.source:LOCATION
In this case, validation incorrectly fails because the phrase contains 'L', even though it refers to a config/device key, not a shorthand.

This PR fixes the issue by improving the validation logic:

  • Each column entry is now evaluated individually.
  • If an entry contains a dot (.), it’s treated as a config/device key, not a shorthand. The Location shorthand check is skipped for such entries.

Fixes: #2279

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak presztak marked this pull request as ready for review July 18, 2025 09:53
@presztak presztak requested a review from stgraber as a code owner July 18, 2025 09:53
@stgraber stgraber enabled auto-merge July 18, 2025 15:52
@stgraber stgraber disabled auto-merge July 18, 2025 16:44
@stgraber stgraber merged commit 162803a into lxc:main Jul 18, 2025
68 of 72 checks passed
@presztak presztak deleted the ls_columns_fails branch July 28, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

incus ls --columns fails for some column header names
2 participants