coder / coder/internal

lint duplicate migration numbers before merge and in `main`

Open
#215 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Exhibit A: https://github.com/coder/coder/pull/15530

coder/coder#15448 was merged after coder/coder#15502, and both contained the same migration number. This passed all checks, and when we auto-deployed `main` to our dogfood environment we encountered a fatal error on startup:

```
Encountered an error running "coder server", see "coder server --help" for more information
error: connect to postgres:
github.com/coder/coder/v2/cli.(*RootCmd).Server.func2
/home/runner/work/coder/coder/cli/server.go:704
- connect to postgres:
github.com/coder/coder/v2/cli.getPostgresDB
/home/runner/work/coder/coder/cli/server.go:2625
- migrate up:
/home/runner/work/coder/coder/cli/server.go:2206
- migrate setup:
/home/runner/work/coder/coder/coderd/database/migrations/migrate.go:116
- create iofs:
/home/runner/work/coder/coder/coderd/database/migrations/migrate.go:82
- failed to init driver with path .: duplicate migration file: 000274_rename_user_link_claims.down.sql
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.