Skip to content

Auto-merge forward rel-10.7 → dev - #26283

Merged
voloagent merged 4 commits into
devfrom
auto-merge-forward/rel-10.7-to-dev-86
Oct 14, 2026
Merged

voloagent merged 4 commits into
devfrom
auto-merge-forward/rel-10.7-to-dev-86

Conversation

@voloagent

Copy link
Copy Markdown
Contributor

Automated forward merge of rel-10.7 into dev.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 05:56
@voloagent
voloagent merged commit 02f17d5 into dev Oct 14, 2026
2 checks passed
@voloagent
voloagent deleted the auto-merge-forward/rel-10.7-to-dev-86 branch October 14, 2026 05:56
Copilot stopped reviewing on behalf of voloagent due to an error October 14, 2026 05:56

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.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

7 open findings
What changed in this PR

Updates ABP’s EF Core compiled-query cache key behavior to improve reuse across tenants, with accompanying tests and documentation explaining when tenant-specific cache keys are still required.

Changes:

  • Changed AbpDbContext.GetCompiledQueryCacheKey() to exclude tenant id and only include global filter states.
  • Added new EF Core test modules/DbContexts/entities validating compiled query reuse and tenant-dependent translation scenarios.
  • Updated migration guide and data-filtering docs to explain the behavioral change and recommended overrides.
File Description
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​TenantDependentTranslation_Tests.cs Adds regression test for tenant-isolated cache keys when custom translation embeds tenant into SQL.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​TenantDependentTranslationTestRow.cs Adds entity used by tenant-dependent translation tests.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​TenantDependentTranslationTestModule.cs Adds test module wiring/seeding for tenant-dependent translation scenario.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​TenantDependentTranslationTestDbContext.cs Adds DbContext with a translated DbFunction and tenant-aware cache key override.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​QueryCompilationCounter.cs Adds helper to count EF query compilation events.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCache_WithoutDbFunction_Tests.cs Adds coverage for behavior when DbFunction mapping is disabled.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCache_Tests.cs Adds coverage for behavior when DbFunction mapping is enabled.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestRow.cs Adds entity used by compiled-query cache tests.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestModuleWithoutDbFunction.cs Adds test module variant without DbFunction mapping.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestModuleBase.cs Adds shared EF setup, seeding, and compilation-count logging for tests.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestModule.cs Adds test module variant with DbFunction mapping.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestDbContext.cs Adds DbContext used by compiled-query cache tests.
framework/​test/​Volo.Abp.EntityFrameworkCore.Tests/​Volo/​Abp/​EntityFrameworkCore/​DataFiltering/​CompiledQueryCache/​CompiledQueryCacheTestBase.cs Adds the main test logic validating cache key reuse across tenants/filter states.
framework/​src/​Volo.Abp.EntityFrameworkCore/​Volo/​Abp/​EntityFrameworkCore/​AbpDbContext.cs Changes the default compiled-query cache key to exclude tenant id.
docs/​en/​release-info/​migration-guides/​abp-10-7.md Documents the change and how to opt-in to tenant-specific cache keying for custom translations.
docs/​en/​framework/​infrastructure/​data-filtering.md Updates guidance around HasTranslation and cache key composition.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Configure<AbpDbContextOptions>(options => options.Configure(configuration =>
{
configuration.UseSqlite();
configuration.DbContextOptions.UseLoggerFactory(null);
dbContext.Database.ExecuteSqlInterpolated(
$@"INSERT INTO Rows (Id, TenantId, IsDeleted, Name)
VALUES ({Guid.NewGuid()}, {row.TenantId}, {row.Deleted}, {row.Name})");
}
dbContext.Database.ExecuteSqlInterpolated(
$@"INSERT INTO CustomTranslationRows (Id, OwnerTenantId, Name)
VALUES ({Guid.NewGuid()}, {row.OwnerTenantId}, {row.Name})");
}

public class CompiledQueryCacheTestDbContext : AbpDbContext<CompiledQueryCacheTestDbContext>
{
public DbSet<CompiledQueryCacheTestRow> Rows { get; set; }
};

private readonly AbpUnitTestSqliteDatabase _database = new();
private ServiceProvider _efServiceProvider;
{
public Guid? TenantId { get; set; }
public bool IsDeleted { get; set; }
public string Name { get; set; }
var queryTag = Guid.NewGuid().ToString();
var counter = GetRequiredService<QueryCompilationCounter>();
var before = counter.Count;
IModel sharedModel = null;
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.34364% with 290 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.41%. Comparing base (387c131) to head (d7989bc).
⚠️ Report is 19 commits behind head on dev.

Files with missing lines Patch % Lines
...g/CompiledQueryCache/CompiledQueryCacheTestBase.cs 0.00% 111 Missing ⚠️
...iledQueryCache/TenantDependentTranslation_Tests.cs 0.00% 53 Missing ⚠️
...iledQueryCache/CompiledQueryCacheTestModuleBase.cs 0.00% 51 Missing ⚠️
...ryCache/TenantDependentTranslationTestDbContext.cs 0.00% 34 Missing ⚠️
...QueryCache/TenantDependentTranslationTestModule.cs 0.00% 24 Missing ⚠️
...piledQueryCache/CompiledQueryCacheTestDbContext.cs 0.00% 4 Missing ⚠️
...ring/CompiledQueryCache/QueryCompilationCounter.cs 0.00% 4 Missing ⚠️
...ng/CompiledQueryCache/CompiledQueryCacheTestRow.cs 0.00% 3 Missing ⚠️
...ledQueryCache/TenantDependentTranslationTestRow.cs 0.00% 2 Missing ⚠️
...CompiledQueryCache/CompiledQueryCacheTestModule.cs 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #26283      +/-   ##
==========================================
- Coverage   50.50%   50.41%   -0.10%     
==========================================
  Files        3845     3858      +13     
  Lines      136106   136396     +290     
  Branches    10342    10369      +27     
==========================================
+ Hits        68745    68763      +18     
- Misses      65301    65562     +261     
- Partials     2060     2071      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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