Skip to content

Fixes hanging resolveExternalUri #463

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

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d4867ff
gitpod server initial commit
akosyakov Sep 2, 2020
4482ac4
Always enable proposed API
jeanp413 Dec 21, 2021
7fdcf6a
Respect NO_PROXY rules when doing requests
jeanp413 Apr 18, 2022
da97780
feat(gulp): generate dummy github auth extension
Jun 15, 2022
1a6ee91
Add Marketplace Extension Control Manifest
filiptronicek Jul 22, 2022
2b638ef
[gp-code] Report workbench errors
mustard-mh Aug 26, 2022
3d0c29a
extension installation metrics
akosyakov Sep 2, 2022
61d5ac7
track loading and failed windows
akosyakov Sep 14, 2022
93b99da
remove unused todo
mustard-mh Sep 16, 2022
9960799
Add UnhandledError telemetry error report
mustard-mh Sep 20, 2022
c5b7932
change workbench var name
mustard-mh Sep 23, 2022
e72fa7b
Remove content status request
jeanp413 Oct 5, 2022
0dadc27
Move `Ports` view from experimental
filiptronicek Oct 10, 2022
0f05465
Responsive PortsView
mustard-mh Oct 11, 2022
549f26c
Fix compile error
mustard-mh Oct 13, 2022
fe84e87
Fix a tag open tab twice for Firefox
mustard-mh Oct 13, 2022
1255a92
Fix compilation
jeanp413 Oct 15, 2022
f7d0e36
update package.json
jeanp413 Oct 15, 2022
336c782
Disable download action
mustard-mh Oct 17, 2022
a4cfa5c
🆙 bump gitpod-remote version
mustard-mh Oct 17, 2022
0bb644a
🆙 bump gitpod-remote version
mustard-mh Oct 17, 2022
7695f8b
remove unused tasks
jeanp413 Oct 17, 2022
f07604d
Fix name of portsView incorrect after drop to other views
mustard-mh Oct 19, 2022
e4b209c
Use ports order from supervisor
mustard-mh Oct 19, 2022
c93789c
Add title field back to make view container available
mustard-mh Oct 21, 2022
0c3a2aa
Enable webview in Gitpod
mustard-mh Oct 28, 2022
f4c664f
Fix in-product changelog
mustard-mh Nov 1, 2022
f164651
Add checker for in operator
mustard-mh Nov 1, 2022
c785775
Remove RemoteExplorer
mustard-mh Nov 1, 2022
c9ca139
💄
mustard-mh Nov 2, 2022
b803b0b
Update lockfile and external import
filiptronicek Nov 2, 2022
bf57636
switch to Gitpod OpenVSX mirror
akosyakov Oct 27, 2022
3a6aac2
Fix compilation
jeanp413 Nov 4, 2022
3c6029a
Add galleryHost label
jeanp413 Nov 4, 2022
4c81d21
add missing extraData params
iQQBot Nov 4, 2022
d847503
update product.json
jeanp413 Nov 8, 2022
38cac59
update yarn.lock
jeanp413 Nov 9, 2022
d3dcc93
Fixes https://github.com/gitpod-io/gitpod/issues/14248
jeanp413 Nov 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,18 @@
}
]
}
},
{
"files": [
"build/gulpfile.gitpod.js",
"src/vs/gitpod/*",
"extensions/gitpod*/**"
],
"rules": {
"header/header": [
"off"
]
}
}
]
}
21 changes: 21 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM gitpod/workspace-full:latest

USER gitpod

# We use latest major version of Node.js distributed VS Code. (see about dialog in your local VS Code)
RUN bash -c ". .nvm/nvm.sh \
&& nvm install 16 \
&& nvm use 16 \
&& nvm alias default 16"

RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix

# Install dependencies
RUN sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
xvfb x11vnc fluxbox dbus-x11 x11-utils x11-xserver-utils xdg-utils \
fbautostart xterm eterm gnome-terminal gnome-keyring seahorse nautilus \
libx11-dev libxkbfile-dev libsecret-1-dev libnotify4 libnss3 libxss1 \
libasound2 libgbm1 xfonts-base xfonts-terminus fonts-noto fonts-wqy-microhei \
fonts-droid-fallback vim-tiny nano libgconf2-dev libgtk-3-dev twm \
&& sudo apt-get clean && sudo rm -rf /var/cache/apt/* && sudo rm -rf /var/lib/apt/lists/* && sudo rm -rf /tmp/*
36 changes: 36 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
image:
file: .gitpod.Dockerfile
ports:
- port: 9888
onOpen: open-browser
tasks:
- init: |
yarn
yarn server:init
command: |
gp sync-done init
export NODE_ENV=development
export VSCODE_DEV=1
yarn gulp watch-init
name: watch app
- command: |
export NODE_ENV=development
export VSCODE_DEV=1
gp sync-await init
cd ./extensions
yarn watch
name: watch extension
- command: |
export NODE_ENV=development
export VSCODE_DEV=1
gp sync-await init
./scripts/code-server.sh --without-connection-token
name: run app
openMode: split-right
github:
prebuilds:
pullRequestsFromForks: true
vscode:
extensions:
- dbaeumer.vscode-eslint
- svelte.svelte-vscode
39 changes: 38 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch gitpod-web",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}",
"--extensionDevelopmentPath=${workspaceRoot}/extensions/gitpod-web",
"--log=debug"
],
"outFiles": [
"${workspaceRoot}/extensions/gitpod-shared/out/**/*.js",
"${workspaceRoot}/extensions/gitpod-web/out/**/*.js",
]
},
{
"name": "Launch gitpod-remote",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}",
"--extensionDevelopmentPath=${workspaceRoot}/extensions/gitpod-remote",
"--log=debug"
],
"outFiles": [
"${workspaceRoot}/extensions/gitpod-shared/out/**/*.js",
"${workspaceRoot}/extensions/gitpod-remote/out/**/*.js",
]
},
{
"type": "node",
"request": "launch",
Expand Down Expand Up @@ -272,7 +302,14 @@
"presentation": {
"group": "0_vscode",
"order": 2
}
},
"env": {
"VSCODE_DEV": "1",
"NODE_ENV": "development"
},
"args": [
"--without-connection-token"
]
},
{
"type": "node",
Expand Down
17 changes: 17 additions & 0 deletions BUILD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
packages:
- name: install
type: generic
srcs:
- "**"
config:
commands:
- ["yarn"]
- name: init
type: generic
deps:
- ":install"
config:
commands:
- ["yarn", "--cwd", "./install/build", "compile"]
- ["yarn", "--cwd", "./install", "compile"]
- ["yarn", "--cwd", "./install", "download-builtin-extensions"]
7 changes: 6 additions & 1 deletion build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,9 @@ xterm-addon-*/fixtures/**
xterm-addon-*/out/**
xterm-addon-*/out-test/**


# TODO: Remove this once gitpod-protocol package doesn't ship source code
@gitpod/gitpod-protocol/src/**
@gitpod/gitpod-protocol/data/**
@gitpod/gitpod-protocol/node_modules/**
@gitpod/gitpod-protocol/lib/*.d.ts
@gitpod/gitpod-protocol/lib/*.d.ts.map
9 changes: 9 additions & 0 deletions build/.webignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ xterm-addon-webgl/out/**
!@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js.min.js
!@microsoft/applicationinsights-shims/dist/umd/applicationinsights-shims.min.js

@improbable-eng/**
!@improbable-eng/grpc-web/dist/grpc-web-client.umd.js

@gitpod/**
!@gitpod/local-app-api-grpcweb/lib/localapp.js
!@gitpod/ide-metrics-api-grpcweb/lib/index.js

browser-headers/**
google-protobuf/**

@zip.js/**
[email protected]/zip.js/dist/zip-no-worker-deflate.min.js
80 changes: 80 additions & 0 deletions build/gulpfile.gitpod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*!--------------------------------------------------------
* Copyright (C) Gitpod. All rights reserved.
*--------------------------------------------------------*/

'use strict';

const promisify = require('util').promisify;
const cp = require('child_process');
const argv = require('yargs').argv;
const vsce = require('vsce');
const gulp = require('gulp');
const path = require('path');
const es = require('event-stream');
const util = require('./lib/util');
const task = require('./lib/task');
const rename = require('gulp-rename');
const ext = require('./lib/extensions');

gulp.task(task.define('watch-init', require('./lib/compilation').watchTask('out', false)));

const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
const marketplaceExtensions = ['gitpod-remote'];
const outMarketplaceExtensions = 'out-gitpod-marketplace';
const cleanMarketplaceExtensions = task.define('clean-gitpod-marketplace-extensions', util.rimraf(outMarketplaceExtensions));
const bumpMarketplaceExtensions = task.define('bump-marketplace-extensions', () => {
if ('new-version' in argv && argv['new-version']) {
const newVersion = argv['new-version'];
console.log(newVersion);
return Promise.allSettled(marketplaceExtensions.map(async extensionName => {
const { stderr } = await promisify(cp.exec)(`yarn version --new-version ${newVersion} --cwd ${path.join(extensionsPath, extensionName)} --no-git-tag-version`, { encoding: 'utf8' });
if (stderr) {
throw new Error('failed to bump up version: ' + stderr);
}
}));
}
});

const bundlePortsWebview = task.define('bundle-remote-ports-webview', async () => {
await promisify(cp.exec)(`yarn --cwd ${path.join(extensionsPath, 'gitpod-remote')} run build:webview`, { encoding: 'utf8' });
gulp.src([`${path.join(extensionsPath, 'gitpod-remote')}/public/**/*`]).pipe(gulp.dest(path.join(outMarketplaceExtensions, 'gitpod-remote/public/')));
});
gulp.task(bundlePortsWebview);
for (const extensionName of marketplaceExtensions) {
const cleanExtension = task.define('gitpod:clean-extension:' + extensionName, util.rimraf(path.join(outMarketplaceExtensions, extensionName)));
const bumpExtension = task.define('gitpod:bump-extension:' + extensionName, async () => {
if ('new-version' in argv && argv['new-version']) {
const newVersion = argv['new-version'];
const { stderr } = await promisify(cp.exec)(`yarn version --new-version ${newVersion} --cwd ${path.join(extensionsPath, extensionName)} --no-git-tag-version`, { encoding: 'utf8' });
if (stderr) {
throw new Error('failed to bump up version: ' + stderr);
}
}
});
const bundleExtension = task.define('gitpod:bundle-extension:' + extensionName, task.series(
cleanExtension,
bumpExtension,
() =>
ext.minifyExtensionResources(
ext.fromLocal(path.join(extensionsPath, extensionName), false)
.pipe(rename(p => p.dirname = `${extensionName}/${p.dirname}`))
).pipe(gulp.dest(outMarketplaceExtensions))
));
gulp.task(bundleExtension);
const publishExtension = task.define('gitpod:publish-extension:' + extensionName, task.series(
bundleExtension,
bundlePortsWebview,
() => vsce.publish({
cwd: path.join(outMarketplaceExtensions, extensionName)
})
));
gulp.task(publishExtension);
const packageExtension = task.define('gitpod:package-extension:' + extensionName, task.series(
bundleExtension,
bundlePortsWebview,
() => vsce.createVSIX({
cwd: path.join(outMarketplaceExtensions, extensionName)
})
));
gulp.task(packageExtension);
}
58 changes: 56 additions & 2 deletions build/gulpfile.reh.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,12 @@ function tweakProductForServerWeb(product) {
loaderConfig: optimize.loaderConfig(),
inlineAmdImages: true,
bundleInfo: undefined,
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product)
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product),
header: [
'/*!-----------------------------------------',
' * Copyright (c) Gitpod. All rights reserved.',
' *-----------------------------------------*/'
].join('\n')
},
commonJS: {
src: 'out-build',
Expand Down Expand Up @@ -408,12 +413,61 @@ function tweakProductForServerWeb(product) {
));
gulp.task(serverTaskCI);

/**
* This dummy extension is a mock the for built-in extension called `github-authentication`.
* In Gitpod we don't use the built-in extension (it's implemented inside gitpod-web extension)
* but if this one is missing, it breaks the GitHub Authentication for extensions that depend
* explicitly on `github-authentication` like `github.vscode-pull-request-github`
*/
const createDummyGitHubAuthExtensionTask = task.define('createDummyGitHubAuthExtensionTask', (done) => {
const dir = path.join(BUILD_ROOT, destinationFolderName, 'extensions', 'github-authentication');

if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}

const packageJsonContent = {
name: 'github-authentication',
displayName: 'GitHub Authentication',
description: 'Gitpod Override', // TODO: change
publisher: 'vscode',
license: 'MIT',
version: '0.0.2',
engines: {
vscode: '^1.41.0',
},
categories: ['Other'],
api: 'none',
extensionKind: ['ui', 'workspace'],
activationEvents: [
'onAuthenticationRequest:github',
],
capabilities: {
virtualWorkspaces: true,
untrustedWorkspaces: {
supported: true,
},
},
main: './extension.js',
};

const extensionJsContent = `module.exports = function activate() {}`;

fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(packageJsonContent, null, 2));
fs.writeFileSync(path.join(dir, 'extension.js'), extensionJsContent);

done();
});

gulp.task(createDummyGitHubAuthExtensionTask);

const serverTask = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
compileBuildTask,
compileExtensionsBuildTask,
compileExtensionMediaBuildTask,
minified ? minifyTask : optimizeTask,
serverTaskCI
serverTaskCI,
createDummyGitHubAuthExtensionTask
));
gulp.task(serverTask);
});
Expand Down
6 changes: 3 additions & 3 deletions build/gulpfile.vscode.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const version = (quality && quality !== 'stable') ? `${packageJson.version}-${qu
const vscodeWebResourceIncludes = [
// Workbench
'out-build/vs/{base,platform,editor,workbench}/**/*.{svg,png,jpg,mp3}',
'out-build/vs/code/browser/workbench/*.html',
'out-build/vs/gitpod/browser/workbench/*.html',
'out-build/vs/base/browser/ui/codicons/codicon/**/*.ttf',
'out-build/vs/**/markdown.css',

Expand Down Expand Up @@ -176,7 +176,7 @@ const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
optimizeVSCodeWebTask,
util.rimraf('out-vscode-web-min'),
optimize.minifyTask('out-vscode-web', `https://ticino.blob.core.windows.net/sourcemaps/${commit}/core`)
optimize.minifyTask('out-vscode-web')
));
gulp.task(minifyVSCodeWebTask);

Expand All @@ -192,7 +192,7 @@ function packageTask(sourceFolderName, destinationFolderName) {
const extensions = gulp.src('.build/web/extensions/**', { base: '.build/web', dot: true });

const sources = es.merge(src, extensions)
.pipe(filter(['**', '!**/*.js.map'], { dot: true }));
.pipe(filter(['**'], { dot: true }));

const name = product.nameShort;
const packageJsonStream = gulp.src(['remote/web/package.json'], { base: 'remote/web' })
Expand Down
16 changes: 9 additions & 7 deletions build/hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ function hygiene(some, linting = true) {
});

const copyrights = es.through(function (file) {
const lines = file.__lines;

for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
if (file.relative.indexOf('gitpod') === -1) {
const lines = file.__lines;

for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
}
}
}

Expand Down
Loading