zowe / docs-site

Documentation for the Zowe project
https://docs.zowe.org/
Creative Commons Attribution 4.0 International
71 stars 133 forks source link

Document `defaults.yaml` consequences #4014

Open Martin-Zeithaml opened 3 days ago

Martin-Zeithaml commented 3 days ago

When updating zowe.yaml, user might think, that commenting/deleting a component will disable such component. This is not true anymore if such component is set in defaults. The default.yaml is "hidden" from the user point of view. Let's show this on the following example, where user will prepare config, which is different comparing to merged config:

User's config

components:
#  comp1:
 #   enabled: true
  comp2:
    enabled: true

Defaults.yaml

components:
  comp1:
    enabled: true
    port: 123
    timeTraveling: DeLorean

Merged result

components:
  comp1:
    enabled: true
    port: 123
    timeTraveling: DeLorean
  comp2:
    enabled: true

Solution

components:
# User must (in this case) keep comp1 and disabled it
  comp1:
    enabled: false
  comp2:
    enabled: true

Bonus: This is valid for configmgr. For example, if zwe command is used in shell version, there might not be merged config and then the behavior will be different comparing to javascript version of the same command.