-
Notifications
You must be signed in to change notification settings - Fork 66
feat: Migrations polish #1455
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Migrations polish #1455
Conversation
lib/app/migrate.ts
Outdated
@@ -179,21 +179,30 @@ async function selectAppToMigrate( | |||
if (migratableComponents.length !== 0) { | |||
logger.log( | |||
lib.migrate.componentsToBeMigrated( | |||
`\n - ${migratableComponents.join('\n - ')}` | |||
`\n - ${[...new Set(migratableComponents)].join('\n - ')}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be deduped before we log them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do dupes exist when the user has multiple instances of a given component? Like multiple cards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, they can have multiple cards, webhooks, etc.
const promptMessage = projectConfig?.projectConfig | ||
? `${lib.migrate.projectMigrationWarning} ${lib.migrate.prompt.proceed}` | ||
: lib.migrate.prompt.proceed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the migration is for a project, add the project warning prefix
const { projectExists } = await ensureProjectExists( | ||
derivedAccountId, | ||
input, | ||
{ allowCreate: false, noLogs: true } | ||
); | ||
|
||
if (projectExists) { | ||
return lib.migrate.errors.project.alreadyExists(input); | ||
} | ||
|
||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixing an issue where if the project name was already taken, we just killed the process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Description and Context
Does the following: