- Notifications
You must be signed in to change notification settings - Fork928
merge main into groups#4439
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
47 commits Select commitHold shift + click to select a range
a6bb3b2
docs: add quotas (#4366)
ammariof295200
fix: Ensure WebSockets routinely transfer data (#4367)
kylecarbs06d7e36
fix: Ignore hidden folders when archiving (#4370)
kylecarbs5870176
feat: Also log out of apps if they are hosted on the same domain (#4334)
Emyrk8940ea1
fix: Always set `DisconnectedAt` if the agent isn't connected (#4328)
kylecarbs504cd46
fix: Check for a response body when dialing the Tailnet WebSocket (#4…
kylecarbs3759bb2
docs: fixed a typo (#4374)
matifali8d14076
fix: move quotas above inputs (#4376)
f0sselb65c555
fix: warn user if not entitled feature is enabled (#4377)
f0ssel4f3958c
docs: link all enterprise features (#4368)
ammario2a66395
feat: use app wildcards for apps if configured (#4263)
deansheather9a670b9
chore: refactor frontend to use workspace status directly (#4361)
presleyp3ad5e11
feat: add warning if workspace page becomes stale (#4375)
Kira-Pilotbbe2baf
fix: Ignore all hidden files and folders in archive (#4382)
kylecarbs1386465
feat: add endpoint to get listening ports in agent (#4260)
deansheather93b8121
fix: Change use of 1337 to 13337 in example templates (#4386)
mafredri29a2fe4
fix: fix builds on windows_arm64 (#4388)
deansheatherd275331
fix: Remove audit warning if unlicensed (#4387)
kylecarbs0ebcb7d
fix: Remove reliance of `relative_path` on subdomains (#4390)
kylecarbsea42212
chore: add icons to quickstarts (#4379)
bpmct9b1ff43
fix: Don't run CI for releases (#4393)
kylecarbs3b15f13
fix: fix apps being unavailable until rebuild (#4395)
deansheather9cf3e10
chore: Pin typos to fix CI (#4396)
kylecarbsfe7c9f8
chore: Stop building images on tag pushes (#4397)
kylecarbsf5df548
feat: tokens (#4380)
f0ssela89d690
fix: show help on wraper commands (#4402)
f0ssel32bb1e7
fix: add back missing postAPIKey route (#4406)
f0ssel05670d1
fix: Spelling in audit log docs (#4384)
ntimo915bb41
feat: Add trial property to licenses (#4372)
kylecarbs3049a56
fix: Use the maximum number of users for a license warning (#4410)
kylecarbs3cc77d9
feat: Add tunnel by default (#4399)
kylecarbse8e095e
feat: redesign error alert (#4403)
Kira-Pilotadcf883
fix: Ensure GitHub OAuth2 users are active in organization (#4416)
mafredri2b6586d
chore: add ignoreRestSiblings to no-unused-vars ESLint rule (#4404)
jsjoeio257df81
chore: replace old ErrorSummary component (#4417)
Kira-Pilot34f7992
refactor: Remove user roles from dropdown (#4419)
BrunoQuaresma50966c4
fix: Fix keyboard focus styles on buttons (#4418)
BrunoQuaresma3ad27b5
chore: Rename context in `cli/agent` (#4422)
mafredri0ad8e77
fix(ci): use correct `retention-days` in e2e (#4424)
coadlerc01910f
docs: use enterprise badges (#4428)
ammariodd5173b
fix: apply loadBalancerIP and externalTrafficPolicy values in helm ch…
andrei-nefelieefc26c
Hide build logs older than 30 days (#4436)
ammario6266895
Merge branch 'main' into mergemain
sreya99868f2
remove migration conflict
sreyac46eba4
fix license woes
sreya33a5599
fix coderd/license
sreya20a89eb
Update error banner
BrunoQuaresmaFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
6 changes: 2 additions & 4 deletions.github/workflows/coder.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions.github/workflows/dogfood.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4,8 +4,6 @@ on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "dogfood/**" | ||
pull_request: | ||
3 changes: 2 additions & 1 deletion.vscode/settings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletionsagent/agent.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletionsagent/ports_supported.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
//go:build linux || (windows && amd64) | ||
package agent | ||
import ( | ||
"time" | ||
"github.com/cakturk/go-netstat/netstat" | ||
"golang.org/x/xerrors" | ||
"github.com/coder/coder/codersdk" | ||
) | ||
func (lp *listeningPortsHandler) getListeningPorts() ([]codersdk.ListeningPort, error) { | ||
lp.mut.Lock() | ||
defer lp.mut.Unlock() | ||
if time.Since(lp.mtime) < time.Second { | ||
// copy | ||
ports := make([]codersdk.ListeningPort, len(lp.ports)) | ||
copy(ports, lp.ports) | ||
return ports, nil | ||
} | ||
tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool { | ||
return s.State == netstat.Listen | ||
}) | ||
if err != nil { | ||
return nil, xerrors.Errorf("scan listening ports: %w", err) | ||
} | ||
seen := make(map[uint16]struct{}, len(tabs)) | ||
ports := []codersdk.ListeningPort{} | ||
for _, tab := range tabs { | ||
if tab.LocalAddr == nil || tab.LocalAddr.Port < uint16(codersdk.MinimumListeningPort) { | ||
continue | ||
} | ||
// Don't include ports that we've already seen. This can happen on | ||
// Windows, and maybe on Linux if you're using a shared listener socket. | ||
if _, ok := seen[tab.LocalAddr.Port]; ok { | ||
continue | ||
} | ||
seen[tab.LocalAddr.Port] = struct{}{} | ||
procName := "" | ||
if tab.Process != nil { | ||
procName = tab.Process.Name | ||
} | ||
ports = append(ports, codersdk.ListeningPort{ | ||
ProcessName: procName, | ||
Network: codersdk.ListeningPortNetworkTCP, | ||
Port: tab.LocalAddr.Port, | ||
}) | ||
} | ||
lp.ports = ports | ||
lp.mtime = time.Now() | ||
// copy | ||
ports = make([]codersdk.ListeningPort, len(lp.ports)) | ||
copy(ports, lp.ports) | ||
return ports, nil | ||
} |
12 changes: 12 additions & 0 deletionsagent/ports_unsupported.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build !linux && !(windows && amd64) | ||
package agent | ||
import "github.com/coder/coder/codersdk" | ||
func (lp *listeningPortsHandler) getListeningPorts() ([]codersdk.ListeningPort, error) { | ||
// Can't scan for ports on non-linux or non-windows_amd64 systems at the | ||
// moment. The UI will not show any "no ports found" message to the user, so | ||
// the user won't suspect a thing. | ||
return []codersdk.ListeningPort{}, nil | ||
} |
49 changes: 49 additions & 0 deletionsagent/statsendpoint.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package agent | ||
import ( | ||
"net/http" | ||
"sync" | ||
"time" | ||
"github.com/go-chi/chi" | ||
"github.com/coder/coder/coderd/httpapi" | ||
"github.com/coder/coder/codersdk" | ||
) | ||
func (*agent) statisticsHandler() http.Handler { | ||
r := chi.NewRouter() | ||
r.Get("/", func(rw http.ResponseWriter, r *http.Request) { | ||
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.Response{ | ||
Message: "Hello from the agent!", | ||
}) | ||
}) | ||
lp := &listeningPortsHandler{} | ||
r.Get("/api/v0/listening-ports", lp.handler) | ||
return r | ||
} | ||
type listeningPortsHandler struct { | ||
mut sync.Mutex | ||
ports []codersdk.ListeningPort | ||
mtime time.Time | ||
} | ||
// handler returns a list of listening ports. This is tested by coderd's | ||
// TestWorkspaceAgentListeningPorts test. | ||
func (lp *listeningPortsHandler) handler(rw http.ResponseWriter, r *http.Request) { | ||
ports, err := lp.getListeningPorts() | ||
if err != nil { | ||
httpapi.Write(r.Context(), rw, http.StatusInternalServerError, codersdk.Response{ | ||
Message: "Could not scan for listening ports.", | ||
Detail: err.Error(), | ||
}) | ||
return | ||
} | ||
httpapi.Write(r.Context(), rw, http.StatusOK, codersdk.ListeningPortsResponse{ | ||
Ports: ports, | ||
}) | ||
} |
12 changes: 6 additions & 6 deletionscli/agent.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletionscli/cliui/table.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletionscli/cliui/table_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletionscli/parameters.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionscli/resetpassword_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionscli/root.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -93,6 +93,7 @@ func Core() []*cobra.Command { | ||
users(), | ||
versionCmd(), | ||
workspaceAgent(), | ||
tokens(), | ||
} | ||
} | ||
3 changes: 3 additions & 0 deletionscli/schedule.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.