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

Commitdb609ae

Browse files
committed
Merge branch 'main' of github.com:/coder/coder into dk/monotonic
2 parents430be60 +f418ece commitdb609ae

File tree

108 files changed

+4982
-1976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+4982
-1976
lines changed

‎.github/workflows/ci.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ jobs:
202202
popd
203203
204204
-name:make gen
205-
run:"make --output-sync -j -B gen"
205+
# no `-j` flag as `make` fails with:
206+
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
207+
run:"make --output-sync -B gen"
206208

207209
-name:Check for unstaged files
208210
run:./scripts/check_unstaged.sh
@@ -604,9 +606,6 @@ jobs:
604606
-name:Setup sqlc
605607
uses:./.github/actions/setup-sqlc
606608

607-
-name:make gen
608-
run:"make --output-sync -j -B gen"
609-
610609
-name:Format
611610
run:|
612611
cd offlinedocs
@@ -618,8 +617,10 @@ jobs:
618617
pnpm lint
619618
620619
-name:Build
620+
# no `-j` flag as `make` fails with:
621+
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
621622
run:|
622-
make-jbuild/coder_docs_"$(./scripts/version.sh)".tgz
623+
make build/coder_docs_"$(./scripts/version.sh)".tgz
623624
624625
required:
625626
runs-on:ubuntu-latest
@@ -665,7 +666,7 @@ jobs:
665666
# to main branch. We are only building this for amd64 platform. (>95% pulls
666667
# are for amd64)
667668
needs:changes
668-
if:needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
669+
if:github.ref == 'refs/heads/main' &&needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
669670
runs-on:${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
670671
env:
671672
DOCKER_CLI_EXPERIMENTAL:"enabled"

‎.github/workflows/contrib.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
-name:cla
3636
if:(github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
37-
uses:contributor-assistant/github-action@v2.3.1
37+
uses:contributor-assistant/github-action@v2.3.2
3838
env:
3939
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
4040
# the below token should have repo scope and must be manually added by you in the repository's secret

‎cli/login.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818

1919
"github.com/coder/pretty"
2020

21-
"github.com/coder/coder/v2/buildinfo"
2221
"github.com/coder/coder/v2/cli/cliui"
2322
"github.com/coder/coder/v2/coderd/userpassword"
2423
"github.com/coder/coder/v2/codersdk"
@@ -180,21 +179,11 @@ func (r *RootCmd) login() *serpent.Command {
180179
serverURL.Scheme="https"
181180
}
182181

183-
client,err:=r.createUnauthenticatedClient(ctx,serverURL)
182+
client,err:=r.createUnauthenticatedClient(ctx,serverURL,inv)
184183
iferr!=nil {
185184
returnerr
186185
}
187186

188-
// Try to check the version of the server prior to logging in.
189-
// It may be useful to warn the user if they are trying to login
190-
// on a very old client.
191-
err=r.checkVersions(inv,client,buildinfo.Version())
192-
iferr!=nil {
193-
// Checking versions isn't a fatal error so we print a warning
194-
// and proceed.
195-
_,_=fmt.Fprintln(inv.Stderr,pretty.Sprint(cliui.DefaultStyles.Warn,err.Error()))
196-
}
197-
198187
hasFirstUser,err:=client.HasFirstUser(ctx)
199188
iferr!=nil {
200189
returnxerrors.Errorf("Failed to check server %q for first user, is the URL correct and is coder accessible from your browser? Error - has initial user: %w",serverURL.String(),err)

‎cli/logout_test.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -97,33 +97,6 @@ func TestLogout(t *testing.T) {
9797

9898
<-logoutChan
9999
})
100-
t.Run("NoSessionFile",func(t*testing.T) {
101-
t.Parallel()
102-
103-
pty:=ptytest.New(t)
104-
config:=login(t,pty)
105-
106-
// Ensure session files exist.
107-
require.FileExists(t,string(config.URL()))
108-
require.FileExists(t,string(config.Session()))
109-
110-
err:=os.Remove(string(config.Session()))
111-
require.NoError(t,err)
112-
113-
logoutChan:=make(chanstruct{})
114-
logout,_:=clitest.New(t,"logout","--global-config",string(config))
115-
116-
logout.Stdin=pty.Input()
117-
logout.Stdout=pty.Output()
118-
119-
gofunc() {
120-
deferclose(logoutChan)
121-
err=logout.Run()
122-
assert.ErrorContains(t,err,"You are not logged in. Try logging in using 'coder login'.")
123-
}()
124-
125-
<-logoutChan
126-
})
127100
t.Run("CannotDeleteFiles",func(t*testing.T) {
128101
t.Parallel()
129102

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp