Skip to content

Fix predefined saved view synchronization#2364

Open
ejsmith wants to merge 6 commits into
mainfrom
issue/predefined-saved-view-sync
Open

Fix predefined saved view synchronization#2364
ejsmith wants to merge 6 commits into
mainfrom
issue/predefined-saved-view-sync

Conversation

@ejsmith

@ejsmith ejsmith commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Store a normalized baseline hash for predefined saved views and safely sync unchanged or reverted organization views after system definitions change.
  • Add a global-admin, confirmation-gated background force update for existing organization-wide saved views with matching predefined keys.

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:minimal
  • dotnet 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 check in src/Exceptionless.Web/ClientApp

@ejsmith ejsmith force-pushed the issue/predefined-saved-view-sync branch from 2a2d6ed to e11b2d8 Compare July 10, 2026 20:12
@ejsmith ejsmith marked this pull request as ready for review July 10, 2026 20:52
@ejsmith

ejsmith commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/Exceptionless.Core/Seed/PredefinedSavedViewContentHasher.cs Outdated
Comment thread src/Exceptionless.Web/Controllers/SavedViewController.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/Exceptionless.Core/Repositories/SavedViewRepository.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.AppHost 39% 41% 136
Exceptionless.Core 72% 64% 8854
Exceptionless.Insulation 24% 23% 205
Exceptionless.Web 79% 67% 5264
Summary 73% (17447 / 24029) 64% (8953 / 13914) 14459

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.

1 participant