Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Gateways): update package, increase cache timout #987

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Extensions/FormAnswersExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static class FormAnswersExtensions
public static List<PageAnswers> GetReducedAnswers(this FormAnswers answer, FormSchema schema)
=> RecursivelyReduceAnswers(
answer.Pages,
answer.Pages.SelectMany(_ => _.Answers).ToDictionary(x => x.QuestionId, x => x.Response),
answer.Pages?.SelectMany(_ => _.Answers).ToDictionary(x => x.QuestionId, x => x.Response),
schema.Pages,
!String.IsNullOrEmpty(answer.Path) && answer.Path.Equals(FileUploadConstants.DOCUMENT_UPLOAD_URL_PATH) ? answer.Path : schema.FirstPageSlug,
new List<PageAnswers>());
Expand All @@ -22,7 +22,7 @@ private static List<PageAnswers> RecursivelyReduceAnswers(
List<PageAnswers> reducedAnswers)
{
var page = new Page();
var currentAnswer = answers.Find(_ => _.PageSlug.Equals(currentPageSlug));
var currentAnswer = answers?.Find(_ => _.PageSlug.Equals(currentPageSlug));
if (currentAnswer is null)
return reducedAnswers;

Expand Down
4 changes: 2 additions & 2 deletions src/Utils/Startup/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,13 @@
{ storageProviderConfiguration["Address"] ?? "127.0.0.1", 6379}
},
ClientName = storageProviderConfiguration["InstanceName"] ?? Assembly.GetEntryAssembly()?.GetName().Name,
SyncTimeout = 30000,
AsyncTimeout = 30000
SyncTimeout = 60000,
AsyncTimeout = 60000
};
});

var redis = ConnectionMultiplexer.Connect(storageProviderConfiguration["Address"]);
redis.IncludePerformanceCountersInExceptions = true;

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'

Check warning on line 568 in src/Utils/Startup/ServiceCollectionExtensions.cs

View workflow job for this annotation

GitHub Actions / build

'ConnectionMultiplexer.IncludePerformanceCountersInExceptions' is obsolete: 'Please use ConfigurationOptions.IncludePerformanceCountersInExceptions instead - this will be removed in 3.0.'
services.AddDataProtection().PersistKeysToStackExchangeRedis(redis, $"{storageProviderConfiguration["InstanceName"]}DataProtection-Keys");
break;

Expand Down
2 changes: 1 addition & 1 deletion src/form-builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PackageReference Include="StockportGovUK.AspNetCore.Attributes.TokenAuthentication" Version="1.1.0" />
<PackageReference Include="StockportGovUK.AspNetCore.Logging.Elasticsearch.Aws" Version="2.0.0" />
<PackageReference Include="StockportGovUK.AspNetCore.Middleware.ExceptionHandling" Version="2.0.2" />
<PackageReference Include="StockportGovUK.NetStandard.Gateways" Version="14.3.0" />
<PackageReference Include="StockportGovUK.NetStandard.Gateways" Version="14.4.0-prerelease-361" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/form-builder-tests-unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="128.0.6613.13700" />
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="StackExchange.Redis" Version="2.8.16" />
<PackageReference Include="StockportGovUK.NetStandard.Gateways" Version="14.3.0" />
<PackageReference Include="StockportGovUK.NetStandard.Gateways" Version="14.4.0-prerelease-361" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading