-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub re-login after refresh the page - vscode server #214110
Comments
@boltonidze are you using VS Code in your browser? |
Yes, that's true. We are deploying it to k8s with Juperyhub. After this the flow is the same as for Jupyterhub - users can open a bowser and run their own servers (pods) with VSCode. The problem is that we have GitHub Pull Request plugin, but when users refresh the page in his browser, they have to re-login to GitHub again. |
@TylerLeonhardt do you know why this might happen? |
@boltonidze when the user refreshes their page, are they re-connecting to the same container instance or is a fresh container instance? Also, can you share how you're deploying VS Code and where you are getting it from so we're sure you're using a supported thing? Also, can you share the server logs? As in, the logs where you are executing the VS Code CLI. |
@TylerLeonhardt Users re-connect to the same container (pod), we don't kill it. Server last logs are below:
I opened VSCode at 18:30:13 after long-time of inactivity and logged into GitHub for GitHub Pull Request Plugin. After that I refreshed the page at 18:32:05 and GitHub Pull Request Plugin started asking for login again. |
Can you answer this one too? How are you deploying and what are you running exactly to start the server. |
@TylerLeonhardt Yes, sure. We deployed with jupyter-hub helm chart. But we patched the original jupyterhub/k8s-hub:1.2.0 image to redirect to IP-address of pod instead of /user/<username>. We patched it because Configurable http proxy (this is a component of jupyter-hub that proxy different HTTP-connection to different machines depending on the prefix path of input request) changes path in requests from /user/<username>/<something> -> /<something>, but CHP can't change body of HTML-files which can contains something like this <script async="" src="/user/<_username_>/lab/extensions/catboost-widget/static/remoteEntry.ebd57709384ca584b1c0.js"></script> The rest of the deployment is the same as for jupyterhub. We use "https://aka.ms/install-vscode-server/setup.sh" script to install vscode inside the contauner. When VSCode server starts, we use the following script to install extensions: set -eo pipefail
set +x
echo `pwd`
whoami
ls -la
if ! [ -d installed_plugins ]; then
mkdir installed_plugins
fi
if ! [ -f installed_plugins/dbt_ext ]; then
code-server serve-local --install-extension innoverio.vscode-dbt-power-user --verbose --accept-server-license-terms >> installed_plugins/dbt_ext
fi
if ! [ -f installed_plugins/sqlfluff_ext ]; then
code-server serve-local --install-extension dorzey.vscode-sqlfluff --verbose --accept-server-license-terms >> installed_plugins/sqlfluff_ext
fi
if ! [ -f installed_plugins/github_ext ]; then
code-server serve-local --install-extension GitHub.vscode-pull-request-github --verbose --accept-server-license-terms >> installed_plugins/github_ext
fi and the server itself starts with: /usr/local/bin/code-server serve-local --accept-server-license-terms --without-connection-token --host 0.0.0.0 --verbose --port 8888 |
Hi @boltonidze 👋 that https://code.visualstudio.com/blogs/2022/12/07/remote-even-better#_enhanced-code-cli We should have a working scenario where your secrets are stored properly in the browser so that login persists so please give that a try and let us know how it goes. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Hello!
We deploy our VSCode in k8s with jupyterhub (instead of running jupyterlab we run vscode pod for each user). Pod with vscode lives endless. Everything work fine, but after refresh the page GitHub pull request plugin ask to login again.
I try to understand is it possible to avoid login to GitHub after each page refresh?
In logs I see
But after refresh a page token is missing again:
The text was updated successfully, but these errors were encountered: