Adding debug for containers in IDEs#1106
Adding debug for containers in IDEs#1106AlexandreDoneux wants to merge 7 commits intoINGInious:mainfrom
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 Duplication 0
TIP This summary will be updated as you push new changes. Give us feedback
bc14a1d to
a953b4a
Compare
anthonygego
left a comment
There was a problem hiding this comment.
Maybe we should enable this only on demand/when needed. Either passing an environment variable from PyCharm and frowarding it from the agent to the container, or rely on the existing debug flag.
If this fails silently if the server is not listening, this could be OK, but I guess in this case it would triy and time out. This is not a wanted behaviour as this would severly impact the execution time
A nice addition (not for this PR) would be to allow the user to specify the hostname and port of the debug server and keep those as default. If the docker stack is located on another host, the host-gateway IP won't match the debug server one. Besides, the hardcoded port may not be available on the developer host if it is already used by another service.
|
The existing debug_mode is defined for each job separately and is given by the BackendNewJob message to the docker agent. So it is best to use a new environment variable to indicate if debug through the IDE is wanted. Any suggestions for a good variable name so it isn't confused for a parameter for the remote ssh debug ? For a future PR for remote debugging : # Only for backend: local
local-config:
# debug_host: localhost # host that will be indicated to users when they want to use the task remote debug feature. Automatically guessed by
# default
debug_ports: 64000-64100 #port range use for remote debug feature |
Actually it might be more productive to directly add the options in the webapp config file and the docker agent CLI arguments.
If the docker agent is used on another host, the args are passed in the CLI. This In conclusion, |
|
A message is now added to stderr if the debug server is not available. It does not fail the job anymore. I have also fixed the time limit for a job to half an hour if the container debugging is enabled. Without it the job just stops after the set limit and debugging is not possible. Should I add that fixed limit as a config parameter ? |
This PR aims to add the possibility of interactive debug inside the containers running jobs.
Steps :
pydevd_pycharmpython package)Do you think debug capabilities for the run files is an interesting addition ?