• Jari Kolehmainen's avatar
    Fix kubeconfig-sync issues (#2692) · 8fff064e
    Jari Kolehmainen authored
    
    
    - Removed `getFreePort` as its use is always a race condition. Change
      all uses of it to retrive the port after listening
    
    - Added `getPortFrom` as a helper function to read a port from a stream
    
    - Remove `Cluster.ownerRef` as it is outdated and no longer needed for 5.0
    
    - Remove `Cluster.enabled`, no longer needed because of above
    
    - Removed `Cluster.init`, moved its contents into `Cluster.constructor`
      as nothing in that function is asyncronous. Currently only being run
      on `main` as a stop gap until `renderer` gets its own version of
      `Cluster`
    
    - Refactored `LensProxy` so as to prevent `pty.node` (a NodeJS
      extension) being included in `webpack.extension.ts`'s run
    
    - Removed the passing around of the proxy port as that can now be
      accessed from an instance of `LensProxy`
    
    - purge ContextHandler's cache on disconnect
    Co-authored-by: default avatarSebastian Malton <sebastian@malton.name>
    8fff064e