Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
chore: remove stale TODO shims and dead code
  • Loading branch information
aslilac committed Sep 11, 2026
commit bdf2a9809c10a75afd16276432bac0dc266efb9d
11 changes: 1 addition & 10 deletions cli/configssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"io"
"io/fs"
"net/http"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -456,15 +455,7 @@ func (r *RootCmd) configSSH() *serpent.Command {

coderdConfig, err := client.SSHConfiguration(ctx)
if err != nil {
// If the error is 404, this deployment does not support
// this endpoint yet. Do not error, just assume defaults.
// TODO: Remove this in 2 months (May 31, 2023). Just return the error
// and remove this 404 check.
var sdkErr *codersdk.Error
if !xerrors.As(err, &sdkErr) || sdkErr.StatusCode() != http.StatusNotFound {
return xerrors.Errorf("fetch coderd config failed: %w", err)
}
coderdConfig.HostnamePrefix = "coder."
return xerrors.Errorf("fetch coderd config failed: %w", err)
}

configOptions, err := mergeSSHOptions(sshConfigOpts, coderdConfig, string(root), coderBinary)
Expand Down
9 changes: 1 addition & 8 deletions coderd/httpmw/organizationparam.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@ func ExtractOrganizationParam(db database.Store) func(http.Handler) http.Handler
// If the name is exactly "default", then we fetch the default
// organization. This is a special case to make it easier
// for single org deployments.
//
// arg == uuid.Nil.String() should be a temporary workaround for
// legacy provisioners that don't provide an organization ID.
// This prevents a breaking change.
// TODO: This change was added March 2024. Nil uuid returning the
// default org should be removed some number of months after
// that date.
if arg == codersdk.DefaultOrganization || arg == uuid.Nil.String() {
if arg == codersdk.DefaultOrganization {
organization, dbErr = db.GetDefaultOrganization(ctx)
} else {
// Try by name or uuid.
Expand Down
11 changes: 0 additions & 11 deletions coderd/httpmw/organizationparam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,5 @@ func TestOrganizationParam(t *testing.T) {
res = rw.Result()
defer res.Body.Close()
require.Equal(t, http.StatusOK, res.StatusCode, "by default keyword")

// Try by legacy
// TODO: This can be removed when legacy nil uuids are no longer supported.
// This is a temporary measure to ensure as legacy provisioners use
// nil uuids as the org id and expect the default org.
chi.RouteContext(r.Context()).URLParams.Add("organization", uuid.Nil.String())
chi.RouteContext(r.Context()).URLParams.Add("user", user.ID.String())
rtr.ServeHTTP(rw, r)
res = rw.Result()
defer res.Body.Close()
require.Equal(t, http.StatusOK, res.StatusCode, "by nil uuid (legacy)")
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ function terraform_apply() {
EOL
}

# TODO: remove
echo "$@" >>/tmp/blah

case "$1" in
version)
terraform_version
Expand Down
20 changes: 0 additions & 20 deletions vpn/tun_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,3 @@ func windowsUptime() time.Duration {
r, _, _ := getTickCount64Proc.Call()
return time.Duration(int64(r)) * time.Millisecond
}

// TODO(@dean): implement a way to install/uninstall the wintun driver, most
// likely as a CLI command
//
// This is taken from Tailscale:
// https://github.com/tailscale/tailscale/blob/3abfbf50aebbe3ba57dc749165edb56be6715c0a/cmd/tailscaled/tailscaled_windows.go#L543
func uninstallWinTun(logf logger.Logf) {
dll := windows.NewLazyDLL("wintun.dll")
if err := dll.Load(); err != nil {
logf("Cannot load wintun.dll for uninstall: %v", err)
return
}

logf("Removing wintun driver...")
err := wintun.Uninstall()
logf("Uninstall: %v", err)
}

// TODO(@dean): remove
var _ = uninstallWinTun
Loading