redhat-developer / vscode-openshift-tools

OpenShift extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector
MIT License
91 stars 54 forks source link

Change in preference of local odo causes extension bundled odo preference change #1736

Open mohitsuman opened 3 years ago

mohitsuman commented 3 years ago

Environment VS Code version: 1.48.2 OS: darwin Extension version: 0.1.6

Description If the local odo has experimental flag set as true , then the extension bundled odo also fetches the same preference and this causes the extension to break.

This happens as the preference is globally set.

Error Trace:

Failed to create Component with error 'Error: Command failed: "/Users/mohitsuman/.vscode/extensions/redhat.vscode-openshift-connector-0.1.6/out/tools/darwin/odo" create nodejs:10 comp124 --git https://github.com/mohitsuman/nodejs-ex --ref HEAD --app app123 --project demo-discon
 ✗  flag --git, requires --s2i flag to be set, when in experimental mode.
mohitsuman commented 3 years ago

This can be handled using following:

  1. OpenShift extension bundles use the global preference and create a separate terminal with specific ODO_EXPERIMENTAL env variable to override the global preference for your own dev/test odo, then the two binaries can target to different odo preference

  2. set the location of the global preference file using GLOBALODOCONFIG

dgolovin commented 3 years ago

We should investigate if GLOBALODOCONFIG should point to folder or file.