Repository navigation
[release/17.0] Rename the WithTags trait from Aspire_Dashboard_Tag to Aspire_Tag - #22013
Mitch Denny (mitchdenny) wants to merge 1 commit into
Conversation
…1881) ## Description Renames the reserved trait used by `WithTags` from `Aspire_Dashboard_Tag` to `Aspire_Tag`. AppHost tags aren't dashboard-only. The CLI backchannel adds traits to resource snapshots the same way the dashboard does, so `aspire describe --format json` already includes them: ```json "properties": { "resource.trait.Aspire_Tag": ["frontend", "critical"] } ``` With the old name, tools reading that output had to know a dashboard-scoped name for something that isn't dashboard-specific, and the method name (`WithTags`) and the trait name didn't match in scope. ### What changed - `KnownResourceTraits.DashboardTag = "Aspire_Dashboard_Tag"` → `KnownResourceTraits.Tag = "Aspire_Tag"`, with a comment explaining the naming. - The `Aspire_` prefix stays so the reserved name can't collide with user traits added through `WithTrait` (a bare `tag` would pick up tag validation and dashboard tag behavior). - `Aspire_Dashboard_Position` / `WithDashboardPosition` are unchanged: only the dashboard uses a position, so the name matches the scope. - The `TraitAnnotation` validation message now says "Tags must…" instead of "Dashboard tags must…". - `docs/specs/dashboard-persistence.md` uses the new name, says that the tags appear in `aspire describe`, and no longer says that user-added tags live in the settings database (they're in browser local storage since #21840). - The resource string key `ResourceTraitDashboardTags` keeps its name. Renaming it would mean editing the resx and Designer files and regenerating the `.xlf` files, and users never see the key. ### Reviewer notes - **No compatibility shim.** The trait was added in #21412 and isn't in any release tag yet, so nothing shipped reads the old name. ### Validation - `Aspire.Hosting.Tests` (`ResourceTraitBuilderTests`, `DashboardServiceDataTerminalTests`): 16 passed. - `Aspire.Dashboard.Tests` (`ResourceTagStoreTests`): 20 passed. - `Aspire.Dashboard.Components.Tests` (`ResourcesLayoutTests`, `ResourceDetailsTests`): 168 passed. - `Aspire.Dashboard.Playwright.Tests` builds. Its tests weren't run locally. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No Co-authored-by: Sébastien Ros <1165805+sebastienros@users.noreply.github.com> (cherry picked from commit 09f1aba)
This comment has been minimized.
This comment has been minimized.
|
Approved for inclusion in release/17.0. Do not merge yet. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
6bcb5b1 to
41488e0
Compare
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22013Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22013" |
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
41488e0 to
6bcb5b1
Compare
6bcb5b1 to
41488e0
Compare
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
41488e0 to
6bcb5b1
Compare
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Backport of #21881 to
release/17.0(cherry-picked from 09f1aba with no modifications). Layer 16 of 55 in the release/17.0 backport stack; stacked on #22012.Backport recommendation: Yes — WithTags trait name is new in 17.0; renaming after release would be breaking.
Backport of #21881
Checklist
<remarks />and<code />elements on your triple slash comments?