Materialize Endpoints set in HostResourceWithEndpoints#17091
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a concurrent-modification crash in ContainerCreator.CreateContainerNetworkServicesForHostResource (issue #17083) by materializing the EndpointAnnotation enumerable captured in HostResourceWithEndpoints at construction time, so later enumerations don't re-read the (potentially mutating) resource.Annotations collection.
Changes:
- Materialize the LINQ-filtered endpoints to an array via
ToArray()before storing. - Replace
Any()check withLength > 0on the materialized array.
|
Are we backporting ths @karolz-ms ? |
yep |
|
/backport to release/13.3 |
|
Are there anymore spots where we may have concurrency issues? |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17091Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17091" |
|
Started backporting to |
Can't think of anything else at this point... |
9fbfd0c to
59f3b15
Compare
|
🎬 CLI E2E Test Recordings — 82 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25882088799 |
|
✅ No documentation update needed. docs_optional → No signals triggered ( |
Prevents #17083
Checklist
<remarks />and<code />elements on your triple slash comments?