Skip to content

TECH_DEBT: Remove duplicate index creation - #1814

Closed
smailliwcs wants to merge 1 commit into
devfrom
user/steven.williams/fix-duplicate-index
Closed

TECH_DEBT: Remove duplicate index creation#1814
smailliwcs wants to merge 1 commit into
devfrom
user/steven.williams/fix-duplicate-index

Conversation

@smailliwcs

@smailliwcs smailliwcs commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The index created as ux_generated_template_versions_scenario_hash in the GeneratedTemplateCacheVersionStore constructor is already created as idx_scenarioKey_templateSetHash in MongoIndexManager.

Summary by CodeRabbit

  • Bug Fixes
    • Improved template cache persistence compatibility by removing automatic creation of a MongoDB index during initialization.

🧑‍🔬 Unit Testing

  • Coverage: 0.0%

The index created as `ux_generated_template_versions_scenario_hash` in
the `GeneratedTemplateCacheVersionStore` constructor is already created
as `idx_scenarioKey_templateSetHash` in `MongoIndexManager`.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change removes constructor-time creation of the unique MongoDB index on ScenarioKey and TemplateSetHash. Document models and version-binding behavior remain unchanged.

Changes

Template cache persistence

Layer / File(s) Summary
Remove constructor index creation
DotNet/Automation.UI/Services/Persistence/GeneratedTemplateCacheVersionStore.cs
The constructor no longer creates the named unique ScenarioKey/TemplateSetHash index.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main change but omits the required Testing Performed and Documentation Updated sections and the unit-test checkbox. Add the required Testing Performed and Documentation Updated sections, and complete the Unit Testing checklist with applicable coverage details.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the removal of duplicate index creation, which is the main change.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch user/steven.williams/fix-duplicate-index

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@smailliwcs

Copy link
Copy Markdown
Contributor Author

Resolved in #1815.

@smailliwcs smailliwcs closed this Aug 12, 2026
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