Skip to content

[Feat]: Update Code to 1.80 #6316

Closed

Description

@benz0li

What is your suggestion?

Update Code to 1.80

Why do you want this feature?

Are there any workarounds to get this functionality today?

Are you interested in submitting a PR for this?

Activity

  1. benz0li commented on Jul 8, 2023

    @benz0li
    ContributorAuthor

    @code-asher VS Code 1.80.0 was released two days ago: https://code.visualstudio.com/updates/v1_80

    Take a .1/.2-release as base for a new code-server release.
    ℹ️ .0-releases have had some fundamental bugs.

    1. use the .0/.1-releases as base for a release candidate (RC)
    2. test, debug and fix; maybe do another RC-release
    3. update codebase to the .2-release
    4. test, debug and fix
    5. release
  2. aleleba commented on Jul 10, 2023

    @aleleba

    @code-asher I want to subscribe to this, we need to update the VSCode Version, maybe we can automate this process, I will be honored to help you in this task of automation if you want.

  3. aleleba commented on Jul 11, 2023

    @aleleba

    @code-asher I have been reading the code of the project and notice that vscode is a submodule of this project, I found some documentation on how the project can automate the process of update the submodules with github actions. I attach some docs for this: https://tommoa.me/blog/github-auto-update-submodules/ . The development team can focus con make the product better and not need to remind to update submodules.

  4. code-asher commented on Jul 11, 2023

    @code-asher
    Member

    Updating the submodule is pretty easy, the more difficult part is resolving conflicts with the patches and I am not sure that can be fully automated.

  5. self-assigned this
    on Jul 11, 2023
  6. aleleba commented on Jul 14, 2023

    @aleleba

    @code-asher if you teach me on how to resolve this conflicts, I can assist the team on my free time 👍🏼

  7. code-asher commented on Jul 14, 2023

    @code-asher
    Member

    That would be fantastic! We use quilt for patches so the basic workflow is:

    1. Update VS Code submodule to the new version
    2. quilt push -f
    3. If there are conflicts then resolve them
    4. quilt refresh
    5. Back to step two until there are no more patches

    If you are not familiar with quilt, the conflicts get placed in .rej files so resolving just means looking at those files and adding the changes back manually.

    More details here: https://coder.com/docs/code-server/latest/CONTRIBUTING#version-updates-to-code

    Often the conflicts are just simple line changes. Upstream added a new line, moved a line, etc, so we just have to re-apply our changes in the new context.

    If you decide to tackle this please feel free to lean on me for any support you might need.

  8. aleleba commented on Jul 15, 2023

    @aleleba

    @code-asher, this docs are great, I will start working on this the next week on my free time, thank you for the docs, I will be reading it, and let you know if I have some doubts, thank you to let me help on this amazing project.

  9. benz0li commented on Jul 15, 2023

    @benz0li
    ContributorAuthor

    @code-asher How to get the correct replacement SHA-256 value?

    index.html.rej

    --- lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
    +++ lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
    @@ -5,7 +5,7 @@
     	<meta charset="UTF-8">
     
     	<meta http-equiv="Content-Security-Policy"
    -		content="default-src 'none'; script-src 'sha256-N4YFn5ze5crjPqMK/opogKs7bSGWtf3lmjV/3LfbSOs=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
    +		content="default-src 'none'; script-src 'sha256-B5FRTRmagxqZ2yiS/ip5EgFZJPHAF0G0O3NgwgN6hhg=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
     
     	<!-- Disable pinch zooming -->
     	<meta name="viewport"
    
  10. benz0li commented on Jul 15, 2023

    @benz0li
    ContributorAuthor

    @aleleba FYI: Docker image glcr.b-data.ch/jupyterlab/python/base:latest-devtools1 contains code-server and has all prerequisites installed to build code-server itself.
    ℹ️ See JupyterLab Python docker stack for more information about this image.

    Footnotes

    1. Multi-arch: linux/amd64, linux/arm64/v8 ↩

  11. benz0li commented on Jul 15, 2023

    @benz0li
    ContributorAuthor

    P.S.: 1.80.1 released

  12. code-asher commented on Jul 17, 2023

    @code-asher
    Member
  13. benz0li commented on Jul 19, 2023

    @benz0li
    ContributorAuthor

    My basic workflow from scratch:

    Update Code

    1. Clone repository
      git clone https://github.com/coder/code-server.git
    2. Update VS Code submodule to the new version
      cd code-server
      git submodule init
      git submodule update
      cd lib/vscode
      git checkout 1.80.1
      cd ../..
    3. quilt push -f
      • If there are conflicts then resolve them
    4. quilt refresh
      • Back to step three until there are no more patches

    Set version

    export VERSION='4.15.0-rc.1'

    Install dependencies

    yarn

    Build code-server

    yarn build
    yarn build:vscode
    KEEP_MODULES=1 yarn release

    Build release packages

    yarn release:standalone
    yarn test:integration
    yarn package

    Then, I deploy at https://coder.jupyter.b-data.ch/ (image R (base:test-devtools-docker)) and test some functionality manually.

  14. benz0li commented on Jul 19, 2023

    @benz0li
    ContributorAuthor

    Command code-server --version in JupyterLab Terminal returns 0.0.0 070a5a3179fe8213102854bcb37607bda690358f with Code 1.80.1.
    ℹ️ In code-server > Help > About the version is correctly displayed: v4.15.0-rc.1

    @code-asher Can you tell why that is?

  15. code-asher commented on Jul 19, 2023

    @code-asher
    Member

    Hmmm good question. It pulls the version from the package.json so maybe it did not get updated somehow?

    That said, I launched https://coder.jupyter.b-data.ch and opened the JupyterLab terminal and it gives me the right version!

    jupyterlab

  16. code-asher commented on Jul 19, 2023

    @code-asher
    Member

    Actually that is not the right version. Previous version. My bad. Will test a bit and see if I get the same issue.

  17. benz0li commented on Jul 20, 2023

    @benz0li
    ContributorAuthor

    Actually that is not the right version. Previous version. My bad. Will test a bit and see if I get the same issue.

    Most likely you started image R (jupyterlab/r/verse:latest-devtools-docker) instead of R (base:test-devtools-docker).

  18. code-asher commented on Jul 20, 2023

    @code-asher
    Member

    Ahh thank you! Looks like we set the version in the release.yaml flow just before publishing releases.

    If I recall correctly we have this because we wanted the ability to promote an RC to a full release without having to rebuild it (so we can just replace the version without rebuilding since that would technically be a different, untested build) but it has not been fully implemented yet (we still have to set VERSION during build time for the version embedded in VS Code).

    I think at some point what we will need to do is remove VERSION and dynamically update lib/vscode/product.json the same way we do package.json instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementSome improvement that isn't a feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions