vscode-openshift-tools icon indicating copy to clipboard operation
vscode-openshift-tools copied to clipboard

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

Open mohitsuman opened this issue 5 years ago • 2 comments

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 avatar Sep 09 '20 15:09 mohitsuman

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

mohitsuman avatar Sep 09 '20 20:09 mohitsuman

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

dgolovin avatar Sep 15 '20 16:09 dgolovin