Code Monkey home page Code Monkey logo

mirrord-vscode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mirrord-vscode's Issues

VS Code Node debugger crashes

Bug Description

When debugging a Node process with mirrord enabled (no matter which features are turned on), I get the attached crash.
Screenshot 2022-09-07 at 22 38 23

When adding the runtimeExecutable env var as suggested, it works, but then breakpoints are grayed out like so:
Screenshot 2022-09-07 at 22 45 28

Steps to Reproduce

Debug a Node process in VS Code with mirrord enabled.

Backtrace

No response

Relevant Logs


extensionHostProcess.js:105
mirrord stderr: 2023-06-15T07:51:18.250399Z ERROR kube_client::client::builder: failed with status 500 Internal Server Error

extensionHostProcess.js:105
mirrord: {"type":"FinishedTask","name":"waiting for pod to be ready...","success":true,"message":"pod is ready"}

Your operating system and version

MacOS M1

Local process

node

Local process version

No response

Additional Info

No response

Workaround

Set runtimeExecutable like it suggests, then everything works.

Error reported twice

Bug Description

image

Steps to Reproduce

For me this happened when running with the operator and getting the error from https://github.com/metalbear-co/operator/issues/253

Backtrace

No response

Relevant Logs

No response

Your operating system and version

macOS 13.4

Local process

npm

Local process version

No response

Additional Info

No response

allow specifying mirrord binary in extension settings

Right now it always tries to find the binary by itself, and if it can't download or use any of the local found binaries it fails.
Let users specify a specific binary to use, so then they can use it without downloading or let them pin to a specific binary.
Would be useful for extension development and testing as well

mirrord not working in VS code jupyter

Bug Description

Mirrord doesn't seem to mirror network operations when using it through vscode inside a jupyter notebook.

Steps to Reproduce

to reproduce save the following json as XXX.ipynb, and open it with vscode and debug the cell using the dropdown menu

image

i am getting my ip, instead of the one of my cluster

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "ip = requests.get(\"https://checkip.amazonaws.com\").text.strip()\n",
    "print(ip)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.7 ('.venv': poetry)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.7"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "5e06dea6d00be0c404d7d97cc88274261dff12025f3151a0ade91cb9e1d96187"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

Backtrace

No response

Relevant Logs

No response

Your operating system and version

Macos 13.0.1

Local process

python cell through vscode jupyter

Local process version

No response

Additional Info

No response

Add a configuration setting to disable auto-update

Since some corporate users can't auto-update their agent, auto-updating the client can cause breakages for them.
Add a separate config value where they can specify the exact version they want their IDE to download - an empty value meaning just use whatever's there at the moment.
If no CLI has been downloaded and auto-update is disabled, download the latest version.

Failure when debugging Spring Boot pod in VSCode

Bug Description

Mirrord can't connect to a Spring boot application from the VSCode extension. Similar to metalbear-co/mirrord-intellij#42 for the Intellij plugin

Steps to Reproduce

  1. Try to debug a Spring boot application using mirrod + VSCode extension

Backtrace

No response

Relevant Logs

ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

Your operating system and version

Fedora 38

Local process

Local process version

No response

Additional Info

No response

zsh not supported with `node-terminal`

Follow up after #37 #34
When zsh is being used we get

/Users/user/.oh-my-zsh/oh-my-zsh.sh:56: read failed: is a directory
compinit:480: compdump: function definition file not found

Default config path text is confusing

When using the default .mirrord/mirrord.json file the following message shows:
image
It seems like it's default configuration, but it is actually just the default path.

Add mock tests

Functionalities like our DebugConfiguration extension, MirrordAPI etc can be easily mocked and hence we should add tests for them

Kube context cluster name with spaces cannot be connected to

Bug Description

If you have your kubernetes cluster context with a name with a space: eg. Staging Cluster, then you are unable to switch to the cluster in VScode:

The error reported:

Failed to switch the namespace: error: Unexpected args: [Staging Cluster]

If I change the name to staging-cluster in the kube config, then connecting works.

Steps to Reproduce

  1. Create a cluster and make sure that the name has a space in the kube config.
  2. Try to switch the namespace and / or the cluster.

Backtrace

No response

Relevant Logs

No response

Your operating system and version

Mac OS latest

Local process

.

Local process version

No response

Additional Info

No response

Restart debug session fails

When restarting a debug session with mirrord active, the new session will fail because of failing to connect to the internal proxy.
I am pretty sure there's not much we can do about this since our entry point only happens on new session, but would like to verify it and make sure then maybe document it if that's the case.

Two concurrent debug sessions doesn't work

When running two different debug sessions, each one different config file and target at the same time in the same window in VSCode, the second launched service doesn't hit breakpoints/get traffic and looks pretty much dead.
Happened on macOS + operator while targeting deployment - more specifically running ip-visit-counter then ip-info
https://github.com/metalbear-co/playground
ip-info doesn't steal/answer traffic (then dies?)
We thought maybe it's a Go/Delve/VSCode issue but when I did the same without mirrord active it worked.

VS CODE IDE Extension - Relative Paths are not interpolated

Bug Description

Using the mirrord extension via debugger in VS Code IDE, relative paths set on MIRRORD_CONFIG_FILE env set in launch.json is not interpolated correctly. Using an absolute path works as intended.

see discord discussion: https://discord.com/channels/933706914808889356/1001193615474827264/1148741565003604078

Steps to Reproduce

VsCode Info

Mirrord Extension Version: v3.52.0
VSCODE Version: 1.81.1 (Universal)
OS: Darwin arm64 22.5.0

Example launch.json with relative path

{
    "version": "0.2.0",
    "configurations": [
        {    
            "name": "Launch Service",
            "type": "go",
            "request": "launch",
            "mode": "exec",
            "program": "${workspaceFolder}/artifacts/build/debug/darwin/arm64/${workspaceFolderBasename}",
            "hideSystemGoroutines": true,
            "env":{
                "MIRRORD_CONFIG_FILE": "${workspaceFolder}/artifacts/config/mirrord.yaml"
            }
        }
    ],
}

Backtrace

No response

Relevant Logs

Error: ENOENT: no such file or directory, open '/${workspaceFolder}/artifacts/config/mirrord.yaml'

Your operating system and version

macOS 13.4.1

Local process

VSCODE IDE Extension

Local process version

No response

Additional Info

https://github.com/golang/vscode-go/blob/master/docs/debugging.md

On initial use, show a banner explaining basic usage

The usage at the moment can be a bit too simple - people expect to have to configure something. The banner should show a picture drawing attention to the "enable mirrord" button, and explain that clicking it will make the next run happen in the context of the k8s cluster, no configuration required.

Not sure a banner or any type of image is supported in VS Code, so if it isn't find some other more idiomatic solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.