Skip to content

Commit 393f151

Browse files
authored
fix: Increase migration job timeout (#1985)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Related Issue(s) - #1650 ## Verification - [ ] **Your** code builds clean without any errors or warnings - [ ] Manual testing done (required) - [ ] Relevant automated test added (if you find this hard, leave it and we'll help out) ## Documentation - [ ] Documentation is updated (either in `docs`-directory, Altinnpedia or a separate linked PR in [altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if applicable)
1 parent 7b80aa8 commit 393f151

File tree

7 files changed

+13
-2
lines changed

7 files changed

+13
-2
lines changed

.azure/applications/web-api-migration-job/main.bicep

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ param containerAppEnvironmentName string
2222
@secure()
2323
param environmentKeyVaultName string
2424

25+
@description('The replica timeout for the job in seconds')
26+
param replicaTimeOutInSeconds int
27+
2528
var namePrefix = 'dp-be-${environment}'
2629
var baseImageUrl = 'ghcr.io/altinn/dialogporten-'
2730
var tags = {
@@ -73,6 +76,7 @@ module migrationJob '../../modules/containerAppJob/main.bicep' = {
7376
secrets: secrets
7477
tags: tags
7578
userAssignedIdentityId: managedIdentity.id
79+
replicaTimeOutInSeconds: replicaTimeOutInSeconds
7680
}
7781
}
7882

.azure/applications/web-api-migration-job/prod.bicepparam

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using './main.bicep'
33
param environment = 'prod'
44
param location = 'norwayeast'
55
param imageTag = readEnvironmentVariable('IMAGE_TAG')
6+
param replicaTimeOutInSeconds = 36000
67

78
//secrets
89
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')

.azure/applications/web-api-migration-job/staging.bicepparam

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using './main.bicep'
33
param environment = 'staging'
44
param location = 'norwayeast'
55
param imageTag = readEnvironmentVariable('IMAGE_TAG')
6+
param replicaTimeOutInSeconds = 36000
67

78
//secrets
89
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')

.azure/applications/web-api-migration-job/test.bicepparam

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using './main.bicep'
33
param environment = 'test'
44
param location = 'norwayeast'
55
param imageTag = readEnvironmentVariable('IMAGE_TAG')
6+
param replicaTimeOutInSeconds = 36000
67

78
//secrets
89
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')

.azure/applications/web-api-migration-job/yt01.bicepparam

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using './main.bicep'
33
param environment = 'yt01'
44
param location = 'norwayeast'
55
param imageTag = readEnvironmentVariable('IMAGE_TAG')
6+
param replicaTimeOutInSeconds = 36000
67

78
//secrets
89
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')

.azure/modules/containerAppJob/main.bicep

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ param args string = ''
2929
@minLength(1)
3030
param userAssignedIdentityId string
3131

32+
@description('The replica timeout for the job in seconds')
33+
param replicaTimeOutInSeconds int
34+
3235
var isScheduled = !empty(cronExpression)
3336

3437
var scheduledJobProperties = {
@@ -64,7 +67,7 @@ resource job 'Microsoft.App/jobs@2024-03-01' = {
6467
{
6568
secrets: secrets
6669
replicaRetryLimit: 1
67-
replicaTimeout: 120
70+
replicaTimeout: replicaTimeOutInSeconds
6871
},
6972
isScheduled ? scheduledJobProperties : manualJobProperties
7073
)

src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/DialogDbContextModelSnapshot.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <auto-generated />
1+
// <auto-generated />
22
using System;
33
using Digdir.Domain.Dialogporten.Infrastructure.Persistence;
44
using Microsoft.EntityFrameworkCore;

0 commit comments

Comments
 (0)