Fix predefined saved view synchronization#2364
Conversation
2a2d6ed to
e11b2d8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e11b2d8f29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25f0172621
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d3a059857
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| public required string UserId { get; init; } | ||
|
|
||
| public string UniqueIdentifier => nameof(ForcePredefinedSavedViewsWorkItem); |
There was a problem hiding this comment.
Use a per-run identifier for force updates
Because the work-item queue is configured with WorkItemDuplicateDetectionQueueBehavior using a 24-hour duplicate window, giving every force update the same UniqueIdentifier makes later admin requests look like duplicates. If an admin queues a force update, then fixes or replaces the predefined saved-view definitions and tries to force-update again within 24 hours, the second job can be deduplicated instead of applying the corrected definitions; use a per-run value or include the definitions hash when this operation must be repeatable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in ac45cc6. Each Force Update work item now has a persisted per-run GUID that is part of its queue deduplication key, so a subsequent admin request can queue another update immediately. Added a focused regression test for distinct run identifiers.
Summary
Why
Organizations created before a predefined-view update were not receiving safe updates. Customized views must remain protected, while the queued force update provides an explicit recovery path.
Impact
Adds a protected force-update endpoint and Svelte system-page action. No breaking API changes.
Validation
dotnet build tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-restore -v:minimaldotnet test --project tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-build --no-restore -- --filter-class Exceptionless.Tests.Controllers.SavedViewControllerTests(98 passed)dotnet test --project tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-build --no-restore -- --filter-class Exceptionless.Tests.Controllers.OpenApiControllerTests(3 passed)npm run checkinsrc/Exceptionless.Web/ClientApp