Skip to content
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

chore: deprecate vsam storage option #3721

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 5'

pull_request:
branches: [ v2.x.x, v3.x.x ]
env:
JOB_ID: ${{ github.run_id }}-${{ github.run_number }}

Expand All @@ -22,12 +23,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);
achmelo marked this conversation as resolved.
Show resolved Hide resolved
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
Loading