sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.5k stars 65 forks source link

Tips not working on remote host #331

Closed digasico closed 1 year ago

digasico commented 1 year ago

Description

I have recently beeing using sourcery as a vscode extention on python, on my host machine (windows 11) it works fine, on my remote hosts (i connect to them using remote explorer extention from vscode and also install sourcery there, remotes are ubuntu 22.04) it detects the error just fine , but will not give me sugestions on the fixes (i have tried the same file so i know that there is a sugestion on to fix that specific error)

Code snippet that reproduces issue

I'm not providing a specific code snippet because it happens to all errors/warnings , i also tested 3 different remotes machines (all vm's with ubuntu 22.04)

Sourcery Version: Sourcery v1.1.0

digasico commented 1 year ago

Update: I ended up creating one more vm (just like the others) and in this one sourcery is working just fine , im clueless on what it could be , i'm open to sugestions on what it could be

bm424 commented 1 year ago

Hi @digasico, thanks for reaching out. The intermittent problem sounds strange. There are two things that are worth checking:

  1. First, would you be able to access your sourcery log file on your remote machine? On Ubuntu, it should be located at ~/.local/share/sourcery/sourcery.log. We can use this to see if Sourcery is throwing any errors.
  2. Second, can you try running Sourcery from the command line in one of your VMs? Try opening a terminal in VSCode, check it's active at the location of your remote project, then run pip install sourcery and sourcery review path/to/python_file.py. This way, we can check the Sourcery binary is able to connect to the authentication servers etc.
digasico commented 1 year ago

Hi , sorry i don't have the specific machines anymore so i can not provide logs , but somehow it is working fine on any machine now. But i know that at the time i tried to install sourcery using the pip , although it installed with sucess i still had the same problem. I'm closing this since i can't provide enough info to get to the bottom of this.