-
Notifications
You must be signed in to change notification settings - Fork 0
feats/activation sync to legacy #1359
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0243bdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Tip ✅ All Terraform module locks are up to dateNo module changes detected - everything is in sync! 📋 Pre-commit Output Log
Generated on Mon Sep 22 13:47:41 UTC 2025 |
📖 Terraform Plan (infra/resources/prod) - successShow Plan # module.function_app.azurerm_monitor_autoscale_setting.app_be_fn will be updated in-place
~ resource "azurerm_monitor_autoscale_setting" "app_be_fn" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Insights/autoScaleSettings/io-p-itn-svc-app-be-func-01-autoscale"
name = "io-p-itn-svc-app-be-func-01-autoscale"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (4 unchanged attributes hidden)
~ profile {
~ name = "evening" -> jsonencode(
{
+ for = "evening"
+ name = "default"
}
)
~ capacity {
~ default = 5 -> 4
# (2 unchanged attributes hidden)
}
~ recurrence {
~ hours = [
~ 19 -> 22,
]
~ minutes = [
~ 30 -> 59,
]
# (2 unchanged attributes hidden)
}
# (5 unchanged blocks hidden)
}
~ profile {
~ name = "night" -> jsonencode(
{
+ for = "night"
+ name = "default"
}
)
~ capacity {
~ default = 3 -> 4
# (2 unchanged attributes hidden)
}
~ recurrence {
~ hours = [
~ 23 -> 5,
]
# (3 unchanged attributes hidden)
}
# (5 unchanged blocks hidden)
}
~ profile {
~ name = jsonencode(
{
- for = "evening"
- name = "default"
}
) -> "evening"
~ capacity {
~ default = 8 -> 5
~ minimum = 8 -> 3
# (1 unchanged attribute hidden)
}
~ recurrence {
~ hours = [
~ 22 -> 19,
]
~ minutes = [
~ 59 -> 30,
]
# (2 unchanged attributes hidden)
}
~ rule {
~ metric_trigger {
~ statistic = "Max" -> "Average"
~ threshold = 2000 -> 3000
~ time_aggregation = "Maximum" -> "Average"
# (7 unchanged attributes hidden)
}
~ scale_action {
~ cooldown = "PT5M" -> "PT1M"
~ value = 3 -> 2
# (2 unchanged attributes hidden)
}
}
~ rule {
~ metric_trigger {
~ statistic = "Max" -> "Average"
~ threshold = 35 -> 60
~ time_aggregation = "Maximum" -> "Average"
~ time_window = "PT1M" -> "PT5M"
# (6 unchanged attributes hidden)
}
~ scale_action {
~ value = 3 -> 2
# (3 unchanged attributes hidden)
}
}
~ rule {
~ metric_trigger {
~ threshold = 1000 -> 2000
# (9 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
# (2 unchanged blocks hidden)
}
~ profile {
~ name = jsonencode(
{
- for = "night"
- name = "default"
}
) -> "night"
~ capacity {
~ default = 8 -> 3
~ minimum = 8 -> 3
# (1 unchanged attribute hidden)
}
~ recurrence {
~ hours = [
~ 5 -> 23,
]
# (3 unchanged attributes hidden)
}
~ rule {
~ metric_trigger {
~ statistic = "Max" -> "Average"
~ threshold = 2000 -> 3000
~ time_aggregation = "Maximum" -> "Average"
# (7 unchanged attributes hidden)
}
~ scale_action {
~ cooldown = "PT5M" -> "PT1M"
~ value = 3 -> 2
# (2 unchanged attributes hidden)
}
}
~ rule {
~ metric_trigger {
~ statistic = "Max" -> "Average"
~ threshold = 35 -> 60
~ time_aggregation = "Maximum" -> "Average"
~ time_window = "PT1M" -> "PT5M"
# (6 unchanged attributes hidden)
}
~ scale_action {
~ value = 3 -> 2
# (3 unchanged attributes hidden)
}
}
~ rule {
~ metric_trigger {
~ threshold = 1000 -> 2000
# (9 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
# (2 unchanged blocks hidden)
}
}
# module.cms_function_app.module.cms_fn.azurerm_linux_function_app.this will be updated in-place
~ resource "azurerm_linux_function_app" "this" {
~ app_settings = {
+ "AzureWebJobs.ActivationsSyncToLegacy.Disabled" = "1"
# (133 unchanged elements hidden)
}
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Web/sites/io-p-itn-svc-cms-func-01"
name = "io-p-itn-svc-cms-func-01"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_function_app"
"ModuleSource" = "DX"
"ModuleVersion" = "2.0.2"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (33 unchanged attributes hidden)
~ sticky_settings {
~ app_setting_names = [
# (33 unchanged elements hidden)
"AzureWebJobs.ActivationsSyncFromLegacy.Disabled",
+ "AzureWebJobs.ActivationsSyncToLegacy.Disabled",
]
# (1 unchanged attribute hidden)
}
# (2 unchanged blocks hidden)
}
# module.cms_function_app.module.cms_fn.azurerm_linux_function_app_slot.this[0] will be updated in-place
~ resource "azurerm_linux_function_app_slot" "this" {
~ app_settings = {
+ "AzureWebJobs.ActivationsSyncToLegacy.Disabled" = "1"
# (133 unchanged elements hidden)
}
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Web/sites/io-p-itn-svc-cms-func-01/slots/staging"
name = "staging"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_function_app"
"ModuleSource" = "DX"
"ModuleVersion" = "2.0.2"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (31 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.cms_function_app.module.cms_storage_account.azurerm_monitor_metric_alert.storage_account_health_check[0] will be updated in-place
~ resource "azurerm_monitor_metric_alert" "storage_account_health_check" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Insights/metricAlerts/[iopitnsvccmsst01] Low Availability"
name = "[iopitnsvccmsst01] Low Availability"
~ tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_storage_account"
"ModuleSource" = "DX"
~ "ModuleVersion" = "1.0.0" -> "1.0.1"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (10 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.cms_function_app.module.cms_storage_account.azurerm_private_endpoint.this["blob"] will be updated in-place
~ resource "azurerm_private_endpoint" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Network/privateEndpoints/io-p-itn-svc-cms-blob-pep-01"
name = "io-p-itn-svc-cms-blob-pep-01"
~ tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_storage_account"
"ModuleSource" = "DX"
~ "ModuleVersion" = "1.0.0" -> "1.0.1"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (7 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.cms_function_app.module.cms_storage_account.azurerm_private_endpoint.this["queue"] will be updated in-place
~ resource "azurerm_private_endpoint" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Network/privateEndpoints/io-p-itn-svc-cms-queue-pep-01"
name = "io-p-itn-svc-cms-queue-pep-01"
~ tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_storage_account"
"ModuleSource" = "DX"
~ "ModuleVersion" = "1.0.0" -> "1.0.1"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (7 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.cms_function_app.module.cms_storage_account.azurerm_storage_account.this will be updated in-place
~ resource "azurerm_storage_account" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Storage/storageAccounts/iopitnsvccmsst01"
name = "iopitnsvccmsst01"
~ tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_storage_account"
"ModuleSource" = "DX"
~ "ModuleVersion" = "1.0.0" -> "1.0.1"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (97 unchanged attributes hidden)
# (5 unchanged blocks hidden)
}
# module.function_app.module.app_be_fn.azurerm_linux_function_app_slot.this[0] will be updated in-place
~ resource "azurerm_linux_function_app_slot" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-svc-rg-01/providers/Microsoft.Web/sites/io-p-itn-svc-app-be-func-01/slots/staging"
name = "staging"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Enti & Servizi"
"ModuleName" = "azure_function_app"
"ModuleSource" = "DX"
"ModuleVersion" = "0.3.1"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-services-cms/infra/prod/italynorth"
}
# (32 unchanged attributes hidden)
~ site_config {
~ health_check_eviction_time_in_min = 0 -> 2
# (33 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# (1 unchanged block hidden)
}
# module.postgres.module.pgres_snet.azurerm_subnet.this will be updated in-place
~ resource "azurerm_subnet" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-svc-pgres-snet-01"
name = "io-p-itn-svc-pgres-snet-01"
~ service_endpoints = [
- "Microsoft.Storage",
]
# (7 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 0 to add, 9 to change, 0 to destroy. |
Coverage Report for App Backend (./apps/app-backend)
File CoverageNo changed files found. |
Coverage Report for Backoffice Frontend (./apps/backoffice)
File CoverageNo changed files found. |
Coverage Report for Backoffice Backend (./apps/backoffice)
File CoverageNo changed files found. |
Coverage Report for Webapp (./apps/io-services-cms-webapp)
File Coverage
|
Coverage Report for External Clients (./packages/external-clients)
File CoverageNo changed files found. |
Coverage Report for Models (./packages/io-services-cms-models)
File CoverageNo changed files found. |
return ActivationStatusEnum.PENDING; | ||
default: | ||
// Should never happen if validation is correct | ||
return ActivationStatusEnum.INACTIVE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking): use typechecker to be sure you have handled all cases.
Furthermore, consider whether in this “impossible” case it is correct to return a default value (are you sure INACTIVE
is the correct default value?) or to throw an error. (throw new Error("Invalid status");
)
return ActivationStatusEnum.INACTIVE; | |
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-case-declarations | |
const _: never = status; | |
return ActivationStatusEnum.INACTIVE; |
Implementation of the activation's sync to legacy function
Resolves IOPAE-2118