Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-16030

CLONE - Env variables wizard: error when editing env variables for existing app if server does not support env variables

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.1.Beta1
    • Fix Version/s: 4.2.0.Alpha1
    • Component/s: openshift
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. ASSERT: make sure you have an account on a OS server that does NOT support env variables (ex. console.itos.redhat.com)
      2. ASSERT: make sure you have an existing application on this server
      3. EXEC: in OpenShift Explorer: pick "Edit Environment Variables..." in the context menu of your application

      Result:
      You get an error:

      In the Eclipse log you'll spot the following:

      com.openshift.client.OpenShiftRequestException: Could not find link "LIST_ENVIRONMENT_VARIABLES" in resource "ApplicationResource"
      	at com.openshift.internal.client.AbstractOpenShiftResource.getLink(AbstractOpenShiftResource.java:123)
      	at com.openshift.internal.client.AbstractOpenShiftResource$ServiceRequest.execute(AbstractOpenShiftResource.java:142)
      	at com.openshift.internal.client.ApplicationResource.loadEnvironmentVariables(ApplicationResource.java:622)
      	at com.openshift.internal.client.ApplicationResource.getOrLoadEnvironmentVariables(ApplicationResource.java:616)
      	at com.openshift.internal.client.ApplicationResource.getEnvironmentVariables(ApplicationResource.java:611)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.initVariablesFor(EnvironmentVariablesWizardModel.java:81)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.initVariables(EnvironmentVariablesWizardModel.java:64)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.loadEnvironmentVariables(EnvironmentVariablesWizardModel.java:58)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardPage$LoadEnvironmentVariablesJob.doRun(EnvironmentVariablesWizardPage.java:240)
      	at org.jboss.tools.openshift.express.internal.ui.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:36)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      

      Expected result:
      You should not be able to edit environment variables if the server is not offering this capability.

      Show
      ASSERT: make sure you have an account on a OS server that does NOT support env variables (ex. console.itos.redhat.com) ASSERT: make sure you have an existing application on this server EXEC: in OpenShift Explorer: pick "Edit Environment Variables..." in the context menu of your application Result: You get an error: In the Eclipse log you'll spot the following: com.openshift.client.OpenShiftRequestException: Could not find link "LIST_ENVIRONMENT_VARIABLES" in resource "ApplicationResource" at com.openshift.internal.client.AbstractOpenShiftResource.getLink(AbstractOpenShiftResource.java:123) at com.openshift.internal.client.AbstractOpenShiftResource$ServiceRequest.execute(AbstractOpenShiftResource.java:142) at com.openshift.internal.client.ApplicationResource.loadEnvironmentVariables(ApplicationResource.java:622) at com.openshift.internal.client.ApplicationResource.getOrLoadEnvironmentVariables(ApplicationResource.java:616) at com.openshift.internal.client.ApplicationResource.getEnvironmentVariables(ApplicationResource.java:611) at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.initVariablesFor(EnvironmentVariablesWizardModel.java:81) at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.initVariables(EnvironmentVariablesWizardModel.java:64) at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardModel.loadEnvironmentVariables(EnvironmentVariablesWizardModel.java:58) at org.jboss.tools.openshift.express.internal.ui.wizard.environment.EnvironmentVariablesWizardPage$LoadEnvironmentVariablesJob.doRun(EnvironmentVariablesWizardPage.java:240) at org.jboss.tools.openshift.express.internal.ui.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:36) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Expected result: You should not be able to edit environment variables if the server is not offering this capability.
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)

      Description

      If OpenShift server does not support add/remove/modify environment variables it cause error. There should be some user-friendly dialog. See attached image. This is captured from opening shell with add/modify/remove environment variables (in context menu of application choose "Edit Environment Variables..."

      Another one is show after attempt to add variable.
      Other "Processing environment variables..."

      Probably good solution should show dialog "Server name does not support modifying environment variables" and don't open shell with table of environment variables (my opinion).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maxandersen Max Andersen
                  Reporter:
                  mlabuda Marián Labuda
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: