Skip to content

Commit

Permalink
Release v0.2 (#104)
Browse files Browse the repository at this point in the history
Co-authored-by: aacitelli <[email protected]>
Co-authored-by: Jacopo Carlini <[email protected]>
Co-authored-by: Angelo Caporaso <[email protected]>
Co-authored-by: pagopa-github-bot <[email protected]>
Co-authored-by: Andrea De Rinaldis <[email protected]>
Co-authored-by: Francesco Cesareo <[email protected]>
Co-authored-by: Andrea De Rinaldis <[email protected]>
  • Loading branch information
8 people authored Sep 18, 2024
1 parent 57d25ef commit e73ce56
Show file tree
Hide file tree
Showing 59 changed files with 1,475 additions and 276 deletions.
16 changes: 10 additions & 6 deletions .devops/performance-test-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,25 @@ parameters:
- "spike"
- "stress"
- "constant"
- # TODO: add your values
default: "constant"
- name: "SCRIPT"
displayName: "Script name"
type: string
values:
- yourscriptname # TODO: add your script
- nodoInviaRPT_workflow
- nodoInviaCarrelloRPT_workflow

variables:
${{ if eq(parameters['ENVIRONMENT'], 'dev') }}:
poolImage: 'pagopa-dev-loadtest-linux'
API_SUBSCRIPTION_KEY: $(DEV_API_SUBSCRIPTION_KEY)
NODO_PA_SUBSCRIPTION_KEY: $(DEV_NODO_PA_SUBSCRIPTION_KEY)
STATION_PWD: $(DEV_STATION_PASSWORD)
CHANNEL_PWD: $(DEV_CHANNEL_PASSWORD)
${{ if eq(parameters['ENVIRONMENT'], 'uat') }}:
poolImage: 'pagopa-uat-loadtest-linux'
API_SUBSCRIPTION_KEY: $(UAT_API_SUBSCRIPTION_KEY)
NODO_PA_SUBSCRIPTION_KEY: $(UAT_NODO_PA_SUBSCRIPTION_KEY)
STATION_PWD: $(UAT_STATION_PASSWORD)
CHANNEL_PWD: $(UAT_CHANNEL_PASSWORD)


pool:
Expand All @@ -44,8 +49,7 @@ steps:
docker pull grafana/k6
displayName: Pull k6 image
# TODO: add your env params
- script: |
cd ./performance-test
sh ./run_performance_test.sh ${{ parameters.ENVIRONMENT }} ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} afmcalculatork6 $(API_SUBSCRIPTION_KEY)
sh ./run_performance_test.sh ${{ parameters.ENVIRONMENT }} ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} wispsoapconvk6 $(NODO_PA_SUBSCRIPTION_KEY) $(STATION_PWD) $(CHANNEL_PWD)
displayName: Run k6 ${{ parameters.SCRIPT }} on ${{ parameters.ENVIRONMENT }}
40 changes: 3 additions & 37 deletions .github/workflows/05_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ permissions:

jobs:
integration_test:
name: Test ${{(github.event.inputs == null && 'dev') || inputs.environment }}
name: Test ${{(github.event.inputs == null && 'uat') || inputs.environment }}
runs-on: ubuntu-latest
environment: ${{(github.event.inputs == null && 'dev') || inputs.environment }}
environment: ${{(github.event.inputs == null && 'uat') || inputs.environment }}
steps:
- name: Checkout
id: checkout
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
docker run \
-e INTEGRATION_TEST_GPD_SUBSCRIPTION_KEY="${{ secrets.INTEGRATION_TEST_GPD_SUBSCRIPTION_KEY }}" \
-e INTEGRATION_TEST_NODO_SUBSCRIPTION_KEY="${{ secrets.INTEGRATION_TEST_NODO_SUBSCRIPTION_KEY }}" \
-e INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY="${{ secrets.INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY }}" \
-e INTEGRATION_TEST_NUOVACONNETTIVITA_SUBSCRIPTION_KEY="${{ secrets.INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY }}" \
-e INTEGRATION_TEST_TECHNICALSUPPORT_SUBSCRIPTION_KEY="${{ secrets.INTEGRATION_TEST_TECHNICALSUPPORT_SUBSCRIPTION_KEY }}" \
-e INTEGRATION_TEST_CHANNEL_WISP_PASSWORD="${{ secrets.INTEGRATION_TEST_CHANNEL_WISP_PASSWORD }}" \
-e INTEGRATION_TEST_CHANNEL_WFESP_PASSWORD="${{ secrets.INTEGRATION_TEST_CHANNEL_WFESP_PASSWORD }}" \
Expand Down Expand Up @@ -147,37 +147,3 @@ jobs:
footer: 'Linked to <{workflow_url}| workflow file>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# delete_github_deployments:
# runs-on: ubuntu-latest
# needs: integration_test
# if: ${{ always() }}
# steps:
# - name: Delete Previous deployments
# uses: actions/github-script@v6
# env:
# SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}}
# with:
# script: |
# const { SHA_HEAD } = process.env
#
# const deployments = await github.rest.repos.listDeployments({
# owner: context.repo.owner,
# repo: context.repo.repo,
# sha: SHA_HEAD
# });
# await Promise.all(
# deployments.data.map(async (deployment) => {
# await github.rest.repos.createDeploymentStatus({
# owner: context.repo.owner,
# repo: context.repo.repo,
# deployment_id: deployment.id,
# state: 'inactive'
# });
# return github.rest.repos.deleteDeployment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# deployment_id: deployment.id
# });
# })
# );
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ integration-test/results/*
**/__pycache__/*

.DS_Store
/integration-test/env*.local
/.run/
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-wisp-converter
description: A service that permits to handle nodoInviaRPT and nodoInviaCarrelloRPT request from WISP, interfacing them with GPD system
type: application
version: 0.173.0
appVersion: 0.1.22
version: 0.185.0
appVersion: 0.1.22-12-PAGOPA-2125
dependencies:
- name: microservice-chart
version: 3.0.0
Expand Down
6 changes: 5 additions & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-wisp-converter
tag: "0.1.22"
tag: "0.1.22-12-PAGOPA-2125"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -65,6 +65,7 @@ microservice-chart:
WEBSITE_SITE_NAME: 'pagopawispconverter' # required to show cloud role name in application insights
ENV: 'aks-dev'
APP_LOGGING_LEVEL: 'DEBUG'
APP_LOGGING_TRACING_LEVEL: 'ERROR'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'
OTEL_SERVICE_NAME: "pagopa-wisp-converter"
Expand Down Expand Up @@ -96,6 +97,8 @@ microservice-chart:
RT_SEND_MAX_RETRIES: '48'
RT_SEND_SCHEDULING_TIME_IN_MINUTES: '1'
RT_SEND_AVOID_SCHEDULING_ON_STATES: 'PAA_RT_DUPLICATA'
RPT_TIMER_QUEUE_NAME: "nodo_wisp_rpt_timeout_queue"
RPT_TIMEOUT: '1800'
RE_TRACING_INTERFACE_IUVGENERATOR_ENABLED: 'true'
RE_TRACING_INTERFACE_PAYMENTPOSITIONANALYSIS_ENABLED: 'true'
RE_TRACING_INTERFACE_DECOUPLERCACHING_ENABLED: 'true'
Expand All @@ -115,6 +118,7 @@ microservice-chart:
SERVICE_BUS_PAYMENT_TIMEOUT_QUEUE_CONNECTION_STRING: 'wisp-payment-timeout-queue-connection-string'
SERVICE_BUS_PAAINVIART_QUEUE_CONNECTION_STRING: 'wisp-paainviart-queue-connection-string'
ECOMMERCE_HANG_TIMER_QUEUE_CONNECTION_STRING: 'ecommerce-hang-timer-queue-connection-string'
RPT_TIMER_QUEUE_CONNECTION_STRING: 'wisp-rpt-timeout-queue-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
REDIS_PASSWORD: 'redis-primary-key'
REDIS_HOST: 'redis-hostname'
Expand Down
6 changes: 5 additions & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-wisp-converter
tag: "0.1.22"
tag: "0.1.22-12-PAGOPA-2125"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -84,6 +84,7 @@ microservice-chart:
WEBSITE_SITE_NAME: 'pagopawispconverter' # required to show cloud role name in application insights
ENV: 'aks-prod'
APP_LOGGING_LEVEL: 'INFO'
APP_LOGGING_TRACING_LEVEL: 'ERROR'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'
OTEL_SERVICE_NAME: "pagopa-wisp-converter"
Expand Down Expand Up @@ -115,6 +116,8 @@ microservice-chart:
RT_SEND_MAX_RETRIES: '48'
RT_SEND_SCHEDULING_TIME_IN_MINUTES: '60'
RT_SEND_AVOID_SCHEDULING_ON_STATES: 'PAA_RT_DUPLICATA'
RPT_TIMER_QUEUE_NAME: "nodo_wisp_rpt_timeout_queue"
RPT_TIMEOUT: '1800'
RE_TRACING_INTERFACE_IUVGENERATOR_ENABLED: 'true'
RE_TRACING_INTERFACE_PAYMENTPOSITIONANALYSIS_ENABLED: 'true'
RE_TRACING_INTERFACE_DECOUPLERCACHING_ENABLED: 'true'
Expand All @@ -134,6 +137,7 @@ microservice-chart:
SERVICE_BUS_PAYMENT_TIMEOUT_QUEUE_CONNECTION_STRING: 'wisp-payment-timeout-queue-connection-string'
SERVICE_BUS_PAAINVIART_QUEUE_CONNECTION_STRING: 'wisp-paainviart-queue-connection-string'
ECOMMERCE_HANG_TIMER_QUEUE_CONNECTION_STRING: 'ecommerce-hang-timer-queue-connection-string'
RPT_TIMER_QUEUE_CONNECTION_STRING: 'wisp-rpt-timeout-queue-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
REDIS_PASSWORD: 'redis-primary-key'
REDIS_HOST: 'redis-hostname'
Expand Down
6 changes: 5 additions & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-wisp-converter
tag: "0.1.22"
tag: "0.1.22-12-PAGOPA-2125"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -65,6 +65,7 @@ microservice-chart:
WEBSITE_SITE_NAME: 'pagopawispconverter' # required to show cloud role name in application insights
ENV: 'aks-uat'
APP_LOGGING_LEVEL: 'INFO'
APP_LOGGING_TRACING_LEVEL: 'ERROR'
DEFAULT_LOGGING_LEVEL: 'INFO'
CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}'
OTEL_SERVICE_NAME: "pagopa-wisp-converter"
Expand Down Expand Up @@ -96,6 +97,8 @@ microservice-chart:
RT_SEND_MAX_RETRIES: '48'
RT_SEND_SCHEDULING_TIME_IN_MINUTES: '60'
RT_SEND_AVOID_SCHEDULING_ON_STATES: 'PAA_RT_DUPLICATA'
RPT_TIMER_QUEUE_NAME: "nodo_wisp_rpt_timeout_queue"
RPT_TIMEOUT: '1800'
RE_TRACING_INTERFACE_IUVGENERATOR_ENABLED: 'true'
RE_TRACING_INTERFACE_PAYMENTPOSITIONANALYSIS_ENABLED: 'true'
RE_TRACING_INTERFACE_DECOUPLERCACHING_ENABLED: 'true'
Expand All @@ -115,6 +118,7 @@ microservice-chart:
SERVICE_BUS_PAYMENT_TIMEOUT_QUEUE_CONNECTION_STRING: 'wisp-payment-timeout-queue-connection-string'
SERVICE_BUS_PAAINVIART_QUEUE_CONNECTION_STRING: 'wisp-paainviart-queue-connection-string'
ECOMMERCE_HANG_TIMER_QUEUE_CONNECTION_STRING: 'ecommerce-hang-timer-queue-connection-string'
RPT_TIMER_QUEUE_CONNECTION_STRING: 'wisp-rpt-timeout-queue-connection-string'
OTEL_EXPORTER_OTLP_HEADERS: elastic-apm-secret-token
REDIS_PASSWORD: 'redis-primary-key'
REDIS_HOST: 'redis-hostname'
Expand Down
2 changes: 1 addition & 1 deletion integration-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ FROM build as execution

ENV INTEGRATION_TEST_GPD_SUBSCRIPTION_KEY "AT_RUNTIME"
ENV INTEGRATION_TEST_NODO_SUBSCRIPTION_KEY "AT_RUNTIME"
ENV INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY "AT_RUNTIME"
ENV INTEGRATION_TEST_NUOVACONNETTIVITA_SUBSCRIPTION_KEY "AT_RUNTIME"
ENV INTEGRATION_TEST_TECHNICALSUPPORT_SUBSCRIPTION_KEY "AT_RUNTIME"
ENV INTEGRATION_TEST_CHANNEL_WISP_PASSWORD "AT_RUNTIME"
ENV INTEGRATION_TEST_CHANNEL_WFESP_PASSWORD "AT_RUNTIME"
Expand Down
38 changes: 24 additions & 14 deletions integration-test/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,27 @@ sh run_test.sh
```

ℹ️ Set in your environment:
- `INTEGRATION_TEST_GPD_SUBSCRIPTION_KEY` to set the subscription-key for `GPD core` APIs
- `INTEGRATION_TEST_NODO_SUBSCRIPTION_KEY` to set the subscription-key for `Nodo` primitives
- `INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY` to set the subscription-key for `node-forwarder` endpoint
- `INTEGRATION_TEST_TECHNICALSUPPORT_SUBSCRIPTION_KEY` to set the subscription-key for `technical-support` APIs
- `INTEGRATION_TEST_CHANNEL_WISP_PASSWORD` to set the password for channel used by WISP flow
- `INTEGRATION_TEST_CHANNEL_CHECKOUT_PASSWORD` to set the password for channel used by Checkout
- `INTEGRATION_TEST_CHANNEL_PAYMENT_PASSWORD` to set the password for channel used by payment flow
- `INTEGRATION_TEST_STATION_PASSWORD` to set the password for station
- `TAGS` to customize test you want execute. Default `runnable`;
- `JUNIT=true` to execute _behave_ with the junit option;

- `INTEGRATION_TEST_GPD_SUBSCRIPTION_KEY` to set the subscription-key for `GPD core` APIs
- `INTEGRATION_TEST_NODO_SUBSCRIPTION_KEY` to set the subscription-key for `Nodo` primitives
- `INTEGRATION_TEST_NUOVACONNETTIVITA_SUBSCRIPTION_KEY` to set the subscription-key for `node-forwarder` endpoint
- `INTEGRATION_TEST_TECHNICALSUPPORT_SUBSCRIPTION_KEY` to set the subscription-key for `technical-support` APIs
- `INTEGRATION_TEST_CHANNEL_WISP_PASSWORD` to set the password for channel used by WISP flow
- `INTEGRATION_TEST_CHANNEL_CHECKOUT_PASSWORD` to set the password for channel used by Checkout
- `INTEGRATION_TEST_CHANNEL_PAYMENT_PASSWORD` to set the password for channel used by payment flow
- `INTEGRATION_TEST_STATION_PASSWORD` to set the password for station
- `TAGS` to customize test you want execute. Default `runnable`;
- `JUNIT=true` to execute _behave_ with the junit option;

#### Things to know

The test platform contains some fundamental data structures from which the steps generate the data to be sent: they are `test_data` and `flow_data`.
- `test_data` contains the definition of static common data set for environment. On this data, some variable values can be injected during suite start. The structure can be found in `config/commondata.json` file.
- `flow_data` contains the data dynamically set and updated, extracted and re-generated from `test_data` in each executed scenario. The structure is defined as follows:
The test platform contains some fundamental data structures from which the steps generate the data to be sent: they
are `test_data` and `flow_data`.

- `test_data` contains the definition of static common data set for environment. On this data, some variable values can
be injected during suite start. The structure can be found in `config/commondata.json` file.
- `flow_data` contains the data dynamically set and updated, extracted and re-generated from `test_data` in each
executed scenario. The structure is defined as follows:

```json
{
Expand All @@ -64,7 +68,13 @@ The test platform contains some fundamental data structures from which the steps
},
"common": {
"session_id": "<SESSION_ID>",
"iuvs": [ "<IUV1>", "<IUV2>", null, null, null ],
"iuvs": [
"<IUV1>",
"<IUV2>",
null,
null,
null
],
"payment_notices": [
{
"domain_id": "<CREDITOR_INSTITUTION_ID>",
Expand Down
2 changes: 1 addition & 1 deletion integration-test/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"services": {
"nodo-per-pa": {
"url": "https://api.ENV.platform.pagopa.it/nodo-auth/nodo-per-pa/v1",
"subscription_key": "INTEGRATION_TEST_FORWARDER_SUBSCRIPTION_KEY"
"subscription_key": "INTEGRATION_TEST_NUOVACONNETTIVITA_SUBSCRIPTION_KEY"
},
"node-for-psp": {
"url": "https://api.ENV.platform.pagopa.it/nodo/node-for-psp/v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: User pays a single payment without stamps via nodoInviaRPT
# ===============================================================================================
# ===============================================================================================

@runnable @nodo_invia_rpt @happy_path
@runnable @nodo_invia_rpt @happy_path @test
Scenario: User pays a single payment with single transfer and no stamp on nodoInviaRPT
Given a single RPT of type BBT with 1 transfers of which none are stamps
When the execution of "Send a nodoInviaRPT request" was successful
Expand Down
68 changes: 67 additions & 1 deletion openapi-client/decoupler-caching/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,62 @@
"ApiKey": []
}
],
"summary": "Save cart's NAV key mapping"
"summary": "Save cart mapping with qrCode (fiscalCode and noticeNumber)"
},
"parameters": [
{
"description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
"in": "header",
"name": "X-Request-Id",
"schema": {
"type": "string"
}
}
]
},
"/delete-sessionId": {
"post": {
"operationId": "deleteSessionId",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionId"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Ok",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"401": {
"description": "Unauthorized",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKey": []
}
],
"summary": "Delete sessionId saved in cache"
},
"parameters": [
{
Expand Down Expand Up @@ -139,6 +194,17 @@
}
}
}
},
"SessionId": {
"required": [
"sessionId"
],
"type": "object",
"properties": {
"sessionId": {
"type": "string"
}
}
}
},
"securitySchemes": {
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openapi/openapi_redirect.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.1",
"info": {
"title": "WISP-Converter-redirect",
"version": "0.1.22"
"version": "0.1.22-12-PAGOPA-2125"
},
"servers": [
{
Expand Down
Loading

0 comments on commit e73ce56

Please sign in to comment.