vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

Use Docker CLI only

Open bwateratmsft opened this issue 3 years ago • 0 comments

Overview

It's finally time (sorta, starting as just a draft)! This PR is very big but it does a couple of key things:

  • Uses the Docker (and compose) CLI only for everything--no more Dockerode, no more HTTP endpoint, none of that
    • Uses the new, shared container runtime library (will be open-source very soon, before this is released)
  • Dumps the old ContextManager since it's not really necessary anymore
  • Closes #3263 and presumably a ton of the linked issues within

Verification Tasks

  • [x] Windows
    • [x] Debug Python
      • [x] Launch
      • [x] Attach
    • [x] Debug NodeJS
      • [x] Launch
      • [x] Attach
    • [x] Debug .NET
      • [x] Launch
      • [x] Attach
    • [x] Explorer
      • [x] Files
        • [x] Linux containers
        • [x] Windows containers
      • [x] Outdated images
      • [x] Tooltips
      • [x] Start/stop/etc. containers
      • [x] Inspect
      • [x] Logs
      • [x] Compose groups
      • [x] Performance
    • [x] Scaffolding
    • [x] Compose subsets
    • [x] Compose tasks
    • [x] Change runtime info
    • [x] No communication w/ Docker before necessary (#3475)
    • [x] Activation performance
  • [x] The same thing but Mac
  • [ ] The same thing but Linux

Bugs as I find them, checked off as I fix them

  • [ ] ACI doesn't really work at all https://github.com/microsoft/vscode-docker-extensibility/issues/90
  • [x] ~~FS performance is diminished due to ~~https://github.com/microsoft/vscode/issues/156691~~ need for LRU cache to maintain tree item stat info~~ I don't find any apparent difference in behavior if stat returns no useful info (except file type)
  • [x] Only sh getting opened in attach shell, never bash
  • [x] Can't run processes on Mac
  • [x] Clean up remaining // TODO: runtimes items
  • [x] File ops fail on Windows containers https://github.com/microsoft/vscode-docker-extensibility/pull/95
  • [x] Writing files on Linux fails due to incorrect destination and unterminated tar stream
  • [x] Outdated image checking is not working
  • [x] Command visibility VSCode contexts not being set when Docker context changes
  • [x] nodeUtils.test.ts test failures
  • [x] Last-chosen service subset is not being remembered https://github.com/microsoft/vscode-azuretools/issues/1216
  • [x] Related to https://github.com/microsoft/vscode-docker-extensibility/issues/90, too frequent context checks
  • [x] Bad startup performance on explorer view
  • [x] Issues parsing some port strings https://github.com/microsoft/vscode-docker-extensibility/issues/41
  • [x] Compose groups aren't getting grouped (label not making it?) https://github.com/microsoft/vscode-docker-extensibility/pull/92
  • [x] Volume listing error: cannot read properties of undefined (reading 'valueOf')
  • [x] NodeJS debugging not working
  • [x] Debugging does not launch browser automatically https://github.com/microsoft/vscode-docker-extensibility/pull/93
  • [x] Tooltip failing on images w/ containers
  • [x] Image sizes are wrong https://github.com/microsoft/vscode-docker-extensibility/pull/91
  • [x] Compose group commands not working (cannot read properties of undefined, reading 'commandName')

Note: I found the explorer view performance to be degraded due to three things:

  • The first docker CLI call is a little bit slower, likely due to some esoteric OS caching things
  • Too many calls to check Docker context (item added above for that)
  • The biggest thing: VSCode is activating some extensions (according to the spinner in the status bar at the bottom), but it's really not clear to me what. The extension host log did not show anything, nor did the running extensions. I've noticed that if I wait a while after startup, and then go to the explorer view, performance is much better.

bwateratmsft avatar Jul 21 '22 17:07 bwateratmsft