Skip to content

Commit

Permalink
feat(migrate): Remove "please create new issue", a residue of the old…
Browse files Browse the repository at this point in the history
… `migrate` CLI tool (#18162)

* feat(migrate): close #17268

* fix: snapshots

* fix: snapshots

* fix: snapshots
  • Loading branch information
jkomyno authored Apr 27, 2023
1 parent f127922 commit 61caee9
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 30 deletions.
3 changes: 0 additions & 3 deletions packages/cli/src/__tests__/artificial-panic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ describe('artificial-panic introspection', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] This is the debugPanic artificial panic
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
expect(isRustPanic(e)).toBe(true)
expect(e.rustStack).toBeTruthy()
Expand Down
8 changes: 2 additions & 6 deletions packages/migrate/src/MigrateEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@prisma/internals'
import type { ChildProcess } from 'child_process'
import { spawn } from 'child_process'
import { bold, red, underline } from 'kleur/colors'
import { bold, red } from 'kleur/colors'
import path from 'path'

import type { EngineArgs, EngineResults, RPCPayload, RpcSuccessResponse } from './types'
Expand Down Expand Up @@ -543,9 +543,5 @@ export class MigrateEngine {

/** The full message with context we return to the user in case of engine panic. */
function serializePanic(log: string): string {
// TODO: https://github.com/prisma/prisma/issues/17268
return `${red(bold('Error in migration engine.\nReason: '))}${log}
Please create an issue with your \`schema.prisma\` at
${underline('https://github.com/prisma/prisma/issues/new')}\n`
return `${red(bold('Error in migration engine.\nReason: '))}${log}\n`
}
12 changes: 0 additions & 12 deletions packages/migrate/src/__tests__/MigrateDiff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ describe('migrate diff', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] called \`Option::unwrap()\` on a \`None\` value
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
})
})
Expand Down Expand Up @@ -502,9 +499,6 @@ describe('migrate diff', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] called \`Option::unwrap()\` on a \`None\` value
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
})

Expand Down Expand Up @@ -579,9 +573,6 @@ describe('migrate diff', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] Column native type missing in mysql_renderer::render_column_type()
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
})
})
Expand Down Expand Up @@ -674,9 +665,6 @@ describe('migrate diff', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] Missing column native type in mssql_renderer::render_column_type()
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ exports[`handlePanic migrate engine panic no interactive mode in CI 1`] = `
Error in migration engine.
Reason: [/some/rust/path:0:0] This is the debugPanic artificial panic
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`;
3 changes: 0 additions & 3 deletions packages/migrate/src/__tests__/handlePanic.introspect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ describe('introspection panic', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] This is the debugPanic artificial panic
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
}
})
Expand Down
3 changes: 0 additions & 3 deletions packages/migrate/src/__tests__/handlePanic.migrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ describe('handlePanic migrate', () => {
Error in migration engine.
Reason: [/some/rust/path:0:0] This is the debugPanic artificial panic
Please create an issue with your \`schema.prisma\` at
https://github.com/prisma/prisma/issues/new
`)
} else {
const output = captureStdout.getCapturedText()
Expand Down

0 comments on commit 61caee9

Please sign in to comment.