Skip to content

Commit 435348d

Browse files
committed
Fix migration and experimental
1 parent 62a7ab2 commit 435348d

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

cli/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,8 @@ func (h *headerTransport) RoundTrip(req *http.Request) (*http.Response, error) {
609609

610610
// ExperimentalEnabled returns if the experimental feature flag is enabled.
611611
func ExperimentalEnabled(cmd *cobra.Command) bool {
612-
return cliflag.IsSetBool(cmd, varExperimental)
612+
enabled, _ := cmd.Flags().GetBool(varExperimental)
613+
return enabled
613614
}
614615

615616
// EnsureExperimental will ensure that the experimental feature flag is set if the given flag is set.

coderd/database/dump.sql

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000059_file_id.up.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ BEGIN;
1414
-- Drop the primary key on hash.
1515
ALTER TABLE files DROP CONSTRAINT files_pkey;
1616

17-
-- This extension is required by gen_random_uuid
18-
CREATE EXTENSION IF NOT EXISTS pgcrypto;
19-
2017
-- Add an 'id' column and designate it the primary key.
2118
ALTER TABLE files ADD COLUMN
2219
id uuid NOT NULL PRIMARY KEY DEFAULT gen_random_uuid ();

tailnet/coordinator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package tailnet
22

33
import (
4+
"context"
45
"encoding/json"
56
"errors"
67
"io"
@@ -289,7 +290,7 @@ func (c *coordinator) ServeAgent(conn net.Conn, id uuid.UUID) error {
289290
for {
290291
err := c.handleNextAgentMessage(id, decoder)
291292
if err != nil {
292-
if errors.Is(err, io.EOF) {
293+
if errors.Is(err, io.EOF) || errors.Is(err, context.Canceled) {
293294
return nil
294295
}
295296
return xerrors.Errorf("handle next agent message: %w", err)

0 commit comments

Comments
 (0)