Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/deploy_with_github_runner.yml
  • Loading branch information
jacopocarlini committed Aug 31, 2023
2 parents 9951735 + 01acd63 commit 15ca6f1
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 14 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pagopa-api-cache-chart
description: Microservice that handles calculation for pagoPA Advanced Fees Management
type: application
version: 0.5.0
version: 0.6.0
dependencies:
- name: microservice-chart
version: 3.0.0
Expand All @@ -24,4 +24,4 @@ dependencies:
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
alias: oracleprod
condition: oracleprod.enabled
appVersion: 0.6.4
appVersion: 0.7.0
4 changes: 2 additions & 2 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ microservice-chart: &microservice-chart
namespace: "apiconfig"
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
canaryDelivery:
deployment:
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
livenessProbe:
httpGet:
path: /actuator/health/liveness
Expand Down
4 changes: 2 additions & 2 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ microservice-chart: &microservice-chart
namespace: "apiconfig"
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
canaryDelivery:
deployment:
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
livenessProbe:
httpGet:
path: /actuator/health/liveness
Expand Down
4 changes: 2 additions & 2 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ microservice-chart: &microservice-chart
namespace: "apiconfig"
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
canaryDelivery:
deployment:
image:
repository: ghcr.io/pagopa/pagopa-api-config-cache
tag: 0.6.4
tag: 0.7.0
livenessProbe:
httpGet:
path: /actuator/health/liveness
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.4"
"version": "0.7.0"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_fdrv1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.4"
"version": "0.7.0"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_nodev1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.4"
"version": "0.7.0"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_verifierv1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.4"
"version": "0.7.0"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>it.gov.pagopa.api-config</groupId>
<artifactId>cache</artifactId>
<version>0.6.4</version>
<version>0.7.0</version>
<name>API-Config Cacher</name>
<description>Generate cache for regarding Nodo dei Pagamenti configuration</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public ConfigDataV1 newCacheV1(String stakeholder, Optional<NodeCacheKey[]> keys
.id(configData.getVersion())
.cache(jsonSerializer.serialize(configData))
.time(ZonedDateTime.now())
.version((Constants.GZIP_JSON_V1 + "-" + appVersion).substring(0, 32))
.version(getVersion())
.build());
log.info("saved on CACHE table " + configData.getVersion());
} catch (Exception e) {
Expand All @@ -479,6 +479,14 @@ public ConfigDataV1 newCacheV1(String stakeholder, Optional<NodeCacheKey[]> keys
return configData;
}

private String getVersion() {
String version = Constants.GZIP_JSON_V1 + "-" + appVersion;
if (version.length() > 32) {
return version.substring(0, 32);
}
return version;
}

public void removeCacheV1InProgress(String stakeholder) {
String actualKeyV1 = getKeyV1InProgress(stakeholder);
redisRepository.remove(actualKeyV1);
Expand Down

0 comments on commit 15ca6f1

Please sign in to comment.