Scoped labels (scope::value) that survive blueprint sync, plus label inheritance from sites
#3978
strausmann
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Extend the existing resource/site labels with:
scope::value(e.g.platform::php,platform_version::8.4.2,location::dc-a), rendered like GitLab scoped labels (two-part badge), with at most one value per scope on the same object.blueprint/manual), so a blueprint sync only replaces the label assignments it owns and keeps labels added in the UI/API.Motivation
Labels are a great way to group resources, but today they can't be used as a reliable grouping key when resources come from Docker-label blueprints:
syncResourceLabels()(server/lib/blueprints/labels.ts) deletes all label assignments of a resource and re-inserts only the blueprint's list. Any label added in the UI disappears on the next sync (same class of problem as Blueprint overwriting non configured settings #2197).I ran into this during PHP2Shell (CVE-2026-109618 / CVE-2026-109619): I wanted to find and restrict every PHP application behind Pangolin at once, and labels were the obvious grouping key — but labels I added in the UI were gone after the next sync. This is the building block for #3979 (label-scoped access policies), but it is useful on its own for filtering and overview, as requested in #1414.
Proposed Solution
::is a scoped label. UI rendersscopeandvalueas a two-part badge. Settingplatform_version::8.4.27on a resource replaces an existingplatform_version::*on the same resource (GitLab semantics).origincolumn toresourceLabels/siteLabels(blueprint|manual). Blueprint sync deletes/re-inserts only rows withorigin = blueprint. Removing a label in the UI never writes back to the blueprint. Existing rows can be migrated asblueprintwhen the resource is blueprint-managed, otherwisemanual.resource:<scope>::<value>andsite:<scope>::<value>, so an inherited value never conflicts with an own value. Storage stays as today; people writing blueprints still write plainscope::value.labelslist filters accept scoped labels and the namespaced form.Alternatives Considered
platform-php) — works for display, but can't express version ranges or "one value per scope", and still loses UI-added labels on sync.Additional Context
devsource; I reviewed and edited it.All reactions