Skip to content

Commit

Permalink
chore: deprecate vsam storage option (#3721)
Browse files Browse the repository at this point in the history
* warn message for vsam, add infinispan to validation

Signed-off-by: ac892247 <a.chmelo@gmail.com>

* fix typos

Signed-off-by: ac892247 <a.chmelo@gmail.com>

* test doc gen

Signed-off-by: ac892247 <a.chmelo@gmail.com>

* v3 base branch

Signed-off-by: ac892247 <a.chmelo@gmail.com>

* remove PR trigger

Signed-off-by: ac892247 <a.chmelo@gmail.com>

---------

Signed-off-by: ac892247 <a.chmelo@gmail.com>
Co-authored-by: Pablo Carle <pablocarle@users.noreply.github.com>
  • Loading branch information
achmelo and pablocarle authored Sep 3, 2024
1 parent f46561c commit 30833df
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Generate and compare the Error messages
run: |
git clone https://zowe-robot:${{ secrets.ZOWE_ROBOT_TOKEN }}@github.com/zowe/docs-site.git
cd docs-site
git checkout docs-staging
git checkout v3-doc-branch
cd ../docs/docgen/
java -jar Docgen-1.0.jar ./config.yml
cp ../../docs-site/docs/troubleshoot/troubleshoot-apiml-error-codes.md original-codes.md
Expand Down
2 changes: 1 addition & 1 deletion caching-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} ${JAVA_BIN_DIR}java \
-Dcaching.storage.size=${ZWE_configs_storage_size:-10000} \
-Dcaching.storage.mode=${ZWE_configs_storage_mode:-inMemory} \
-Dcaching.storage.vsam.name=${VSAM_FILE_NAME} \
-Djgroups.bind.address=${ZWE_haInstance_hostname:-localhost} \
-Djgroups.bind.address=${ZWE_configs_storage_infinispan_jgroups_host:-${ZWE_haInstance_hostname:-localhost}} \
-Djgroups.bind.port=${ZWE_configs_storage_infinispan_jgroups_port:-7098} \
-Djgroups.keyExchange.port=${ZWE_configs_storage_infinispan_jgroups_keyExchange_port:-7118} \
-Dcaching.storage.infinispan.persistence.dataLocation=${ZWE_configs_storage_infinispan_persistence_dataLocation:-data} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ public class VsamConfiguration {
private final VsamConfig vsamConfig;
private final VsamInitializer vsamInitializer;


@ConditionalOnProperty(name = "caching.storage.mode", havingValue = "vsam")
@Bean
public Storage vsam(MessageService messageService, EvictionStrategyProducer evictionStrategyProducer) {
return new VsamStorage(vsamConfig, vsamInitializer, ApimlLogger.of(VsamStorage.class, messageService), evictionStrategyProducer);
var logger = ApimlLogger.of(VsamStorage.class, messageService);
logger.log("org.zowe.apiml.cache.storage.deprecated", "vsam");
return new VsamStorage(vsamConfig, vsamInitializer, logger, evictionStrategyProducer);
}
}
7 changes: 7 additions & 0 deletions caching-service/src/main/resources/caching-log-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ messages:
reason: "JZOS toolkit used to communicate with JZOS is unavailable. Either you are running outside of zOS with VSAM as the storage or your zOS Java is misconfigured."
action: "Check that you run on zOS and that the JZOS toolkit Java classes are on classpath."

- key: org.zowe.apiml.cache.storage.deprecated
number: ZWECS155
type: WARNING
text: "'%s' storage option is deprecated."
reason: "Specified storage option is deprecated and will be removed in the next major version."
action: "Switch to one of the supported options."

# Service specific messages (700 - 799)
- key: org.zowe.apiml.cache.gatewayUnavailable
number: ZWECS700
Expand Down
52 changes: 51 additions & 1 deletion schemas/caching-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,64 @@
"mode": {
"type": "string",
"description": "Type of storge in caching service.",
"enum": ["inMemory","VSAM","redis"],
"enum": ["inMemory","VSAM","redis","infinispan"],
"default": "inMemory"
},
"size": {
"type": "integer",
"description": "the number of records stored before the eviction strategy is initiated",
"default": 10000
},
"infinispan":{
"type": "object",
"description": "Use Infinispan as the selected storage solution",
"properties": {
"jgroups": {
"type": "object",
"description": "Data synchronization between Caching instances.",
"properties": {
"port": {
"type": "integer",
"description": "TCP port number",
"default": 7600
},
"host": {
"type": "string",
"description": "TCP hostname"
},
"keyExchange": {
"type": "object",
"description": "Data encryption key exchange.",
"properties": {
"port": {
"type": "integer",
"description": "TCP port number",
"default": 7601
}
}
}
}
},
"persistence": {
"type": "object",
"description": "Where to persistently store caching data.",
"properties": {
"dataLocation": {
"type": "string",
"description": "File location where to store data."
},
"indexLocation": {
"type": "string",
"description": "File location where to store index."
}
}
},
"initialHosts": {
"type": "string",
"description": "Address of the other Caching services. Consists of jgroups port and host in the form of 'host[port]'."
}
}
},
"vsam": {
"type": "object",
"description": "When storage is selected as VSAM",
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const branchHash = randomBytes(32).toString('hex');
repo: 'docs-site',
title: 'Automatic update for the Error messages in API-Layer PR',
head: branch,
base: 'docs-staging',
base: 'v3-doc-branch',
body: 'Updated API ML error messages'
});

Expand Down

0 comments on commit 30833df

Please sign in to comment.