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

Change validation for zowe.setup.dataset.parmlibMembers.zis #4210

Open
wants to merge 1 commit into
base: v3.x/staging
Choose a base branch
from

Conversation

Martin-Zeithaml
Copy link
Contributor

@Martin-Zeithaml Martin-Zeithaml commented Feb 26, 2025

zowe.setup.dataset.parmlibMembers.zis is a parmlib name with default of ZWESIP00, where you can actually change only last 2 characters (suffix).

But users might expect to use any valid member name there, which is not true.

Updated schema validation is checking this.

! [misc.makeYaml]: ./yaml/zowe.ok1.yaml:
zowe:
  setup:
    dataset:
      parmlibMembers:
        zis: ZWESIP01

! [misc.makeYaml]: ./yaml/zowe.ok2.yaml:
zowe:
  setup:
    dataset:
      parmlibMembers:
        zis: ZWESIP@@

! [misc.makeYaml]: ./yaml/zowe.er1.yaml:
zowe:
  setup:
    dataset:
      parmlibMembers:
        zis: ZWESIP0

! [misc.makeYaml]: ./yaml/zowe.er2.yaml:
zowe:
  setup:
    dataset:
      parmlibMembers:
        zis: ABCDEF00

! [misc.exportEnv]: ZWE_CLI_PARAMETER_CONFIG=
  [1/4]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok1.yaml
! [Output]:
Temporary directory '/tmp/.zweenv-9511' created.
Zowe will remove it on success, but if zwe exits with a non-zero code manual cleanup would be needed.
2025-02-27 10:03:02 <ZWELS:50727027> T800 INFO (zwe-internal-start-prepare) Zowe version: v3.2.0
2025-02-27 10:03:02 <ZWELS:50727027> T800 INFO (zwe-internal-start-prepare) build and hash: PR-4210#7088 (272a3de028308174a7f15db79195b268d4ed353b)
Validating Zowe core configuration for file(s)=/tmp/.zweenv-9511/.zowe-merged.yaml
Zowe core configuration is valid
+ [1/4][expected rc=  0, result rc=  0  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok1.yaml
  [1/4]: --------------------------------

  [2/4]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok2.yaml
! [Output]:
Temporary directory '/tmp/.zweenv-3789' created.
Zowe will remove it on success, but if zwe exits with a non-zero code manual cleanup would be needed.
2025-02-27 10:03:13 <ZWELS:50725452> T800 INFO (zwe-internal-start-prepare) Zowe version: v3.2.0
2025-02-27 10:03:13 <ZWELS:50725452> T800 INFO (zwe-internal-start-prepare) build and hash: PR-4210#7088 (272a3de028308174a7f15db79195b268d4ed353b)
Validating Zowe core configuration for file(s)=/tmp/.zweenv-3789/.zowe-merged.yaml
Zowe core configuration is valid
+ [2/4][expected rc=  0, result rc=  0  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok2.yaml
  [2/4]: --------------------------------

  [3/4]: /zowe/bin/zwe config validate -c ./yaml/zowe.er1.yaml
! [Output]:
Error: Validation of FILE(./yaml/zowe.er1.yaml):FILE(/zowe/files/defaults.yaml) against schema /zowe/schemas/zowe-yaml-schema.json:/zowe/schemas/server-common.json found invalid JSON Schema data
Validity Exceptions(s) with object at
  Validity Exceptions(s) with object at /zowe
    Validity Exceptions(s) with object at /zowe/setup
      Validity Exceptions(s) with object at /zowe/setup/dataset
        Validity Exceptions(s) with object at /zowe/setup/dataset/parmlibMembers
          Validity Exceptions(s) with string at /zowe/setup/dataset/parmlibMembers/zis
            string too short (len=7) 'ZWESIP0' 7 < MIN=8 at /zowe/setup/dataset/parmlibMembers/zis
            string pattern match fail s='ZWESIP0', pat='^ZWESIP([0-9A-Z\$\#\@]){2}$', at /zowe/setup/dataset/parmlibMembers/zis
+ [3/4][expected rc=  1, result rc=  1  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.er1.yaml
  [3/4]: --------------------------------

  [4/4]: /zowe/bin/zwe config validate -c ./yaml/zowe.er2.yaml
! [Output]:
Error: Validation of FILE(./yaml/zowe.er2.yaml):FILE(/zowe/files/defaults.yaml) against schema /zowe/schemas/zowe-yaml-schema.json:/zowe/schemas/server-common.json found invalid JSON Schema data
Validity Exceptions(s) with object at
  Validity Exceptions(s) with object at /zowe
    Validity Exceptions(s) with object at /zowe/setup
      Validity Exceptions(s) with object at /zowe/setup/dataset
        Validity Exceptions(s) with object at /zowe/setup/dataset/parmlibMembers
          Validity Exceptions(s) with string at /zowe/setup/dataset/parmlibMembers/zis
            string pattern match fail s='ABCDEF00', pat='^ZWESIP([0-9A-Z\$\#\@]){2}$', at /zowe/setup/dataset/parmlibMembers/zis
+ [4/4][expected rc=  1, result rc=  1  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.er2.yaml
  [4/4]: --------------------------------

! [Time elapsed]: 00:00:43

    ..::|[ T E S T     O V E R V I E W ]|::..
    -----------------------------------------

+ [1/4][expected rc=  0, result rc=  0  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok1.yaml
+ [2/4][expected rc=  0, result rc=  0  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.ok2.yaml
+ [3/4][expected rc=  1, result rc=  1  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.er1.yaml
+ [4/4][expected rc=  1, result rc=  1  ]: /zowe/bin/zwe config validate -c ./yaml/zowe.er2.yaml

Signed-off-by: Martin Zeithaml <[email protected]>
Copy link

github-actions bot commented Feb 26, 2025

build 7088 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/13544545961

Copy link

github-actions bot commented Feb 26, 2025

Test workflow 6184 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.2.0-PR-4210/zowe-3.2.0-pr-4210-7088-20250226131122.pax
Running on machine: zzow09
Result: FAILURE
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/13544693648

Copy link
Contributor

@JoeNemo JoeNemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants