Skip to content

Commit

Permalink
[DI-1353] DataImport v2.1 error saving DataMap with too many fields (…
Browse files Browse the repository at this point in the history
…field contrib) (#72)

* Apply change manually

* Add the config value to the appsetting and .env file. Use the env variable in the compose-build.yml file

* Revert format appsetting

* Add the interpolation for the new variable

* Revert dev.DockerFile in compose file
  • Loading branch information
jagudelo-gap authored Apr 22, 2024
1 parent bd709fc commit 71798c1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Compose/pgsql/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENCRYPTION_KEY=<base64-encoded 256-bit key>
TIME_ZONE=<US/Central>
USER_RECOVERY_TOKEN=<base64-encoded 256-bit key>

# NOTE: PostgreSql is supported by default. If SqlServer is used, then environment section of the dataimport container
# NOTE: PostgreSql is supported by default. If SqlServer is used, then environment section of the dataimport container
# within the docker compose file needs to be customized to have appropriate connection string
DATABASE_ENGINE=<PostgreSql or SqlServer>

Expand Down Expand Up @@ -41,3 +41,6 @@ DATABASE_ENGINE=<PostgreSql or SqlServer>
# EXTERNALPREPROCESSORS__ENABLED: "false"
# Uncomment to override process timeout (default 5000)
# EXTERNALPREPROCESSORS__TIMEOUTINMILLISECONDS: <amount>

# This will allow a web Form to contain more than the default limit of 1024 values.
# FORMOPTIONS__VALUECOUNTLIMIT: <amount>
1 change: 1 addition & 0 deletions Compose/pgsql/compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
APPSETTINGS__ENCRYPTIONKEY: "${ENCRYPTION_KEY}"
APPSETTINGS__USERRECOVERYTOKEN: "${USER_RECOVERY_TOKEN}"
APPSETTINGS__SHARENAME: "${APPSETTINGS__SHARENAME:-/app/Common/temp}"
FORMOPTIONS__VALUECOUNTLIMIT: "${FORMOPTIONS__VALUECOUNTLIMIT:-1024}"
TZ: "${TIME_ZONE:-US/Central}"
depends_on:
- pb-dataimport
Expand Down
3 changes: 2 additions & 1 deletion DataImport.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using DataImport.Web.Middleware;
using Microsoft.AspNetCore.Http.Features;

namespace DataImport.Web
{
Expand Down Expand Up @@ -71,7 +72,7 @@ public void ConfigureServices(IServiceCollection services)
services.Configure<ConnectionStrings>(Configuration.GetSection("ConnectionStrings"));
services.Configure<ExternalPreprocessorOptions>(_configuration.GetSection("ExternalPreprocessors"));
services.AddSingleton<ITempDataProvider, CookieTempDataProvider>();
services.AddSingleton<Microsoft.Extensions.Logging.ILogger>(sp => sp.GetService<ILogger<NoLoggingCategoryPlaceHolder>>());
services.Configure<FormOptions>(Configuration.GetSection("FormOptions")); services.AddSingleton<Microsoft.Extensions.Logging.ILogger>(sp => sp.GetService<ILogger<NoLoggingCategoryPlaceHolder>>());
services.AddTransient<IFileSettings>(sp => sp.GetService<IOptions<AppSettings>>().Value);
services.AddTransient<IPowerShellPreprocessSettings>(sp => sp.GetService<IOptions<AppSettings>>().Value);
services.AddTransient<IEncryptionKeySettings>(sp => sp.GetService<IOptions<AppSettings>>().Value);
Expand Down
12 changes: 8 additions & 4 deletions DataImport.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
"defaultConnection": "Data Source=(local);Initial Catalog=EdFi_DataImport;Trusted_Connection=True",
"storageConnection": "UseDevelopmentStorage=true"
},
"ExternalPreprocessors": {
"Enabled": false,
"TimeOutInMilliseconds": 5000
}
"ExternalPreprocessors": {
"Enabled": false,
"TimeOutInMilliseconds": 5000
}
,
"FormOptions": {
"ValueCountLimit": 1024
}
}

0 comments on commit 71798c1

Please sign in to comment.