Skip to content

Rename API members per API review feedback#38188

Merged
AndriySvyryd merged 3 commits intomainfrom
copilot/rename-bulk-execution-enabled
Apr 30, 2026
Merged

Rename API members per API review feedback#38188
AndriySvyryd merged 3 commits intomainfrom
copilot/rename-bulk-execution-enabled

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

Part of #37993

Batch of API renames from API review.

  • CosmosDbContextOptionsBuilder.BulkExecutionEnabledBulkExecutionAllowed
  • ModelSnapshot.LatestMigrationIdLastMigrationId
  • ProviderMismatchEventData.CompiledProviderNameMismatchedProviderName
  • JsonPathStructuredJsonPath; JsonPathSegmentStructuredJsonPathSegment (moved to Microsoft.EntityFrameworkCore.Metadata namespace)
  • JsonPath.OrdinalsIndices

CoreStrings resource InvalidJsonPathOrdinalCount renamed to InvalidStructuredJsonPathIndexCount accordingly. All baseline JSON files updated. All API baseline tests (14/14) pass.

Copilot AI and others added 2 commits April 25, 2026 04:26
… JsonPath, JsonPathSegment, and Ordinals per API review

Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/56ecc586-e9c8-4c70-8a17-fbcaaed4a258

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…er rename

Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/56ecc586-e9c8-4c70-8a17-fbcaaed4a258

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

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 applies a set of public API renames based on API review feedback across EFCore, EFCore.Relational, and EFCore.Cosmos, updating all usages, tests, and API baseline JSON accordingly.

Changes:

  • Renames Cosmos bulk execution option APIs (BulkExecutionEnabledBulkExecutionAllowed) and updates Cosmos tests/baselines.
  • Renames migrations snapshot API (LatestMigrationIdLastMigrationId) and updates generator/tests.
  • Renames compiled-model mismatch event payload member (CompiledProviderNameMismatchedProviderName) and updates logging/baseline.
  • Renames JSON path APIs (JsonPathStructuredJsonPath, JsonPathSegmentStructuredJsonPathSegment, OrdinalsIndices), moves the segment type to Microsoft.EntityFrameworkCore.Metadata, and updates CoreStrings resource + baselines + tests.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/EFCore.Tests/Infrastructure/StructuredJsonPathTest.cs Adds coverage for StructuredJsonPath/StructuredJsonPathSegment string formatting and basic behaviors.
test/EFCore.Tests/Infrastructure/JsonPathTest.cs Removes tests for the old JsonPath/JsonPathSegment APIs.
test/EFCore.SqlServer.HierarchyId.Tests/TestModels/Migrations/TypedArraySeedContext.cs Updates generated snapshot override to LastMigrationId.
test/EFCore.SqlServer.HierarchyId.Tests/TestModels/Migrations/AnonymousArraySeedContext.cs Updates generated snapshot override to LastMigrationId.
test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.ModelSnapshot.cs Updates assertions to LastMigrationId and validates generated snapshot code.
test/EFCore.Design.Tests/Design/OperationExecutorTest.cs Updates embedded snapshot code to LastMigrationId.
test/EFCore.Cosmos.Tests/Extensions/CosmosDbContextOptionsExtensionsTests.cs Updates Cosmos options builder test to BulkExecutionAllowed.
test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkWarningTest.cs Updates functional test configuration to BulkExecutionAllowed.
test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkExecutionTest.cs Updates functional tests to use BulkExecutionAllowed.
test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkEndToEndTestNoBatching.cs Updates configuration to BulkExecutionAllowed.
test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkEndToEndTest.cs Updates configuration to BulkExecutionAllowed.
test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkConcurrencyTest.cs Updates configuration to BulkExecutionAllowed.
src/EFCore/Properties/CoreStrings.resx Renames JSON-path count resource key/message to indices terminology.
src/EFCore/Properties/CoreStrings.Designer.cs Updates generated accessor to InvalidStructuredJsonPathIndexCount.
src/EFCore/EFCore.baseline.json Updates API baseline entries for renamed CoreStrings and diagnostics event data.
src/EFCore/Diagnostics/ProviderMismatchEventData.cs Renames payload property/ctor parameter to MismatchedProviderName.
src/EFCore/Diagnostics/CoreLoggerExtensions.cs Uses MismatchedProviderName when generating the mismatch log message.
src/EFCore.Relational/Update/ModificationCommand.cs Switches JSON path construction to StructuredJsonPath.
src/EFCore.Relational/Update/IColumnModification.cs Updates JsonPath property type to StructuredJsonPath?.
src/EFCore.Relational/Update/ColumnModificationParameters.cs Updates JsonPath property/ctor parameter types to StructuredJsonPath.
src/EFCore.Relational/Update/ColumnModification.cs Updates JsonPath property type to StructuredJsonPath?.
src/EFCore.Relational/Metadata/StructuredJsonPathSegment.cs Renames/moves segment type to StructuredJsonPathSegment in Metadata namespace.
src/EFCore.Relational/Metadata/Internal/RelationalJsonObject.cs Updates child-path construction to use StructuredJsonPathSegment.
src/EFCore.Relational/Metadata/Internal/RelationalJsonElement.cs Updates path type and array placeholder segment to StructuredJsonPathSegment.Array.
src/EFCore.Relational/Metadata/IRelationalJsonElement.cs Updates Path type to IReadOnlyList<StructuredJsonPathSegment>.
src/EFCore.Relational/Infrastructure/StructuredJsonPath.cs Renames JsonPathStructuredJsonPath and OrdinalsIndices, updates validation message.
src/EFCore.Relational/Infrastructure/ModelSnapshot.cs Renames LatestMigrationIdLastMigrationId.
src/EFCore.Relational/EFCore.Relational.baseline.json Updates relational API baseline entries for StructuredJsonPath* and LastMigrationId.
src/EFCore.Design/Migrations/Design/CSharpMigrationsGenerator.cs Updates generated snapshot code to emit LastMigrationId.
src/EFCore.Cosmos/Infrastructure/Internal/CosmosDbOptionExtension.cs Renames internal extension method to BulkExecutionAllowed.
src/EFCore.Cosmos/Infrastructure/CosmosDbContextOptionsBuilder.cs Renames builder API to BulkExecutionAllowed.
src/EFCore.Cosmos/EFCore.Cosmos.baseline.json Updates Cosmos API baseline for BulkExecutionAllowed.
Files not reviewed (1)
  • src/EFCore/Properties/CoreStrings.Designer.cs: Language not supported

Comment thread src/EFCore.Relational/Update/ModificationCommand.cs Outdated
Copilot AI requested a review from AndriySvyryd April 29, 2026 01:48
@AndriySvyryd AndriySvyryd marked this pull request as ready for review April 29, 2026 01:49
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner April 29, 2026 01:49
Copilot AI review requested due to automatic review settings April 29, 2026 01:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • src/EFCore/Properties/CoreStrings.Designer.cs: Language not supported

@AndriySvyryd AndriySvyryd merged commit d86b520 into main Apr 30, 2026
31 of 33 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/rename-bulk-execution-enabled branch April 30, 2026 23:20
@github-actions github-actions Bot added the api-review This PR or issue is introducing public API changes that need to be reviewed label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

API review baseline changes for src/EFCore.Cosmos/EFCore.Cosmos.baseline.json

Show diff

The diff below was generated by ApiChief between the base and the PR.

  class Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder : Microsoft.EntityFrameworkCore.Infrastructure.ICosmosDbContextOptionsBuilderInfrastructure
- virtual CosmosDbContextOptionsBuilder BulkExecutionEnabled(bool enabled = true);
+ virtual CosmosDbContextOptionsBuilder BulkExecutionAllowed(bool enabled = true);

API review baseline changes for src/EFCore.Relational/EFCore.Relational.baseline.json

Show diff

The diff below was generated by ApiChief between the base and the PR.

- class Microsoft.EntityFrameworkCore.Infrastructure.JsonPath
- virtual bool IsRoot { get; }
- virtual int[] Ordinals { get; }
- static JsonPath Root { get; }
- virtual IReadOnlyList<JsonPathSegment> Segments { get; }
- virtual StringBuilder AppendTo(StringBuilder builder);
- JsonPath(IReadOnlyList<JsonPathSegment> segments, int[] ordinals);
- override string ToString();
- sealed class Microsoft.EntityFrameworkCore.Infrastructure.JsonPathSegment
- static JsonPathSegment Array { get; }
- bool IsArray { get; }
- string? PropertyName { get; }
- JsonPathSegment(string propertyName);
- override string ToString();
  abstract class Microsoft.EntityFrameworkCore.Infrastructure.ModelSnapshot
- virtual string? LatestMigrationId { get; }
+ virtual string? LastMigrationId { get; }
+ class Microsoft.EntityFrameworkCore.Infrastructure.StructuredJsonPath
+ virtual int[] Indices { get; }
+ virtual bool IsRoot { get; }
+ static StructuredJsonPath Root { get; }
+ virtual IReadOnlyList<StructuredJsonPathSegment> Segments { get; }
+ virtual StringBuilder AppendTo(StringBuilder builder);
+ StructuredJsonPath(IReadOnlyList<StructuredJsonPathSegment> segments, int[] indices);
+ override string ToString();
  interface Microsoft.EntityFrameworkCore.Metadata.IRelationalJsonElement
- IReadOnlyList<JsonPathSegment> Path { get; }
+ IReadOnlyList<StructuredJsonPathSegment> Path { get; }
+ sealed class Microsoft.EntityFrameworkCore.Metadata.StructuredJsonPathSegment
+ static StructuredJsonPathSegment Array { get; }
+ bool IsArray { get; }
+ string? PropertyName { get; }
+ StructuredJsonPathSegment(string propertyName);
+ override string ToString();
  class Microsoft.EntityFrameworkCore.Update.ColumnModification : Microsoft.EntityFrameworkCore.Update.IColumnModification
- virtual JsonPath? JsonPath { get; }
+ virtual StructuredJsonPath? JsonPath { get; }
  readonly class Microsoft.EntityFrameworkCore.Update.ColumnModificationParameters
- ColumnModificationParameters(string columnName, object? value, IProperty? property, string? columnType, RelationalTypeMapping? typeMapping, JsonPath jsonPath, bool read, bool write, bool key, bool condition, bool sensitiveLoggingEnabled, bool? isNullable = null);
+ ColumnModificationParameters(string columnName, object? value, IProperty? property, string? columnType, RelationalTypeMapping? typeMapping, StructuredJsonPath jsonPath, bool read, bool write, bool key, bool condition, bool sensitiveLoggingEnabled, bool? isNullable = null);
- JsonPath? JsonPath { get; init; }
+ StructuredJsonPath? JsonPath { get; init; }
  interface Microsoft.EntityFrameworkCore.Update.IColumnModification
- JsonPath? JsonPath { get; }
+ StructuredJsonPath? JsonPath { get; }

API review baseline changes for src/EFCore/EFCore.baseline.json

Show diff

The diff below was generated by ApiChief between the base and the PR.

  static class Microsoft.EntityFrameworkCore.Diagnostics.CoreStrings
- static string InvalidJsonPathOrdinalCount(object? ordinalsCount, object? arraySegmentCount);
+ static string ComplexPropertyChainIntermediateNotFound(object? member, object? type);
+ static string ComplexPropertyChainInvalidMember(object? member, object? type);
+ static string ComplexPropertyChainInvalidSegment(object? dottedName);
+ static string ComplexPropertyChainOnCollection(object? member, object? type);
+ static string InvalidMemberAccessChainExpression(object? expression);
+ static string InvalidStructuredJsonPathIndexCount(object? indicesCount, object? arraySegmentCount);
  class Microsoft.EntityFrameworkCore.Diagnostics.ProviderMismatchEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventData
- ProviderMismatchEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, string compiledProviderName, string currentProviderName);
+ ProviderMismatchEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, string mismatchedProviderName, string currentProviderName);
- virtual string CompiledProviderName { get; }
+ virtual string MismatchedProviderName { get; }

@AndriySvyryd AndriySvyryd removed the api-review This PR or issue is introducing public API changes that need to be reviewed label Apr 30, 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.

4 participants