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

Server adapter: DEV_MODE, DEBUG_MODE, DEBUG_PORT keys (and default values) are hard-coded, not read from docker image

XMLWordPrintable

    • devex #136 August 2017
    • 24

      to turn on/off debugging and dev_mode for an app, one needs to set env variables. The keys that are used to set the values are all defined in the docker image labels (inspectable by doing

      docker inspect <docker-image-id>

      :

      • nodejs
        "Labels": {
                        ...
                        "com.redhat.dev-mode": "DEV_MODE:false",
                        "com.redhat.dev-mode.port": "DEBUG_PORT:5858",
                        ...
        
      • eap
        "Labels": {
                        ...
                       "com.redhat.dev-mode": "DEBUG:true",
                        "com.redhat.dev-mode.port": "DEBUG_PORT:8787",
                        ...
        

      Our code on the other hand is hard-coding these, not reading the keys from the docker image:

      public class OpenShiftDebugUtils {
         private static final String DEBUG_KEY = "DEBUG";
         private static final String DEBUG_PORT_KEY = "DEBUG_PORT";
         ...
      
      public class OpenShiftLaunchController extends AbstractSubsystemController
      		implements ISubsystemController, ILaunchServerController {
          ...
          private static final String DEV_MODE = "DEV_MODE"; //$NON-NLS-1$
          ...
      

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: