Skip to content

Update dev-server data import to reflect runtime import quirks - #6257

Merged
peterwald merged 1 commit into
dotnet:mainfrom
peterwald:default-dev-import
Apr 7, 2025
Merged

Update dev-server data import to reflect runtime import quirks#6257
peterwald merged 1 commit into
dotnet:mainfrom
peterwald:default-dev-import

Conversation

@peterwald

@peterwaldpeterwald commented Apr 7, 2025

Copy link
Copy Markdown
Member

Update for #6252

The previously noted bug only occurs in the local development server. It is caused by the fact that we use runtime import() to bring in the data from a json file in the local folder. import() assumes we are importing code and treats it as a module, creating a module namespace object. This causes the data to be duplicated under a default key.

In this PR we update the dev code to reference the data loaded into the default import, which normalizes the data structure.

Microsoft Reviewers: Open in CodeFlow

@peterwald
peterwald requested a review from a team as a code ownerApril 7, 2025 18:01
@peterwaldpeterwald self-assigned this Apr 7, 2025
@peterwaldpeterwald added the area-ai-eval Microsoft.Extensions.AI.Evaluation and related label Apr 7, 2025
@peterwald
peterwald merged commit 05f8b26 into dotnet:mainApr 7, 2025
@peterwald
peterwald deleted the default-dev-import branch April 7, 2025 19:03
@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 8, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai-evalMicrosoft.Extensions.AI.Evaluation and related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@peterwald@shyamnamboodiripad