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: improve dump error output#3499

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
sreya merged 2 commits intomainfromjon/fixdump
Aug 13, 2022
Merged

chore: improve dump error output#3499

sreya merged 2 commits intomainfromjon/fixdump
Aug 13, 2022

Conversation

sreya
Copy link
Collaborator

@sreyasreya commentedAug 13, 2022
edited
Loading

This PR surfaces the real error that occurs when attempting to generate a database dump. It also exits immediately if the migration fails, instead of waiting 2 minutes.

E.g.

coder@dev database (jon/fixdump) ✗ go run dump/main.gopanic: migrate db: up: migration failed: syntax error at or near "FOREIGN" (column 2) in line 7: CREATE TABLE IF NOT EXISTS workspace_resource_metadata (workspace_resource_id uuid NOT NULL,key varchar(1024) NOT NULL,value varchar(65536),sensitive boolean NOT NULL,PRIMARY KEY (workspace_resource_id, key)FOREIGN KEY (workspace_resource_id) REFERENCES workspace_resources (id) ON DELETE CASCADE); (details: pq: syntax error at or near "FOREIGN")goroutine 1 [running]:main.main()/home/coder/go/src/github.com/coder/coder/coderd/database/dump/main.go:19 +0x88cexit status 2```

- Properly report the error that occurs during the DB connection retry  loop.- Move the migration out of the retry loop.
@sreyasreya requested a review fromkylecarbsAugust 13, 2022 03:02
@sreyasreya merged commit301727d intomainAug 13, 2022
@sreyasreya deleted the jon/fixdump branchAugust 13, 2022 03:15
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@sreya@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp