Skip to content

Commit 7655613

Browse files
feat: Promote to UAT (#341)
2 parents d53f4ae + 47cc6e3 commit 7655613

File tree

79 files changed

+412
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+412
-162
lines changed

README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -208,26 +208,9 @@ See [application.yml](src/main/resources/application.yml) for each configurable
208208
See `workflow.*` properties on [application.yml](src/main/resources/application.yml) to check configuration for each workflow.
209209

210210
###### 📥 TaskQueue poller sizes
211-
| ENV | DESCRIPTION | DEFAULT |
212-
|-----------------------------------------------------|----------------------------------------------------------------------------------|---------|
213-
| WF_LOW_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `LowPriorityWF` | 3 |
214-
| WF_DP_LOW_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `DebtPositionWF` | 3 |
215-
| WF_DP_RESERVED_SYNC_POLLER_SIZE | Poller size configured for Temporal task queue `DebtPositionSyncWF` | 10 |
216-
| WF_DP_RESERVED_SYNC_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `DebtPositionSyncWF_LOCAL` | 5 |
217-
| WF_DP_RESERVED_CUSTOM_SYNC_POLLER_SIZE | Poller size configured for Temporal task queue `DebtPositionCustomSyncWF` | 5 |
218-
| WF_DP_RESERVED_CUSTOM_SYNC_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `DebtPositionCustomSyncWF_LOCAL` | 5 |
219-
| WF_IMPORT_MEDIUM_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `IngestionFlowFileWF` | 3 |
220-
| WF_IMPORT_MEDIUM_PRIORITY_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `IngestionFlowFileWF_LOCAL` | 2 |
221-
| WF_EXPORT_MEDIUM_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `ExportFileWF` | 3 |
222-
| WF_EXPORT_MEDIUM_PRIORITY_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `ExportFileWF_LOCAL` | 2 |
223-
| WF_CLASSIFICATION_MEDIUM_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `ClassificationWF` | 3 |
224-
| WF_CLASSIFICATION_MEDIUM_PRIORITY_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `ClassificationWF_LOCAL` | 2 |
225-
| WF_SEND_RESERVED_NOTIFICATION_POLLER_SIZE | Poller size configured for Temporal task queue `SendNotificationProcessWF` | 3 |
226-
| WF_SEND_RESERVED_NOTIFICATION_LOCAL_POLLER_SIZE | Poller size configured for Temporal task queue `SendNotificationProcessWF_LOCAL` | 2 |
227-
| WF_SEND_LOW_PRIORITY_POLLER_SIZE | Poller size configured for Temporal task queue `SendWF` | 3 |
228-
| WF_ASSESSMENTS_RESERVED_CREATION_POLLER_SIZE | Poller size configured for Temporal task queue `AssessmentCreationWF` | 5 |
229-
| WF_ASSESSMENTS_POLLER_SIZE | Poller size configured for Temporal task queue `AssessmentsWF` | 5 |
230-
| WF_ASSESSMENTS_CLASSIFICATION_POLLER_SIZE | Poller size configured for Temporal task queue `AssessmentClassificationWF` | 5 |
211+
See the following properties for poller sizes:
212+
* `spring.temporal.workers[*].capacity.workflow-task-pollers-configuration.poller-behavior-autoscaling`
213+
* `spring.temporal.workers[*].capacity.activity-task-pollers-configuration.poller-behavior-autoscaling`
231214

232215
#### 💼 Business logic
233216
| ENV | DESCRIPTION | DEFAULT |

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ val podamVersion = "8.0.2.RELEASE"
7777
val caffeineVersion = "3.2.2"
7878
val commonsLang3Version = "3.19.0"
7979

80-
val p4paActivitiesVersion = "1.160.7"
80+
val p4paActivitiesVersion = "1.163.0"
8181

8282
dependencies {
8383
implementation("org.springframework.boot:spring-boot-starter")

gradle.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ io.temporal:temporal-spring-boot-autoconfigure:1.31.0=compileClasspath
7979
io.temporal:temporal-spring-boot-starter:1.31.0=compileClasspath
8080
io.temporal:temporal-test-server:1.31.0=compileClasspath
8181
io.temporal:temporal-testing:1.31.0=compileClasspath
82-
it.gov.pagopa.payhub:p4pa-payhub-activities:1.160.7=compileClasspath
82+
it.gov.pagopa.payhub:p4pa-payhub-activities:1.163.0=compileClasspath
8383
jakarta.activation:jakarta.activation-api:2.1.4=compileClasspath
8484
jakarta.annotation:jakarta.annotation-api:2.1.1=compileClasspath
8585
jakarta.persistence:jakarta.persistence-api:3.1.0=compileClasspath

openapi/generated.openapi.json

Lines changed: 84 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,38 @@
17221722
"BearerAuth" : [ ]
17231723
} ]
17241724
}
1725+
},
1726+
"/workflowhub/workflows/{workflowId}" : {
1727+
"delete" : {
1728+
"tags" : [ "Workflow" ],
1729+
"operationId" : "deleteWorkflow",
1730+
"parameters" : [ {
1731+
"name" : "workflowId",
1732+
"in" : "path",
1733+
"required" : true,
1734+
"schema" : {
1735+
"type" : "string"
1736+
}
1737+
} ],
1738+
"responses" : {
1739+
"200" : {
1740+
"description" : "Workflow deleted successfully"
1741+
},
1742+
"500" : {
1743+
"description" : "Internal Server Error",
1744+
"content" : {
1745+
"application/json" : {
1746+
"schema" : {
1747+
"$ref" : "#/components/schemas/WorkflowErrorDTO"
1748+
}
1749+
}
1750+
}
1751+
}
1752+
},
1753+
"security" : [ {
1754+
"BearerAuth" : [ ]
1755+
} ]
1756+
}
17251757
}
17261758
},
17271759
"components" : {
@@ -1846,17 +1878,6 @@
18461878
}
18471879
}
18481880
},
1849-
"WfExecutionConfig" : {
1850-
"type" : "object",
1851-
"discriminator" : {
1852-
"propertyName" : "workflowTypeName"
1853-
},
1854-
"properties" : {
1855-
"workflowTypeName" : {
1856-
"$ref" : "#/components/schemas/DebtPositionSyncWfName"
1857-
}
1858-
}
1859-
},
18601881
"PageMetadata" : {
18611882
"type" : "object",
18621883
"properties" : {
@@ -1878,6 +1899,17 @@
18781899
}
18791900
}
18801901
},
1902+
"WfExecutionConfig" : {
1903+
"type" : "object",
1904+
"discriminator" : {
1905+
"propertyName" : "workflowTypeName"
1906+
},
1907+
"properties" : {
1908+
"workflowTypeName" : {
1909+
"$ref" : "#/components/schemas/DebtPositionSyncWfName"
1910+
}
1911+
}
1912+
},
18811913
"WorkflowTypeOrg" : {
18821914
"type" : "object",
18831915
"properties" : {
@@ -2538,51 +2570,16 @@
25382570
},
25392571
"required" : [ "createdAt", "lastExecution", "lastUpdatedAt", "nextActionTimes", "numActions", "numActionsMissedCatchupWindow", "numActionsSkippedOverlap", "recentActions", "runningActions", "scheduleId" ]
25402572
},
2541-
"WorkflowType" : {
2542-
"type" : "object",
2543-
"properties" : {
2544-
"creationDate" : {
2545-
"type" : "string",
2546-
"format" : "date-time"
2547-
},
2548-
"updateDate" : {
2549-
"type" : "string",
2550-
"format" : "date-time"
2551-
},
2552-
"updateOperatorExternalId" : {
2553-
"type" : "string"
2554-
},
2555-
"updateTraceId" : {
2556-
"type" : "string"
2557-
},
2558-
"workflowTypeId" : {
2559-
"type" : "integer",
2560-
"format" : "int64"
2561-
},
2562-
"description" : {
2563-
"type" : "string"
2564-
},
2565-
"defaultExecutionConfig" : {
2566-
"oneOf" : [ {
2567-
"$ref" : "#/components/schemas/FineWfExecutionConfig"
2568-
} ]
2569-
},
2570-
"_links" : {
2571-
"$ref" : "#/components/schemas/Links"
2572-
}
2573-
},
2574-
"required" : [ "defaultExecutionConfig", "description" ]
2575-
},
2576-
"PagedModelWorkflowType" : {
2573+
"PagedModelWorkflowTypeOrg" : {
25772574
"type" : "object",
25782575
"properties" : {
25792576
"_embedded" : {
25802577
"type" : "object",
25812578
"properties" : {
2582-
"workflowTypes" : {
2579+
"workflowTypeOrgs" : {
25832580
"type" : "array",
25842581
"items" : {
2585-
"$ref" : "#/components/schemas/WorkflowType"
2582+
"$ref" : "#/components/schemas/WorkflowTypeOrg"
25862583
}
25872584
}
25882585
}
@@ -2652,16 +2649,51 @@
26522649
}
26532650
}
26542651
},
2655-
"PagedModelWorkflowTypeOrg" : {
2652+
"WorkflowType" : {
2653+
"type" : "object",
2654+
"properties" : {
2655+
"creationDate" : {
2656+
"type" : "string",
2657+
"format" : "date-time"
2658+
},
2659+
"updateDate" : {
2660+
"type" : "string",
2661+
"format" : "date-time"
2662+
},
2663+
"updateOperatorExternalId" : {
2664+
"type" : "string"
2665+
},
2666+
"updateTraceId" : {
2667+
"type" : "string"
2668+
},
2669+
"workflowTypeId" : {
2670+
"type" : "integer",
2671+
"format" : "int64"
2672+
},
2673+
"description" : {
2674+
"type" : "string"
2675+
},
2676+
"defaultExecutionConfig" : {
2677+
"oneOf" : [ {
2678+
"$ref" : "#/components/schemas/FineWfExecutionConfig"
2679+
} ]
2680+
},
2681+
"_links" : {
2682+
"$ref" : "#/components/schemas/Links"
2683+
}
2684+
},
2685+
"required" : [ "defaultExecutionConfig", "description" ]
2686+
},
2687+
"PagedModelWorkflowType" : {
26562688
"type" : "object",
26572689
"properties" : {
26582690
"_embedded" : {
26592691
"type" : "object",
26602692
"properties" : {
2661-
"workflowTypeOrgs" : {
2693+
"workflowTypes" : {
26622694
"type" : "array",
26632695
"items" : {
2664-
"$ref" : "#/components/schemas/WorkflowTypeOrg"
2696+
"$ref" : "#/components/schemas/WorkflowType"
26652697
}
26662698
}
26672699
}

openapi/p4pa-workflow-hub.openapi.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,26 @@ paths:
9595
application/json:
9696
schema:
9797
$ref: '#/components/schemas/WorkflowErrorDTO'
98+
/workflows/{workflowId}:
99+
delete:
100+
tags:
101+
- Workflow
102+
operationId: deleteWorkflow
103+
parameters:
104+
- name: workflowId
105+
in: path
106+
required: true
107+
schema:
108+
type: string
109+
responses:
110+
'200':
111+
description: Workflow deleted successfully
112+
'500':
113+
description: Internal Server Error
114+
content:
115+
application/json:
116+
schema:
117+
$ref: '#/components/schemas/WorkflowErrorDTO'
98118
/workflows/{workflowId}/wait-completion:
99119
post:
100120
tags:

src/main/java/it/gov/pagopa/pu/workflow/config/temporal/BaseWfConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@ConfigurationProperties(prefix = "workflow.default")
1010
@Data
1111
public class BaseWfConfig {
12+
protected int scheduleToStartTimeoutInSeconds;
1213
protected int startToCloseTimeoutInSeconds;
1314
protected int retryInitialIntervalInMillis;
1415
protected double retryBackoffCoefficient;

src/main/java/it/gov/pagopa/pu/workflow/config/temporal/TemporalWFImplementationCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public static ActivityOptions baseWfConfig2ActivityOptions(BaseWfConfig baseWfCo
3434

3535
public static ActivityOptions baseWfConfig2ActivityOptions(String taskQueue, BaseWfConfig baseWfConfig) {
3636
return ActivityOptions.newBuilder()
37+
.setScheduleToStartTimeout(Duration.ofSeconds(baseWfConfig.getScheduleToStartTimeoutInSeconds()))
3738
.setStartToCloseTimeout(Duration.ofSeconds(baseWfConfig.getStartToCloseTimeoutInSeconds()))
3839
.setTaskQueue(taskQueue)
3940
.setRetryOptions(

src/main/java/it/gov/pagopa/pu/workflow/controller/WorkflowControllerImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package it.gov.pagopa.pu.workflow.controller;
22

3-
import io.temporal.api.enums.v1.WorkflowExecutionStatus;
43
import it.gov.pagopa.pu.workflow.controller.generated.WorkflowApi;
54
import it.gov.pagopa.pu.workflow.dto.generated.WorkflowStatusDTO;
65
import it.gov.pagopa.pu.workflow.service.temporal.WorkflowCompletionService;
@@ -35,4 +34,11 @@ public ResponseEntity<WorkflowStatusDTO> waitWorkflowCompletion(String workflowI
3534
WorkflowStatusDTO workflowStatusDTO = workflowCompletionService.waitTerminationStatus(workflowId, maxAttempts, retryDelayMs);
3635
return new ResponseEntity<>(workflowStatusDTO, HttpStatus.OK);
3736
}
37+
38+
@Override
39+
public ResponseEntity<Void> deleteWorkflow(String workflowId) {
40+
log.info("Deleting workflow with workflowId: {}", workflowId);
41+
service.cancelWorkflow(workflowId);
42+
return ResponseEntity.ok().build();
43+
}
3844
}

src/main/java/it/gov/pagopa/pu/workflow/dto/ExportDataDTO.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ public class ExportDataDTO {
1818
private LocalDate exportDate;
1919
private Long fileSize;
2020
private ExportFileTypeEnum exportFileType;
21+
private String operatorExternalUserId;
2122
}

src/main/java/it/gov/pagopa/pu/workflow/dto/IngestionDataDTO.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ public class IngestionDataDTO {
1616
private long totalRows;
1717
private long processedRows;
1818
private IngestionFlowFileStatus status;
19+
private long fileSize;
20+
private String operatorExternalUserId;
1921
}

0 commit comments

Comments
 (0)