Skip to content

GitOps labels: Using name when name has spaces or special characters doesn't work for label assignment #28104

@allenhouchins

Description

@allenhouchins

Fleet version: 4.66

Web browser and operating system: Any


💥  Actual behavior

The list of host identifiers (hardware_serial, uuid, osquery_host_id, hostname, or name) the label will apply to.

https://github.com/fleetdm/fleet/blob/main/it-and-security/lib/all/labels/santa-test-devices.yml

- name: Santa test devices
  description: Macs testing santa
  label_membership_type: manual
  hosts:
    - "Allen's MacBook Pro"

🧑‍💻  Steps to reproduce

  1. Create a label via gitops that is static and assign it to a host by name (ex: Allen's MacBook Pro)
  2. Observe the label does not get assigned in the UI
  3. Assign the host via serial number or value that doesn't contain spaces or special characters
  4. Observe the label gets assigned as expected

🕯️ More info (optional)

Image Image

🛠️ To fix

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product group:productProduct Design department (shows up on 🦢 Drafting board)bugSomething isn't working as documented~released bugThis bug was found in a stable release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions