Skip to content

Commit

Permalink
Revert "Add linkup command to improve link functionality"
Browse files Browse the repository at this point in the history
This reverts commit 2504f6f.
  • Loading branch information
Joe committed Nov 3, 2021
1 parent 13404df commit 5d74ca9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 50 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -12,7 +12,6 @@ vendor/modules
node-*
/plugins
/lib/coder-cloud-agent
/lib/linkup
.home
coverage
**/.DS_Store
Expand Down
9 changes: 0 additions & 9 deletions ci/build/build-code-server.sh
Expand Up @@ -30,15 +30,6 @@ main() {
chmod +x ./lib/coder-cloud-agent
set -e
fi

if ! [ -f ./lib/linkup ]; then
echo "Downloading Link agent..."

set +e
curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup
chmod +x ./lib/linkup
set -e
fi
}

main "$@"
1 change: 0 additions & 1 deletion ci/build/build-release.sh
Expand Up @@ -61,7 +61,6 @@ EOF
rsync node_modules/ "$RELEASE_PATH/node_modules"
mkdir -p "$RELEASE_PATH/lib"
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
rsync ./lib/linkup "$RELEASE_PATH/lib"
fi
}

Expand Down
6 changes: 0 additions & 6 deletions ci/build/npm-postinstall.sh
Expand Up @@ -66,12 +66,6 @@ main() {
echo "Failed to download cloud agent; --link will not work"
fi

if curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup; then
chmod +x ./lib/linkup
else
echo "Failed to download Link agent; the Link extension will not work"
fi

if ! vscode_yarn; then
echo "You may not have the required dependencies to build the native modules."
echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"
Expand Down
16 changes: 0 additions & 16 deletions src/node/link.ts

This file was deleted.

18 changes: 1 addition & 17 deletions src/node/main.ts
@@ -1,14 +1,12 @@
import { field, logger } from "@coder/logger"
import { ChildProcessWithoutNullStreams } from "child_process"
import http from "http"
import path from "path"
import { Disposable } from "../common/emitter"
import { plural, logError } from "../common/util"
import { plural } from "../common/util"
import { createApp, ensureAddress } from "./app"
import { AuthType, DefaultedArgs, Feature } from "./cli"
import { coderCloudBind } from "./coder_cloud"
import { commit, version, vsRootPath } from "./constants"
import { startLink } from "./link"
import { register } from "./routes"
import { humanPath, isFile, loadAMDModule, open } from "./util"

Expand Down Expand Up @@ -156,19 +154,6 @@ export const runCodeServer = async (
logger.info(" - Connected to cloud agent")
}

let linkAgent: undefined | ChildProcessWithoutNullStreams
try {
linkAgent = startLink(serverAddress)
linkAgent.on("error", (error) => {
logError(logger, "link daemon", error)
})
linkAgent.on("close", (code) => {
logger.debug("link daemon closed", field("code", code))
})
} catch (error) {
logError(logger, "link daemon", error)
}

if (args.enable && args.enable.length > 0) {
logger.info("Enabling the following experimental features:")
args.enable.forEach((feature) => {
Expand Down Expand Up @@ -196,7 +181,6 @@ export const runCodeServer = async (
return {
server: app.server,
dispose: async () => {
linkAgent?.kill()
disposeRoutes()
await app.dispose()
},
Expand Down

0 comments on commit 5d74ca9

Please sign in to comment.