Skip to content

Commit 4b11a4d

Browse files
authored
Merge pull request #5006 from dfe-analytical-services/bugfix/EES-5256-2
EES-5256 Opt-out of OPENJSON subquery transformation in time periods query and revert #5002
2 parents 6cd5aae + 1e831f7 commit 4b11a4d

File tree

20 files changed

+46
-41
lines changed

20 files changed

+46
-41
lines changed

src/GovUk.Education.ExploreEducationStatistics.Admin.Tests/GovUk.Education.ExploreEducationStatistics.Admin.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<PrivateAssets>all</PrivateAssets>
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3232
</PackageReference>
33-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
3434
</ItemGroup>
3535

3636
<ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Admin/GovUk.Education.ExploreEducationStatistics.Admin.csproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626

2727
<ItemGroup>
2828
<PackageReference Include="AspectInjector" Version="2.8.2" PrivateAssets="all" />
29-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3" PrivateAssets="all" />
29+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4" PrivateAssets="all" />
3030
<PackageReference Include="GovukNotify" Version="7.0.0" />
3131
<PackageReference Include="HtmlAgilityPack" Version="1.11.61" />
3232
<PackageReference Include="JsonKnownTypes" Version="0.6.0" />
3333
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
34-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
35-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.3" />
36-
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.3" />
37-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.3" />
38-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.3" />
34+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
35+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.4" />
36+
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.4" />
37+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.4" />
38+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.4" />
3939
<PackageReference Include="Microsoft.Azure.SignalR" Version="1.25.2" />
4040
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.2.3" />
41-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
42-
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.3" />
41+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
42+
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.4" />
4343
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
4444
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
4545
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />

src/GovUk.Education.ExploreEducationStatistics.Common.Tests/GovUk.Education.ExploreEducationStatistics.Common.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ItemGroup>
1515
<PackageReference Include="AspectInjector" Version="2.8.2" />
1616
<PackageReference Include="Bogus" Version="35.5.1" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" PrivateAssets="all" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" PrivateAssets="all" />
1818
<PackageReference Include="CompareNETObjects" Version="4.83.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
2020
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />

src/GovUk.Education.ExploreEducationStatistics.Common/GovUk.Education.ExploreEducationStatistics.Common.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
<PackageReference Include="InterpolatedSql" Version="2.3.0" />
2828
<PackageReference Include="Medo.Uuid7" Version="1.9.1" />
2929
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
30-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
30+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
3131
<!-- TODO EES-4202 DataMovement depends on deprecated Microsoft.Azure.Storage.Blob SDK v11 -->
3232
<PackageReference Include="Microsoft.Azure.Storage.DataMovement" Version="2.0.4" />
3333
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
34-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
35-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
34+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" />
35+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
3636
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
3737
<PackageReference Include="Namotion.Reflection" Version="3.1.1" />
3838
<PackageReference Include="NCrontab.Signed" Version="3.3.3" />

src/GovUk.Education.ExploreEducationStatistics.Content.Api.Tests/GovUk.Education.ExploreEducationStatistics.Content.Api.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ItemGroup>
1515
<PackageReference Include="AspectInjector" Version="2.8.2" />
1616
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1919
<PackageReference Include="Moq" Version="4.20.70" />
2020
<PackageReference Include="MockQueryable.Moq" Version="7.0.1" />

src/GovUk.Education.ExploreEducationStatistics.Content.Api/GovUk.Education.ExploreEducationStatistics.Content.Api.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<PackageReference Include="AspectInjector" Version="2.8.2" PrivateAssets="all" />
1717
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
1818
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.2.3" />
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
20-
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.3" />
21-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
20+
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.4" />
21+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
2222
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
2323
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
2424
</ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Content.Model.Tests/GovUk.Education.ExploreEducationStatistics.Content.Model.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
18-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
18+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
1919
<PackageReference Include="xunit" Version="2.7.1" />
2020
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
2121
<PrivateAssets>all</PrivateAssets>

src/GovUk.Education.ExploreEducationStatistics.Content.Model/GovUk.Education.ExploreEducationStatistics.Content.Model.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="JsonKnownTypes" Version="0.6.0" />
14-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
1515
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
1616
</ItemGroup>
1717

src/GovUk.Education.ExploreEducationStatistics.Content.Security.Tests/GovUk.Education.ExploreEducationStatistics.Content.Security.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PrivateAssets>all</PrivateAssets>
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
</PackageReference>
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
2323
</ItemGroup>
2424

2525
<ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Content.Security/GovUk.Education.ExploreEducationStatistics.Content.Security.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.3" />
14+
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.4" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Data.Api/GovUk.Education.ExploreEducationStatistics.Data.Api.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
<ItemGroup>
2020
<PackageReference Include="AspectInjector" Version="2.8.2" PrivateAssets="all" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3" PrivateAssets="all" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4" PrivateAssets="all" />
2222
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
23-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
24-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
25-
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.3" />
23+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
24+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
25+
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.4" />
2626
<PackageReference Include="NWebsec.AspNetCore.Middleware" Version="3.0.0" />
2727
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
2828
<PackageReference Include="Thinktecture.EntityFrameworkCore.SqlServer" Version="8.1.1" />

src/GovUk.Education.ExploreEducationStatistics.Data.Model.Tests/GovUk.Education.ExploreEducationStatistics.Data.Model.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1717
<PackageReference Include="Moq" Version="4.20.70" />
1818
<PackageReference Include="xunit" Version="2.7.1" />

src/GovUk.Education.ExploreEducationStatistics.Data.Model/GovUk.Education.ExploreEducationStatistics.Data.Model.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
1515
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
1616
<PackageReference Include="Thinktecture.EntityFrameworkCore.BulkOperations" Version="8.1.1" />
1717
</ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Data.Processor.Tests/GovUk.Education.ExploreEducationStatistics.Data.Processor.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1818
<PackageReference Include="Moq" Version="4.20.70" />
1919
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />

src/GovUk.Education.ExploreEducationStatistics.Data.Services.Tests/GovUk.Education.ExploreEducationStatistics.Data.Services.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
1818
<PackageReference Include="Moq" Version="4.20.70" />
1919
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />

src/GovUk.Education.ExploreEducationStatistics.Data.Services/GovUk.Education.ExploreEducationStatistics.Data.Services.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ItemGroup>
1414
<PackageReference Include="CsvHelper" Version="31.0.4" />
1515
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
16-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.3" />
16+
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.4" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/GovUk.Education.ExploreEducationStatistics.Data.Services/SubjectMetaService.cs

+10-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ private enum SubjectMetaQueryStep
5656
GetFilterItems
5757
}
5858

59-
public async Task<Either<ActionResult, SubjectMetaViewModel>> GetSubjectMeta(Guid releaseVersionId,
59+
public async Task<Either<ActionResult, SubjectMetaViewModel>> GetSubjectMeta(
60+
Guid releaseVersionId,
6061
Guid subjectId)
6162
{
6263
return await releaseSubjectService.Find(subjectId: subjectId,
@@ -85,7 +86,8 @@ public async Task<Either<ActionResult, SubjectMetaViewModel>> GetSubjectMeta(Rel
8586
});
8687
}
8788

88-
public async Task<Either<ActionResult, SubjectMetaViewModel>> FilterSubjectMeta(Guid? releaseVersionId,
89+
public async Task<Either<ActionResult, SubjectMetaViewModel>> FilterSubjectMeta(
90+
Guid? releaseVersionId,
8991
ObservationQueryContext query,
9092
CancellationToken cancellationToken)
9193
{
@@ -181,7 +183,9 @@ private async Task<SubjectMetaViewModel> GetSubjectMetaViewModelFromQuery(
181183
var observations = statisticsDbContext
182184
.Observation
183185
.AsNoTracking()
184-
.Where(o => o.SubjectId == query.SubjectId && query.LocationIds.Contains(o.LocationId));
186+
.Where(o =>
187+
o.SubjectId == query.SubjectId &&
188+
EF.Constant(query.LocationIds).Contains(o.LocationId));
185189

186190
var timePeriods = await GetTimePeriods(observations);
187191

@@ -369,11 +373,12 @@ private static Either<ActionResult, Unit> AssertCollectionsAreSameIgnoringOrder<
369373
return AssertCollectionsAreSameIgnoringOrder(firstIdList, secondIdList, error);
370374
}
371375

372-
private static Either<ActionResult, Unit> AssertCollectionsAreSameIgnoringOrder<T>(IEnumerable<T> first,
376+
private static Either<ActionResult, Unit> AssertCollectionsAreSameIgnoringOrder<T>(
377+
IEnumerable<T> first,
373378
IEnumerable<T> second,
374379
ValidationErrorMessages error) where T : IComparable
375380
{
376-
if(ComparerUtils.SequencesAreEqualIgnoringOrder(first, second))
381+
if (ComparerUtils.SequencesAreEqualIgnoringOrder(first, second))
377382
{
378383
return Unit.Instance;
379384
}

src/GovUk.Education.ExploreEducationStatistics.Public.Data.Api/GovUk.Education.ExploreEducationStatistics.Public.Data.Api.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
<PackageReference Include="InterpolatedSql.Dapper" Version="2.3.0" />
3030
<PackageReference Include="MicroElements.Swashbuckle.FluentValidation" Version="6.0.0" />
3131
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
32-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
33-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
32+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
3434
<PrivateAssets>all</PrivateAssets>
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
37-
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.3" />
37+
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.4" />
3838
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
3939
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.3.8" />
4040
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />

src/GovUk.Education.ExploreEducationStatistics.Public.Data.Model/GovUk.Education.ExploreEducationStatistics.Public.Data.Model.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<PackageReference Include="DuckDB.NET.Data.Full" Version="0.10.2" />
1919
<PackageReference Include="InterpolatedSql.Dapper" Version="2.3.0" />
2020
<PackageReference Include="linq2db.EntityFrameworkCore" Version="8.1.0" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
21+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>

src/GovUk.Education.ExploreEducationStatistics.Publisher.Tests/GovUk.Education.ExploreEducationStatistics.Publisher.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<PrivateAssets>all</PrivateAssets>
2323
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2424
</PackageReference>
25-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
25+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
2626
</ItemGroup>
2727

2828
<ItemGroup>

0 commit comments

Comments
 (0)