Skip to content

add linux platform option to labels - #41892

Closed
kc9wwh wants to merge 7 commits into
mainfrom
25659-add-linux-platform-to-labels
Closed

add linux platform option to labels#41892
kc9wwh wants to merge 7 commits into
mainfrom
25659-add-linux-platform-to-labels

Conversation

@kc9wwh

@kc9wwh kc9wwh commented Mar 17, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #25659

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes. See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell meta characters.

Testing

For unreleased bug fixes in a release candidate, one of:

  • Confirmed that the fix is not expected to adversely impact load test results

@codecov

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.79%. Comparing base (be3b02d) to head (97b69e8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/labels.go 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #41892      +/-   ##
==========================================
+ Coverage   66.76%   66.79%   +0.03%     
==========================================
  Files        2637     2637              
  Lines      212186   212101      -85     
  Branches     9518     9399     -119     
==========================================
+ Hits       141658   141680      +22     
+ Misses      57680    57559     -121     
- Partials    12848    12862      +14     
Flag Coverage Δ
backend 68.56% <84.61%> (+0.03%) ⬆️
frontend 54.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kc9wwh

kc9wwh commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

Manual tests

  • ✅ Frontend label creation via UI
  • ✅ Create label via the API
└ $ curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:8412/api/latest/fleet/labels -d '{"name":"QA linux label","query":"select 1","platform":"linux"}'
{
  "label": {
    "created_at": "2026-03-18T18:48:55Z",
    "updated_at": "2026-03-18T18:48:55Z",
    "id": 20,
    "author_id": 1,
    "name": "QA linux label",
    "description": "",
    "query": "select 1",
    "platform": "linux",
    "label_type": "regular",
    "label_membership_type": "dynamic",
    "team_id": null,
    "display_text": "QA linux label",
    "count": 0,
    "fleet_id": null
  }
}
  • ✅ Confirm invalid platform still rejected
└ $ curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:8412/api/latest/fleet/labels -d '{"name":"bad platform","query":"select 1","platform":"bados"}'
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "platform",
      "reason": "invalid platform: bados"
    }
  ],
  "uuid": "a40d63e6-8a31-44e6-abc3-f0696963f748"
}
  • ✅ Valid label specs
└ $ curl -sk -X POST -H "Authorization: Bearer $TOKEN" https://localhost:8412/api/latest/fleet/spec/labels -d '{"specs":[{"name":"spec linux","query":"select 1","platform":"linux","label_membership_type":"dynamic"}]}'
{}
  • ✅ Enroll linux Ubuntu host, confirm matches both platform=linux and platform=ubuntu labels

@rachaelshaw

Copy link
Copy Markdown
Member

@kc9wwh I see the connected issue was put to the side in the most recent feature fest; I agree we should add support for this, but it's hard to see where this could fit into a sprint in the near future. I'd say keep bringing it back to feature fest so we can grab it once there's room to prioritize it.

Resolve conflict in integration_core_test.go: use main's renamed
fleet.DeleteLabelByIDResponse type while keeping the branch's
additional delete-by-id call for linuxLbl.
@noahtalerman

Copy link
Copy Markdown
Member

Hey @rachaelshaw I think let's take this one. Can you please help us file a story for it?

@rachaelshaw

Copy link
Copy Markdown
Member

@noahtalerman #44088

@lucasmrod

Copy link
Copy Markdown
Member

Hi @kc9wwh! Closing in favor of #50270 (with the added product feedback, see story and Figma).

@lucasmrod lucasmrod closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent UI: missing "Linux"

4 participants