Skip to content
Merged
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
Prev Previous commit
Fix migration and experimental
  • Loading branch information
kylecarbs committed Oct 17, 2022
commit 435348ddcc3c64fca9cdb9e9e47aece145dca57b
3 changes: 2 additions & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ func (h *headerTransport) RoundTrip(req *http.Request) (*http.Response, error) {

// ExperimentalEnabled returns if the experimental feature flag is enabled.
func ExperimentalEnabled(cmd *cobra.Command) bool {
return cliflag.IsSetBool(cmd, varExperimental)
enabled, _ := cmd.Flags().GetBool(varExperimental)
return enabled
}

// EnsureExperimental will ensure that the experimental feature flag is set if the given flag is set.
Expand Down
4 changes: 0 additions & 4 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions coderd/database/migrations/000059_file_id.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ BEGIN;
-- Drop the primary key on hash.
ALTER TABLE files DROP CONSTRAINT files_pkey;

-- This extension is required by gen_random_uuid
CREATE EXTENSION IF NOT EXISTS pgcrypto;

-- Add an 'id' column and designate it the primary key.
ALTER TABLE files ADD COLUMN
id uuid NOT NULL PRIMARY KEY DEFAULT gen_random_uuid ();
Expand Down
3 changes: 2 additions & 1 deletion tailnet/coordinator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tailnet

import (
"context"
"encoding/json"
"errors"
"io"
Expand Down Expand Up @@ -289,7 +290,7 @@ func (c *coordinator) ServeAgent(conn net.Conn, id uuid.UUID) error {
for {
err := c.handleNextAgentMessage(id, decoder)
if err != nil {
if errors.Is(err, io.EOF) {
if errors.Is(err, io.EOF) || errors.Is(err, context.Canceled) {
return nil
}
return xerrors.Errorf("handle next agent message: %w", err)
Expand Down