From 3892e342b3fa63e37fc05fa5586241f32475e66f Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Dec 2024 09:24:04 +0100
Subject: [PATCH 01/30] chore(deps): update nginx docker tag to v1.27.3 (#1581)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| nginx | patch | `1.27.2` -> `1.27.3` |
---
### Configuration
π
**Schedule**: Branch creation - "before 7am on Sunday,before 7am on
Wednesday" (UTC), Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/digdir/dialogporten).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
docker-compose.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docker-compose.yml b/docker-compose.yml
index f8b605880..f2a7ec59f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,7 +4,7 @@ include:
services:
dialogporten-webapi-ingress:
- image: nginx:1.27.2
+ image: nginx:1.27.3
ports:
- "7214:80"
volumes:
@@ -38,7 +38,7 @@ services:
- ./.aspnet/https:/https
dialogporten-graphql-ingress:
- image: nginx:1.27.2
+ image: nginx:1.27.3
ports:
- "7215:80"
volumes:
From bd02745edd4914f82bd3be6e2639183ce66ae3fe Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Dec 2024 09:24:25 +0100
Subject: [PATCH 02/30] chore(deps): update dependency
bouncycastle.cryptography to 2.5.0 (#1582)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[BouncyCastle.Cryptography](https://www.bouncycastle.org/stable/nuget/csharp/website)
([source](https://redirect.github.com/bcgit/bc-csharp)) | `2.4.0` ->
`2.5.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/BouncyCastle.Cryptography/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/BouncyCastle.Cryptography/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/BouncyCastle.Cryptography/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/BouncyCastle.Cryptography/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
bcgit/bc-csharp (BouncyCastle.Cryptography)
###
[`v2.5.0`](https://redirect.github.com/bcgit/bc-csharp/compare/release-2.4.0...release-2.5.0)
[Compare
Source](https://redirect.github.com/bcgit/bc-csharp/compare/release-2.4.0...release-2.5.0)
---
### Configuration
π
**Schedule**: Branch creation - "before 7am on Sunday,before 7am on
Wednesday" (UTC), Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/digdir/dialogporten).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
.../Digdir.Tool.Dialogporten.Benchmarks.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Digdir.Tool.Dialogporten.Benchmarks/Digdir.Tool.Dialogporten.Benchmarks.csproj b/src/Digdir.Tool.Dialogporten.Benchmarks/Digdir.Tool.Dialogporten.Benchmarks.csproj
index 7a3ea8bd5..291f1a9dc 100644
--- a/src/Digdir.Tool.Dialogporten.Benchmarks/Digdir.Tool.Dialogporten.Benchmarks.csproj
+++ b/src/Digdir.Tool.Dialogporten.Benchmarks/Digdir.Tool.Dialogporten.Benchmarks.csproj
@@ -6,7 +6,7 @@
-
+
From f9c2c9d57bdcdbfeae7c984bb783f94db2048c29 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Dec 2024 09:24:52 +0100
Subject: [PATCH 03/30] chore(deps): update dependency fluentassertions to v7
(#1584)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [FluentAssertions](https://www.fluentassertions.com/)
([source](https://redirect.github.com/fluentassertions/fluentassertions))
| `6.12.2` -> `7.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/FluentAssertions/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/FluentAssertions/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/FluentAssertions/6.12.2/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/FluentAssertions/6.12.2/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
fluentassertions/fluentassertions (FluentAssertions)
###
[`v7.0.0`](https://redirect.github.com/fluentassertions/fluentassertions/releases/tag/7.0.0)
[Compare
Source](https://redirect.github.com/fluentassertions/fluentassertions/compare/6.12.2...7.0.0)
##### What's Changed
##### Breaking Changes
- Drop support for .NET Core 2.1, 3.0 and NSpec by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2835](https://redirect.github.com/fluentassertions/fluentassertions/pull/2835)
##### Fixes
- The expectation node identified as a cyclic reference is still
compared to the subject node using simple equality. by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2819](https://redirect.github.com/fluentassertions/fluentassertions/pull/2819)
- Fix support for write-only properties in BeEquivalentTo by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2836](https://redirect.github.com/fluentassertions/fluentassertions/pull/2836)
##### Documentation
- Fix minor syntax error in objectgraphs.md by
[@rklec](https://redirect.github.com/rklec) in
[https://github.com/fluentassertions/fluentassertions/pull/2847](https://redirect.github.com/fluentassertions/fluentassertions/pull/2847)
##### Others
- Use the same Qodana build pipeline as develop is using by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2809](https://redirect.github.com/fluentassertions/fluentassertions/pull/2809)
- Add section highlighting for better navigation by
[@sentemon](https://redirect.github.com/sentemon) in
[https://github.com/fluentassertions/fluentassertions/pull/2807](https://redirect.github.com/fluentassertions/fluentassertions/pull/2807)
- Bump all relevant dependencies by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2834](https://redirect.github.com/fluentassertions/fluentassertions/pull/2834)
- Changed references to the master branch to main by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2848](https://redirect.github.com/fluentassertions/fluentassertions/pull/2848)
- Missed two more references to master by
[@dennisdoomen](https://redirect.github.com/dennisdoomen) in
[https://github.com/fluentassertions/fluentassertions/pull/2849](https://redirect.github.com/fluentassertions/fluentassertions/pull/2849)
- Backport bump of `System.Configuration.ConfigurationManager` and
`System.Threading.Tasks.Extensions` by
[@jnyrup](https://redirect.github.com/jnyrup) in
[https://github.com/fluentassertions/fluentassertions/pull/2856](https://redirect.github.com/fluentassertions/fluentassertions/pull/2856)
##### New Contributors
- [@sentemon](https://redirect.github.com/sentemon) made their
first contribution in
[https://github.com/fluentassertions/fluentassertions/pull/2807](https://redirect.github.com/fluentassertions/fluentassertions/pull/2807)
- [@rklec](https://redirect.github.com/rklec) made their first
contribution in
[https://github.com/fluentassertions/fluentassertions/pull/2847](https://redirect.github.com/fluentassertions/fluentassertions/pull/2847)
**Full Changelog**:
https://github.com/fluentassertions/fluentassertions/compare/6.12.2...7.0.0
---
### Configuration
π
**Schedule**: Branch creation - "before 7am on Sunday,before 7am on
Wednesday" (UTC), Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/digdir/dialogporten).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
...dir.Domain.Dialogporten.Application.Integration.Tests.csproj | 2 +-
.../Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj | 2 +-
.../Digdir.Domain.Dialogporten.Architecture.Tests.csproj | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj b/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
index 8907b1cf5..06df06b6c 100644
--- a/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
+++ b/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj b/tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj
index f01c3c17c..002f7ea39 100644
--- a/tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj
+++ b/tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/Digdir.Domain.Dialogporten.Application.Unit.Tests.csproj
@@ -10,7 +10,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj b/tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj
index d400b3da9..c7b365548 100644
--- a/tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj
+++ b/tests/Digdir.Domain.Dialogporten.Architecture.Tests/Digdir.Domain.Dialogporten.Architecture.Tests.csproj
@@ -7,7 +7,7 @@
-
+
From 40dc4fb20eccbe866bef76522956c9cc0a984735 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Dec 2024 09:59:46 +0100
Subject: [PATCH 04/30] chore(deps): update dependency fastendpoints.swagger to
5.32.0 (#1583)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [FastEndpoints.Swagger](https://fast-endpoints.com/)
([source](https://redirect.github.com/FastEndpoints/FastEndpoints)) |
`5.31.0` -> `5.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/FastEndpoints.Swagger/5.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/FastEndpoints.Swagger/5.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/FastEndpoints.Swagger/5.31.0/5.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/FastEndpoints.Swagger/5.31.0/5.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Configuration
π
**Schedule**: Branch creation - "before 7am on Sunday,before 7am on
Wednesday" (UTC), Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/digdir/dialogporten).
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ole JΓΈrgen Skogstad
---
docs/schema/V1/swagger.verified.json | 9 +++++++++
.../Digdir.Domain.Dialogporten.WebApi.csproj | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json
index 01348f6fd..a58e21b95 100644
--- a/docs/schema/V1/swagger.verified.json
+++ b/docs/schema/V1/swagger.verified.json
@@ -5853,6 +5853,9 @@
},
"description": "The UUID of the created the dialog aggregate. A relative URL to the newly created activity is set in the \u0022Location\u0022 header."
},
+ "204": {
+ "description": "No Content"
+ },
"400": {
"content": {
"application/problem\u002Bjson": {
@@ -6468,6 +6471,9 @@
},
"description": "The UUID of the created the dialog activity. A relative URL to the newly created activity is set in the \u0022Location\u0022 header."
},
+ "204": {
+ "description": "No Content"
+ },
"400": {
"content": {
"application/problem\u002Bjson": {
@@ -6825,6 +6831,9 @@
},
"description": "The UUID of the created the dialog transmission. A relative URL to the newly created activity is set in the \u0022Location\u0022 header."
},
+ "204": {
+ "description": "No Content"
+ },
"400": {
"content": {
"application/problem\u002Bjson": {
diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj
index 6216ac381..2641131ac 100644
--- a/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj
+++ b/src/Digdir.Domain.Dialogporten.WebApi/Digdir.Domain.Dialogporten.WebApi.csproj
@@ -8,7 +8,7 @@
-
+
From e624fef167899b2997e3ac2ac85c253c3fa8786f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?=
Date: Wed, 11 Dec 2024 10:33:12 +0100
Subject: [PATCH 05/30] chore: Use correct database name for local Docker setup
(#1587)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
`dialogporten != Dialogporten`
Had some confusing moments in pgAdmin with dual databases π
---
.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.env b/.env
index cbd2e3101..8300930d6 100644
--- a/.env
+++ b/.env
@@ -1,7 +1,7 @@
# ENV variables for docker-compose
POSTGRES_USER=postgres
POSTGRES_PASSWORD=supersecret
-POSTGRES_DB=Dialogporten
+POSTGRES_DB=dialogporten
DB_CONNECTION_STRING=Server=dialogporten-postgres;Port=5432;Database=${POSTGRES_DB};User ID=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};
COMPOSE_PROJECT_NAME=digdir
From 6e88e0c13c089d0f4871be2ee95a7f74fb21a51c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?=
Date: Wed, 11 Dec 2024 13:44:32 +0100
Subject: [PATCH 06/30] fix(webapi): Set correct swagger return type for
transmission list (#1590)
## Description
## Related Issue(s)
- #1589
## 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)
---
docs/schema/V1/swagger.verified.json | 5 ++++-
.../Search/SearchDialogTransmissionEndpoint.cs | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json
index a58e21b95..e617e216e 100644
--- a/docs/schema/V1/swagger.verified.json
+++ b/docs/schema/V1/swagger.verified.json
@@ -6747,7 +6747,10 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission"
+ "items": {
+ "$ref": "#/components/schemas/V1ServiceOwnerDialogTransmissionsQueriesSearch_Transmission"
+ },
+ "type": "array"
}
}
},
diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/DialogTransmissions/Search/SearchDialogTransmissionEndpoint.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/DialogTransmissions/Search/SearchDialogTransmissionEndpoint.cs
index 06fb1aede..5af04f663 100644
--- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/DialogTransmissions/Search/SearchDialogTransmissionEndpoint.cs
+++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/DialogTransmissions/Search/SearchDialogTransmissionEndpoint.cs
@@ -22,7 +22,7 @@ public override void Configure()
Policies(AuthorizationPolicy.ServiceProvider);
Group();
- Description(b => b.ProducesOneOf(
+ Description(b => b.ProducesOneOf>(
StatusCodes.Status200OK,
StatusCodes.Status404NotFound,
StatusCodes.Status410Gone));
From bb4433bec905b4e95b46e72186c7250bb79ef646 Mon Sep 17 00:00:00 2001
From: Are Almaas
Date: Wed, 11 Dec 2024 15:12:28 +0100
Subject: [PATCH 07/30] ci: ensure bicep is upgraded (#1593)
## Description
## Related Issue(s)
- #{issue number}
## 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)
---
.azure/modules/redis/main.bicep | 3 ---
.azure/modules/serviceBus/main.bicep | 3 ---
.github/actions/azure-login/action.yml | 28 +++++++++++++++++++++
.github/workflows/workflow-deploy-apps.yml | 18 ++++++-------
.github/workflows/workflow-deploy-infra.yml | 9 ++-----
5 files changed, 37 insertions(+), 24 deletions(-)
create mode 100644 .github/actions/azure-login/action.yml
diff --git a/.azure/modules/redis/main.bicep b/.azure/modules/redis/main.bicep
index d6e873b18..80aa92885 100644
--- a/.azure/modules/redis/main.bicep
+++ b/.azure/modules/redis/main.bicep
@@ -97,9 +97,6 @@ module privateDnsZone '../privateDnsZone/main.bicep' = {
module privateDnsZoneGroup '../privateDnsZoneGroup/main.bicep' = {
name: '${namePrefix}-redis-privateDnsZoneGroup'
- dependsOn: [
- privateDnsZone
- ]
params: {
name: 'default'
dnsZoneGroupName: 'privatelink-redis-cache-windows-net'
diff --git a/.azure/modules/serviceBus/main.bicep b/.azure/modules/serviceBus/main.bicep
index 4c34d3a56..50ad8883b 100644
--- a/.azure/modules/serviceBus/main.bicep
+++ b/.azure/modules/serviceBus/main.bicep
@@ -83,9 +83,6 @@ module privateDnsZone '../privateDnsZone/main.bicep' = {
module privateDnsZoneGroup '../privateDnsZoneGroup/main.bicep' = {
name: '${namePrefix}-service-bus-privateDnsZoneGroup'
- dependsOn: [
- privateDnsZone
- ]
params: {
name: 'default'
dnsZoneGroupName: 'privatelink-servicebus-windows-net'
diff --git a/.github/actions/azure-login/action.yml b/.github/actions/azure-login/action.yml
new file mode 100644
index 000000000..5b8772979
--- /dev/null
+++ b/.github/actions/azure-login/action.yml
@@ -0,0 +1,28 @@
+name: 'Azure Login with Bicep Upgrade'
+description: 'Login to Azure and upgrade Bicep CLI'
+
+inputs:
+ client-id:
+ description: 'Azure Client ID'
+ required: true
+ tenant-id:
+ description: 'Azure Tenant ID'
+ required: true
+ subscription-id:
+ description: 'Azure Subscription ID'
+ required: true
+env:
+ AZ_CLI_VERSION: 2.67.0
+runs:
+ using: "composite"
+ steps:
+ - name: OIDC Login to Azure Public Cloud
+ uses: azure/login@v2
+ with:
+ client-id: ${{ inputs.client-id }}
+ tenant-id: ${{ inputs.tenant-id }}
+ subscription-id: ${{ inputs.subscription-id }}
+
+ - name: Upgrade Azure Bicep
+ shell: bash
+ run: az bicep upgrade
\ No newline at end of file
diff --git a/.github/workflows/workflow-deploy-apps.yml b/.github/workflows/workflow-deploy-apps.yml
index a45653ef2..26d66c2e8 100644
--- a/.github/workflows/workflow-deploy-apps.yml
+++ b/.github/workflows/workflow-deploy-apps.yml
@@ -1,6 +1,4 @@
ο»Ώname: Deploy apps
-env:
- AZ_CLI_VERSION: 2.67.0
on:
workflow_call:
outputs:
@@ -67,8 +65,8 @@ jobs:
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
- - name: OIDC Login to Azure Public Cloud
- uses: azure/login@v2
+ - name: Azure Login
+ uses: ./.github/actions/azure-login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
@@ -119,7 +117,6 @@ jobs:
uses: azure/CLI@v2
if: ${{!inputs.dryRun}}
with:
- azcliversion: ${{ env.AZ_CLI_VERSION }}
inlineScript: |
az containerapp job start -n ${{ steps.deploy.outputs.name }} -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -129,7 +126,6 @@ jobs:
id: verify-migration
timeout-minutes: 3
with:
- azcliversion: ${{ env.AZ_CLI_VERSION }}
inlineScript: |
./.github/tools/containerAppJobVerifier.sh ${{ steps.deploy.outputs.name }} ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} ${{ inputs.version }}
@@ -162,12 +158,13 @@ jobs:
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
- - name: OIDC Login to Azure Public Cloud
- uses: azure/login@v2
+ - name: Azure Login
+ uses: ./.github/actions/azure-login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
+
- name: Dryrun Deploy app ${{ matrix.name }}(${{ inputs.environment }})
uses: azure/arm-deploy@v2
if: ${{ inputs.dryRun }}
@@ -223,7 +220,6 @@ jobs:
id: verify-deployment
timeout-minutes: 3
with:
- azcliversion: ${{ env.AZ_CLI_VERSION }}
inlineScript: |
./.github/tools/revisionVerifier.sh ${{ steps.deploy.outputs.revisionName }} ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -252,8 +248,8 @@ jobs:
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
- - name: OIDC Login to Azure Public Cloud
- uses: azure/login@v2
+ - name: Azure Login
+ uses: ./.github/actions/azure-login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
diff --git a/.github/workflows/workflow-deploy-infra.yml b/.github/workflows/workflow-deploy-infra.yml
index cbc7ebca3..014a0db79 100644
--- a/.github/workflows/workflow-deploy-infra.yml
+++ b/.github/workflows/workflow-deploy-infra.yml
@@ -1,8 +1,4 @@
name: Deploy infrastructure
-
-env:
- AZ_CLI_VERSION: 2.67.0
-
on:
workflow_call:
secrets:
@@ -63,8 +59,8 @@ jobs:
with:
ref: ${{ inputs.ref }}
- - name: OIDC Login to Azure Public Cloud
- uses: azure/login@v2
+ - name: Azure Login
+ uses: ./.github/actions/azure-login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
@@ -74,7 +70,6 @@ jobs:
uses: azure/CLI@v2
id: keyvault-keys
with:
- azcliversion: ${{ env.AZ_CLI_VERSION }}
inlineScript: |
KEY_VAULT_KEYS=$(az keyvault secret list --vault-name ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }} --subscription ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }} --query "[].name" -o json | tr -d '\n')
echo "::set-output name=key-vault-keys::$KEY_VAULT_KEYS"
From 828851ec5682aac7b2f5efb5abca6b3e950339ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?=
Date: Thu, 12 Dec 2024 13:47:05 +0100
Subject: [PATCH 08/30] chore: Disable all Sonar duplicate detections (#1596)
Co-authored-by: Are Almaas
---
sonar-project.properties | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sonar-project.properties b/sonar-project.properties
index 5dc15fea4..dc4fd23e1 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -1,5 +1,5 @@
-# Disable code duplication detection for C# files
-sonar.cpd.exclusions=**/*.cs
+# Disable code duplication detection for C# and k6 files
+sonar.cpd.exclusions=**/*.cs,**/k6/**/*
# Disable all rules for auto-generated migration files
sonar.exclusions=**/Migrations/**/*
From f6f33d806b85f13476b4eb3a8a136c24b21947fa Mon Sep 17 00:00:00 2001
From: Dagfinn Olsen
Date: Thu, 12 Dec 2024 14:02:03 +0100
Subject: [PATCH 09/30] chore: add performance tests to ci-cd-yt01 workflow
(#1595)
Add performance tests and run these tests in ci-cd-yt01 workflow
## Description
## Related Issue(s)
#1540
- #{issue number}
## Verification
- [ ] **Your** code builds clean without any errors or warnings
- [x] 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)
---------
Co-authored-by: Are Almaas
---
.github/workflows/ci-cd-yt01.yml | 33 +++++++++++++++++++
.../workflows/workflow-run-k6-performance.yml | 13 ++++++--
.../enduser/enduserSearchWithThresholds.js | 28 ++++++++++++++++
.../enduser/performance/enduser-search.js | 16 ++++-----
tests/k6/tests/scripts/generate_tokens.sh | 23 +++++++++++--
.../createDialogWithThresholds.js | 12 +++++++
.../serviceOwnerSearchWithThresholds.js | 24 ++++++++++++++
7 files changed, 136 insertions(+), 13 deletions(-)
create mode 100644 tests/k6/tests/enduser/enduserSearchWithThresholds.js
create mode 100644 tests/k6/tests/serviceowner/createDialogWithThresholds.js
create mode 100644 tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js
diff --git a/.github/workflows/ci-cd-yt01.yml b/.github/workflows/ci-cd-yt01.yml
index 734ff03ed..af94c7f8f 100644
--- a/.github/workflows/ci-cd-yt01.yml
+++ b/.github/workflows/ci-cd-yt01.yml
@@ -140,6 +140,39 @@ jobs:
checks: write
pull-requests: write
+ run-performance:
+ name: "Run K6 performance tests"
+ # we want the performance tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests
+ if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasInfraChanges == 'true') }}
+ needs: [deploy-apps, deploy-infra, check-for-changes]
+ #needs: [deploy-apps, check-for-changes]
+ uses: ./.github/workflows/workflow-run-k6-performance.yml
+ secrets:
+ TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }}
+ TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }}
+ K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
+ K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
+
+ strategy:
+ max-parallel: 1
+ matrix:
+ files:
+ - tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js
+ - tests/k6/tests/serviceowner/createDialogWithThresholds.js
+ - tests/k6/tests/enduser/enduserSearchWithThresholds.js
+ fail-fast: false
+ with:
+ environment: yt01
+ apiVersion: v1
+ vus: 1
+ duration: 30s
+ tokens: both
+ numberOfTokens: 100
+ testSuitePath: ${{ matrix.files }}
+ permissions:
+ checks: write
+ pull-requests: write
+
send-slack-message-on-failure:
name: Send Slack message on failure
needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish]
diff --git a/.github/workflows/workflow-run-k6-performance.yml b/.github/workflows/workflow-run-k6-performance.yml
index 17ddcadf5..88a839e6c 100644
--- a/.github/workflows/workflow-run-k6-performance.yml
+++ b/.github/workflows/workflow-run-k6-performance.yml
@@ -21,6 +21,14 @@ on:
tokens:
required: true
type: string
+ numberOfTokens:
+ required: false
+ type: number
+ default: 0
+ ttl:
+ required: false
+ type: number
+ default: 3600
secrets:
TOKEN_GENERATOR_USERNAME:
required: true
@@ -45,9 +53,10 @@ jobs:
uses: grafana/setup-k6-action@v1
- name: Run K6 tests (${{ inputs.testSuitePath }})
run: |
- ./tests/k6/tests/scripts/generate_tokens.sh ./tests/k6/tests/performancetest_data ${{ inputs.tokens }}
+ ./tests/k6/tests/scripts/generate_tokens.sh ./tests/k6/tests/performancetest_data ${{ inputs.tokens }} ${{ inputs.numberOfTokens }} ${{ inputs.ttl }}
+ echo "Running k6 test suite ${{ inputs.testSuitePath }} with ${{ inputs.vus }} VUs for ${{ inputs.duration }}"
k6 run ${{ inputs.testSuitePath }} --quiet --log-output=stdout --include-system-env-vars \
- --vus=${{ inputs.vus }} --duration=${{ inputs.duration }} --out=cloud --out csv=./results.csv
+ --vus=${{ inputs.vus }} --duration=${{ inputs.duration }} --out csv=./results.csv
grep http_req_duration ./results.csv | sort --field-separator=',' --key=3 -nr | head -10
env:
API_ENVIRONMENT: ${{ inputs.environment }}
diff --git a/tests/k6/tests/enduser/enduserSearchWithThresholds.js b/tests/k6/tests/enduser/enduserSearchWithThresholds.js
new file mode 100644
index 000000000..eb2d3b6c1
--- /dev/null
+++ b/tests/k6/tests/enduser/enduserSearchWithThresholds.js
@@ -0,0 +1,28 @@
+import { default as run } from "./performance/enduser-search.js";
+
+export let options = {
+ summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
+ vus: 1,
+ duration: "30s",
+ thresholds: {
+ "http_req_duration{name:enduser search}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get dialog}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get dialog activities}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get dialog activity}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get seenlogs}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get transmissions}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get transmission}": ["p(95)<300", "p(99)<500"],
+ "http_req_duration{name:enduser get labellog}": ["p(95)<300", "p(99)<500"],
+ "http_reqs{name:enduser search}": [],
+ "http_reqs{name:enduser get dialog activities}": [],
+ "http_reqs{name:enduser get dialog activity}": [],
+ "http_reqs{name:enduser get seenlogs}": [],
+ "http_reqs{name:enduser get transmissions}": [],
+ "http_reqs{name:enduser get transmission}": [],
+ "http_reqs{name:enduser get dialog}": [],
+ "http_reqs{name:enduser get labellog}": [],
+ }
+}
+
+export default function (data) { run(data); }
+
diff --git a/tests/k6/tests/enduser/performance/enduser-search.js b/tests/k6/tests/enduser/performance/enduser-search.js
index 41f1b0d7c..90fd03737 100644
--- a/tests/k6/tests/enduser/performance/enduser-search.js
+++ b/tests/k6/tests/enduser/performance/enduser-search.js
@@ -8,14 +8,14 @@ const traceCalls = (__ENV.traceCalls ?? 'false') === 'true';
export let options = {
summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
thresholds: getDefaultThresholds(['http_req_duration', 'http_reqs'],['enduser search',
- 'get dialog',
- 'get dialog activities',
- 'get dialog activity',
- 'get seenlogs',
- 'get seenlog',
- 'get transmissions',
- 'get transmission',
- 'get labellog'
+ 'enduser get dialog',
+ 'enduser get dialog activities',
+ 'enduser get dialog activity',
+ 'enduser get seenlogs',
+ 'enduser get seenlog',
+ 'enduser get transmissions',
+ 'enduser get transmission',
+ 'enduser get labellog'
])
};
diff --git a/tests/k6/tests/scripts/generate_tokens.sh b/tests/k6/tests/scripts/generate_tokens.sh
index 4373de459..f9d39ab9a 100755
--- a/tests/k6/tests/scripts/generate_tokens.sh
+++ b/tests/k6/tests/scripts/generate_tokens.sh
@@ -11,11 +11,14 @@ usage() {
echo "Usage: $0 "
echo " : Path to the test data files"
echo " : Type of tokens to generate (both, enterprise, or personal)"
+ echo " : limit number of tokens to generate. 0 means generate all"
+ echo " : Time to live in seconds for the generated tokens"
+ echo "Example: $0 /path/to/testdata both 10 3600"
exit 1
}
# Validate arguments
-if [ $# -ne 2 ]; then
+if [ $# -ne 4 ]; then
usage
fi
@@ -37,6 +40,8 @@ esac
testdatafilepath=$1
tokens=$2
+limit=$3
+ttl=$4
# Validate tokens argument
if [[ ! "$tokens" =~ ^(both|enterprise|personal)$ ]]; then
@@ -55,9 +60,13 @@ if [ "$tokens" = "both" ] || [ "$tokens" = "enterprise" ]; then
exit 1
fi
echo "org,orgno,scopes,resource,token" > $serviceowner_tokenfile
+ generated=0
while IFS=, read -r org orgno scopes resource
do
- url="https://altinn-testtools-token-generator.azurewebsites.net/api/GetEnterpriseToken?org=$org&env=$env&orgno=$orgno&ttl=3600"
+ if [ $limit -gt 0 ] && [ $generated -ge $limit ]; then
+ break
+ fi
+ url="https://altinn-testtools-token-generator.azurewebsites.net/api/GetEnterpriseToken?org=$org&env=$env&orgno=$orgno&ttl=$ttl"
token=$(curl -s -f --get --data-urlencode "scopes=$scopes" $url -u "$tokengenuser:$tokengenpasswd" )
if [ $? -ne 0 ]; then
echo "Error: Failed to generate enterprise token for: $env, $org, $orgno, $scopes "
@@ -67,6 +76,8 @@ if [ "$tokens" = "both" ] || [ "$tokens" = "enterprise" ]; then
status=$?
if [ $status -ne 0 ]; then
echo "Error: Failed to write enterprise token to file for: $env, $org, $orgno, $scopes"
+ else
+ ((generated++))
fi
done < <(tail -n +2 $serviceowner_datafile)
fi
@@ -77,9 +88,13 @@ if [ "$tokens" = "both" ] || [ "$tokens" = "personal" ]; then
exit 1
fi
echo "ssn,resource,scopes,token" > $enduser_tokenfile
+ generated=0
while IFS=, read -r ssn resource scopes
do
- url="https://altinn-testtools-token-generator.azurewebsites.net/api/GetPersonalToken?env=$env&scopes=$scopes&pid=$ssn&ttl=3600"
+ if [ $limit -gt 0 ] && [ $generated -ge $limit ]; then
+ break
+ fi
+ url="https://altinn-testtools-token-generator.azurewebsites.net/api/GetPersonalToken?env=$env&scopes=$scopes&pid=$ssn&ttl=$ttl"
token=$(curl -s -f $url -u "$tokengenuser:$tokengenpasswd" )
if [ $? -ne 0 ]; then
echo "Error: Failed to generate personal token for: $ssn, $scopes "
@@ -89,6 +104,8 @@ if [ "$tokens" = "both" ] || [ "$tokens" = "personal" ]; then
status=$?
if [ $status -ne 0 ]; then
echo "Error: Failed to write personal token to file for: $ssn, $scopes"
+ else
+ ((generated++))
fi
done < <(tail -n +2 $enduser_datafile)
fi
diff --git a/tests/k6/tests/serviceowner/createDialogWithThresholds.js b/tests/k6/tests/serviceowner/createDialogWithThresholds.js
new file mode 100644
index 000000000..56b473244
--- /dev/null
+++ b/tests/k6/tests/serviceowner/createDialogWithThresholds.js
@@ -0,0 +1,12 @@
+import { default as run } from "./performance/create-dialog.js";
+
+export let options = {
+ summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
+ vus: 1,
+ duration: "30s",
+ thresholds: {
+ "http_req_duration": ["p(95)<300", "p(99)<500"],
+ }
+}
+
+export default function (data) { run(data); }
\ No newline at end of file
diff --git a/tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js b/tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js
new file mode 100644
index 000000000..ed0fac469
--- /dev/null
+++ b/tests/k6/tests/serviceowner/serviceOwnerSearchWithThresholds.js
@@ -0,0 +1,24 @@
+import { default as run } from "./performance/serviceowner-search.js";
+
+export let options = {
+ summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
+ vus: 1,
+ duration: "30s",
+ thresholds: {
+ "http_req_duration{name:serviceowner search}": ["p(95)<100", "p(99)<300"],
+ "http_req_duration{name:get dialog activities}": ["p(95)<100", "p(99)<300"],
+ "http_req_duration{name:get dialog activity}": ["p(95)<100", "p(99)<300"],
+ "http_req_duration{name:get seenlogs}": ["p(95)<100", "p(99)<300"],
+ "http_req_duration{name:get transmissions}": ["p(95)<100", "p(99)<300"],
+ "http_req_duration{name:get transmission}": ["p(95)<100", "p(99)<300"],
+ "http_reqs{name:get dialog activities}": [],
+ "http_reqs{name:get dialog activity}": [],
+ "http_reqs{name:get seenlogs}": [],
+ "http_reqs{name:get transmissions}": [],
+ "http_reqs{name:get transmission}": [],
+ "http_reqs{name:serviceowner search}": [],
+ }
+}
+
+export default function (data) { run(data); }
+
From b5133d7498aea30e65a3d978c0c6b8256675e8ea Mon Sep 17 00:00:00 2001
From: Dialogporten Automation Bot
<164321870+dialogporten-bot@users.noreply.github.com>
Date: Thu, 12 Dec 2024 14:06:51 +0100
Subject: [PATCH 10/30] chore(main): release 1.41.2 (#1591)
:robot: I have created a release *beep* *boop*
---
##
[1.41.2](https://github.com/digdir/dialogporten/compare/v1.41.1...v1.41.2)
(2024-12-12)
### Bug Fixes
* **webapi:** Set correct swagger return type for transmission list
([#1590](https://github.com/digdir/dialogporten/issues/1590))
([6e88e0c](https://github.com/digdir/dialogporten/commit/6e88e0c13c089d0f4871be2ee95a7f74fb21a51c))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 7 +++++++
version.txt | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 393e7b6a7..e051daf4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## [1.41.2](https://github.com/digdir/dialogporten/compare/v1.41.1...v1.41.2) (2024-12-12)
+
+
+### Bug Fixes
+
+* **webapi:** Set correct swagger return type for transmission list ([#1590](https://github.com/digdir/dialogporten/issues/1590)) ([6e88e0c](https://github.com/digdir/dialogporten/commit/6e88e0c13c089d0f4871be2ee95a7f74fb21a51c))
+
## [1.41.1](https://github.com/digdir/dialogporten/compare/v1.41.0...v1.41.1) (2024-12-09)
diff --git a/version.txt b/version.txt
index f86fb9cbc..5f2441072 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.41.1
+1.41.2
From b4440ca001c35e2c872ff02a43aa74ac0225e280 Mon Sep 17 00:00:00 2001
From: Are Almaas
Date: Thu, 12 Dec 2024 14:53:08 +0100
Subject: [PATCH 11/30] ci: send slack message on failed performance tests
(#1598)
## Description
## Related Issue(s)
- #1540
## 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)
---
.github/slack-templates/pipeline-failed.json | 2 +-
.github/workflows/ci-cd-yt01.yml | 5 +++--
.../workflows/workflow-send-ci-cd-status-slack-message.yml | 6 ++++++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.github/slack-templates/pipeline-failed.json b/.github/slack-templates/pipeline-failed.json
index d08909a3a..cd02b10a0 100644
--- a/.github/slack-templates/pipeline-failed.json
+++ b/.github/slack-templates/pipeline-failed.json
@@ -23,7 +23,7 @@
"type": "section",
"text": {
"type": "mrkdwn",
- "text": "*Job Status:*\nβ’ Infrastructure: ${{ env.INFRA_STATUS }}\nβ’ Apps: ${{ env.APPS_STATUS }}\nβ’ Slack Notifier: ${{ env.SLACK_NOTIFIER_STATUS }}\nβ’ E2E Tests: ${{ env.E2E_TESTS_STATUS }}\nβ’ Schema NPM: ${{ env.SCHEMA_NPM_STATUS }}\nβ’ Publish: ${{ env.PUBLISH_STATUS }}"
+ "text": "*Job Status:*\nβ’ Infrastructure: ${{ env.INFRA_STATUS }}\nβ’ Apps: ${{ env.APPS_STATUS }}\nβ’ Slack Notifier: ${{ env.SLACK_NOTIFIER_STATUS }}\nβ’ E2E Tests: ${{ env.E2E_TESTS_STATUS }}\nβ’ Performance Tests: ${{ env.PERFORMANCE_TESTS_STATUS }}\nβ’ Schema NPM: ${{ env.SCHEMA_NPM_STATUS }}\nβ’ Publish: ${{ env.PUBLISH_STATUS }}"
}
},
{
diff --git a/.github/workflows/ci-cd-yt01.yml b/.github/workflows/ci-cd-yt01.yml
index af94c7f8f..a047d1a68 100644
--- a/.github/workflows/ci-cd-yt01.yml
+++ b/.github/workflows/ci-cd-yt01.yml
@@ -140,7 +140,7 @@ jobs:
checks: write
pull-requests: write
- run-performance:
+ run-performance-tests:
name: "Run K6 performance tests"
# we want the performance tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasInfraChanges == 'true') }}
@@ -175,7 +175,7 @@ jobs:
send-slack-message-on-failure:
name: Send Slack message on failure
- needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish]
+ needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish, run-performance-tests]
if: ${{ always() && failure() && !cancelled() }}
uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
with:
@@ -184,6 +184,7 @@ jobs:
apps_status: ${{ needs.deploy-apps.result }}
slack_notifier_status: ${{ needs.deploy-slack-notifier.result }}
e2e_tests_status: ${{ needs.run-e2e-tests.result }}
+ performance_tests_status: ${{ needs.run-performance-tests.result }}
publish_status: ${{ needs.publish.result }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
diff --git a/.github/workflows/workflow-send-ci-cd-status-slack-message.yml b/.github/workflows/workflow-send-ci-cd-status-slack-message.yml
index 451814205..557f5d1e6 100644
--- a/.github/workflows/workflow-send-ci-cd-status-slack-message.yml
+++ b/.github/workflows/workflow-send-ci-cd-status-slack-message.yml
@@ -22,6 +22,10 @@ on:
type: string
description: "Status of the end-to-end tests job"
default: "skipped"
+ performance_tests_status:
+ type: string
+ description: "Status of the performance tests job"
+ default: "skipped"
schema_npm_status:
type: string
description: "Status of the schema npm publishing job"
@@ -69,6 +73,7 @@ jobs:
echo "SCHEMA_NPM_EMOJI=$(determine_emoji "${{ inputs.schema_npm_status }}")"
echo "PUBLISH_EMOJI=$(determine_emoji "${{ inputs.publish_status }}")"
echo "BUILD_AND_TEST_EMOJI=$(determine_emoji "${{ inputs.build_and_test_status }}")"
+ echo "PERFORMANCE_TESTS_EMOJI=$(determine_emoji "${{ inputs.performance_tests_status }}")"
} >> "$GITHUB_OUTPUT"
- name: Send GitHub slack message
@@ -85,6 +90,7 @@ jobs:
SCHEMA_NPM_STATUS: "${{ steps.status-emojis.outputs.SCHEMA_NPM_EMOJI }}"
PUBLISH_STATUS: "${{ steps.status-emojis.outputs.PUBLISH_EMOJI }}"
BUILD_AND_TEST_STATUS: "${{ steps.status-emojis.outputs.BUILD_AND_TEST_EMOJI }}"
+ PERFORMANCE_TESTS_STATUS: "${{ steps.status-emojis.outputs.PERFORMANCE_TESTS_EMOJI }}"
uses: slackapi/slack-github-action@v2.0.0
with:
errors: true
From b39c37662f61361b083d7addc60b26ad4e06fab6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Dybvik=20Langfors?=
Date: Thu, 12 Dec 2024 15:43:19 +0100
Subject: [PATCH 12/30] fix: Collapse subject resource mappings before building
sql query (#1579)
## Description
This implements a few optimizations for search authorization, which
particularly improves performance for users with access to a large
number of parties.
- SubjectsByParties gets collapsed and merged into ResourcesByParties.
This lets us avoid doing subselects in the OR-clauses added to the
search SQL
- The entire SubjectResources-table is cached, which lets us do the
above without an additional database hit.
- When constructing the SQL, parties with identical resource lists are
grouped, further collapsing multiple OR clauses into single ones with
two ANY checks. This vastly reduces the number of clauses for large
number of reportees, which in turn reduces the number of (identical)
query parameters being sent over the network.
- Minor improvements to data structures (mostly replacing List with
HashSet)
## Related Issue(s)
- N/A
## Verification
- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [x] Relevant automated test added
---
.../Common/Extensions/DbSetExtensions.cs | 59 ++++++++------
.../DialogSearchAuthorizationResult.cs | 6 +-
.../AltinnAuthorizationClient.cs | 39 ++++++----
.../Authorization/AuthorizationHelper.cs | 52 +++++++++++++
.../LocalDevelopmentAltinnAuthorization.cs | 6 +-
.../InfrastructureExtensions.cs | 5 ++
.../DbSetExtensionsTests.cs | 72 +++++++++++++++++
.../AuthorizationHelperTests.cs | 78 +++++++++++++++++++
8 files changed, 271 insertions(+), 46 deletions(-)
create mode 100644 src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AuthorizationHelper.cs
create mode 100644 tests/Digdir.Domain.Dialogporten.Application.Unit.Tests/DbSetExtensionsTests.cs
create mode 100644 tests/Digdir.Domain.Dialogporten.Infrastructure.Unit.Tests/AuthorizationHelperTests.cs
diff --git a/src/Digdir.Domain.Dialogporten.Application/Common/Extensions/DbSetExtensions.cs b/src/Digdir.Domain.Dialogporten.Application/Common/Extensions/DbSetExtensions.cs
index a15186323..8d207682d 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Common/Extensions/DbSetExtensions.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Common/Extensions/DbSetExtensions.cs
@@ -2,18 +2,15 @@
using System.Text;
using Digdir.Domain.Dialogporten.Application.Externals.AltinnAuthorization;
using Digdir.Domain.Dialogporten.Domain.Dialogs.Entities;
-using Digdir.Domain.Dialogporten.Domain.SubjectResources;
using Microsoft.EntityFrameworkCore;
namespace Digdir.Domain.Dialogporten.Application.Common.Extensions;
public static class DbSetExtensions
{
- public static IQueryable PrefilterAuthorizedDialogs(this DbSet dialogs, DialogSearchAuthorizationResult authorizedResources)
+ public static (string sql, object[] parameters) GeneratePrefilterAuthorizedDialogsSql(DialogSearchAuthorizationResult authorizedResources)
{
var parameters = new List
From 25283d2b3822010bbce5e8495f5fd99b5af8cd88 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 20 Dec 2024 02:29:00 +0100
Subject: [PATCH 30/30] chore(deps): update dependency
testcontainers.postgresql to 4.1.0 (#1619)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [Testcontainers.PostgreSql](https://dotnet.testcontainers.org/)
([source](https://redirect.github.com/testcontainers/testcontainers-dotnet))
| `4.0.0` -> `4.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testcontainers.PostgreSql/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testcontainers.PostgreSql/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testcontainers.PostgreSql/4.0.0/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testcontainers.PostgreSql/4.0.0/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
testcontainers/testcontainers-dotnet
(Testcontainers.PostgreSql)
###
[`v4.1.0`](https://redirect.github.com/testcontainers/testcontainers-dotnet/releases/tag/4.1.0)
[Compare
Source](https://redirect.github.com/testcontainers/testcontainers-dotnet/compare/4.0.0...4.1.0)
##### What's Changed
This is likely the last release for this year, unless urgent fixes
become necessary.
I want to mention a change introduced in the last major release, where
we refactored the `IImage` interface. As part of this update, we removed
obsolete properties and overloaded constructors. If you previously used
an overload other than `DockerImage(string)`, please ensure you pass the
correct values to the constructor.
Additionally, we replaced
[Docker.DotNet](https://redirect.github.com/testcontainers/Docker.DotNet)
with our own fork to keep the Docker Engine API up to date. Our goal is
to improve reliability and performance while offering a more
developer-friendly and convenient client. If you depend on a Docker
client for .NET, we encourage you to contribute to this project β€οΈ.
On a personal note, I wish everyone a peaceful and lovely holiday
season. Take this time to rest, connect with loved ones, and recharge
for the new year. Take care.
##### π Features
- feat: Add Azure Service Bus module
([#1309](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1309))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- feat: Set ryuk.container.privileged default value to true
([#1313](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1313))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- feat: Remove `net6.0` and add `net9.0` TFM
([#1311](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1311))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- feat: Introduce a new Testcontainers.Xunit package
([#1165](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1165))
[@0xced](https://redirect.github.com/0xced)
##### π Bug Fixes
- fix: Postpone exception in `DbContainerFixture` to match the behavior
of `ContainerFixture`
([#1310](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1310))
[@0xced](https://redirect.github.com/0xced)
- fix: Do not pre-pull scratch image
([#1304](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1304))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- fix: Add HTTP wait strategy to prevent race-condition in
WaitUntilHttpRequestIsSucceededTest
([#1299](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1299))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- fix: Add HTTP wait strategy to prevent race-condition in
TarOutputMemoryStreamTest
([#1297](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1297))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- fix: Prepend Docker Hub namespace to repository
([#1287](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1287))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
##### π Documentation
- docs: Add low level API access
([#1300](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1300))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
##### π§Ή Housekeeping
- feat: Add Respawn example
([#1307](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1307))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- chore: Add test to ensure that all test projects are configured for CI
([#1305](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1305))
[@0xced](https://redirect.github.com/0xced)
- chore: Run each test project on a separate runner
([#1295](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1295))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
- chore: Replace Docker.DotNet with the Testcontainers organization's
build
([#1292](https://redirect.github.com/testcontainers/testcontainers-dotnet/issues/1292))
[@HofmeisterAn](https://redirect.github.com/HofmeisterAn)
---
### Configuration
π
**Schedule**: Branch creation - "before 7am on Sunday,before 7am on
Wednesday" (UTC), Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/digdir/dialogporten).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
...dir.Domain.Dialogporten.Application.Integration.Tests.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj b/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
index 942a0cc2e..8f8d3faa2 100644
--- a/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
+++ b/tests/Digdir.Domain.Dialogporten.Application.Integration.Tests/Digdir.Domain.Dialogporten.Application.Integration.Tests.csproj
@@ -14,7 +14,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive