Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add derpserver to proxy, add proxies to derpmap#7311

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deansheather merged 32 commits intomainfromdean/proxy-derp-map
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
32 commits
Select commitHold shift + click to select a range
eae4c3a
chore: add derpserver to proxy, add proxies to derpmap
deansheatherApr 27, 2023
ac99525
progress
deansheatherMay 1, 2023
4b68a0b
Merge branch 'main' into dean/proxy-derp-map
deansheatherMay 2, 2023
4ba7af6
progress
deansheatherMay 3, 2023
dcf072e
derp mesh probably working
deansheatherMay 4, 2023
2d2f1a3
deregister
deansheatherMay 4, 2023
28ae155
tests and various fixes
deansheatherMay 4, 2023
2baa362
Merge branch 'main' into dean/proxy-derp-map
deansheatherMay 4, 2023
5f5d4ff
more tests
deansheatherMay 5, 2023
5441dc8
merge main, remove proxy goingaway route
deansheatherMay 30, 2023
e4a3008
derp tests work
deansheatherMay 30, 2023
3caa692
Merge branch 'main' into dean/proxy-derp-map
deansheatherMay 30, 2023
404c3e4
update derp map on new connection
deansheatherMay 31, 2023
8544882
Merge branch 'main' into dean/proxy-derp-map
deansheatherJun 13, 2023
9b503fa
fixes
deansheatherJun 13, 2023
0e6d39a
tests for derp map changing
deansheatherJun 13, 2023
bb699fb
Merge branch 'main' into dean/proxy-derp-map
deansheatherJun 13, 2023
2943ac2
backwards compatible
deansheatherJun 20, 2023
f0fa578
other comments
deansheatherJun 20, 2023
9d90dc2
Merge branch 'main' into dean/proxy-derp-map
deansheatherJun 25, 2023
b405113
fixup! Merge branch 'main' into dean/proxy-derp-map
deansheatherJun 25, 2023
6a08a59
change derp map updates to be separate websocket
deansheatherJun 28, 2023
403eac5
Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 17, 2023
d220266
Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 24, 2023
9e658d6
fixup! Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 24, 2023
67f2e5c
Working tests
deansheatherJul 25, 2023
3c96149
Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 25, 2023
c26936a
fixup! Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 25, 2023
e59de5a
fixup! Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 25, 2023
2df067f
fixup! Merge branch 'main' into dean/proxy-derp-map
deansheatherJul 25, 2023
dfbfa96
Please
deansheatherJul 26, 2023
8223a35
fixup! Please
deansheatherJul 26, 2023
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
PrevPrevious commit
NextNext commit
Merge branch 'main' into dean/proxy-derp-map
  • Loading branch information
@deansheather
deansheather committedMay 30, 2023
commit3caa692f494c70697f58e54ef7f602e9701242d6
15 changes: 8 additions & 7 deletionscoderd/coderd.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -254,12 +254,6 @@ func New(options *Options) *API {
v := schedule.NewAGPLTemplateScheduleStore()
options.TemplateScheduleStore.Store(&v)
}
if options.HealthcheckTimeout == 0 {
options.HealthcheckTimeout = 30 * time.Second
}
if options.HealthcheckRefresh == 0 {
options.HealthcheckRefresh = 10 * time.Minute
}

siteCacheDir := options.CacheDir
if siteCacheDir != "" {
Expand DownExpand Up@@ -321,13 +315,20 @@ func New(options *Options) *API {
healthCheckGroup: &singleflight.Group[string, *healthcheck.Report]{},
}
if options.HealthcheckFunc == nil {
options.HealthcheckFunc = func(ctx context.Context) (*healthcheck.Report, error) {
options.HealthcheckFunc = func(ctx context.Context, apiKey string) (*healthcheck.Report, error) {
return healthcheck.Run(ctx, &healthcheck.ReportOptions{
AccessURL: options.AccessURL,
DERPMap: api.DERPMap().Clone(),
APIKey: apiKey,
})
}
}
if options.HealthcheckTimeout == 0 {
options.HealthcheckTimeout = 30 * time.Second
}
if options.HealthcheckRefresh == 0 {
options.HealthcheckRefresh = 10 * time.Minute
}
if options.UpdateCheckOptions != nil {
api.updateChecker = updatecheck.New(
options.Database,
Expand Down
64 changes: 0 additions & 64 deletionsenterprise/coderd/workspaceproxy_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,70 +175,6 @@ func TestRegions(t *testing.T) {
require.Error(t, err)
require.Empty(t, regions)
})

t.Run("GoingAway", func(t *testing.T) {
t.Skip("This is flakey in CI because it relies on internal go routine timing. Should refactor.")
t.Parallel()

dv := coderdtest.DeploymentValues(t)
dv.Experiments = []string{
string(codersdk.ExperimentMoons),
"*",
}

db, pubsub := dbtestutil.NewDB(t)

ctx := testutil.Context(t, testutil.WaitLong)

client, closer, api := coderdenttest.NewWithAPI(t, &coderdenttest.Options{
Options: &coderdtest.Options{
AppHostname: appHostname,
Database: db,
Pubsub: pubsub,
DeploymentValues: dv,
},
// The interval is set to 1 hour so the proxy health
// check will never happen manually. All checks will be
// forced updates.
ProxyHealthInterval: time.Hour,
})
t.Cleanup(func() {
_ = closer.Close()
})
_ = coderdtest.CreateFirstUser(t, client)
_ = coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
Features: license.Features{
codersdk.FeatureWorkspaceProxy: 1,
},
})

const proxyName = "testproxy"
proxy := coderdenttest.NewWorkspaceProxy(t, api, client, &coderdenttest.ProxyOptions{
Name: proxyName,
})
_ = proxy

require.Eventuallyf(t, func() bool {
proxy, err := client.WorkspaceProxyByName(ctx, proxyName)
if err != nil {
// We are testing the going away, not the initial healthy.
// Just force an update to change this to healthy.
_ = api.ProxyHealth.ForceUpdate(ctx)
return false
}
return proxy.Status.Status == codersdk.ProxyHealthy
}, testutil.WaitShort, testutil.IntervalFast, "proxy never became healthy")

_ = proxy.Close()
// The proxy should tell the primary on close that is is no longer healthy.
require.Eventuallyf(t, func() bool {
proxy, err := client.WorkspaceProxyByName(ctx, proxyName)
if err != nil {
return false
}
return proxy.Status.Status == codersdk.ProxyUnhealthy
}, testutil.WaitShort, testutil.IntervalFast, "proxy never became unhealthy after close")
})
}

func TestWorkspaceProxyCRUD(t *testing.T) {
Expand Down
You are viewing a condensed version of this merge commit. You can view thefull changes here.

[8]ページ先頭

©2009-2025 Movatter.jp