Skip to content

TestShop: Add IsRunMode check for database key#9522

Merged
davidfowl merged 1 commit into
mainfrom
damianedwards/testshop-runmodecheck
May 27, 2025
Merged

TestShop: Add IsRunMode check for database key#9522
davidfowl merged 1 commit into
mainfrom
damianedwards/testshop-runmodecheck

Conversation

@DamianEdwards

Copy link
Copy Markdown
Member

Addressing #9503 (comment)

Copilot AI review requested due to automatic review settings May 27, 2025 14:44
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 27, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an additional check for run mode before providing a database reset key, addressing the discussed concern in the linked conversation.

  • Added a condition to require builder.ExecutionContext.IsRunMode along with development mode.

.WithReference(catalogDb);

if (builder.Environment.IsDevelopment())
if (builder.Environment.IsDevelopment() && builder.ExecutionContext.IsRunMode)

Copilot AI May 27, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief comment above this condition explaining why the IsRunMode flag is required along with the IsDevelopment check to aid future maintainers.

Copilot uses AI. Check for mistakes.
@davidfowl
davidfowl merged commit 8cf393d into main May 27, 2025
@davidfowl
davidfowl deleted the damianedwards/testshop-runmodecheck branch May 27, 2025 15:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants