Skip to content
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

Fail fast if the target GitHub repo already exists in bbs2gh migrate-repo #1087

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

timrogers
Copy link
Contributor

@timrogers timrogers commented Jul 28, 2023

Looking at our error logs, it's clear that customers frequently start Bitbucket migrations, waiting for the export to run, and then discover that the migration can't happen because the target repo already exists.

This wastes a bunch of time, since Bitbucket archive generation can be reasonably slow!

This changes the behaviour of bbs2gh migrate-repo to match what gei migrate-repo does for GHES migrations: check if the target repo already exists before running the export.

This should only happen when migrate-repo is run with a combination of arguments that includes GitHub credentials - so not the export-only or the export-and-download modes.

Fixes #1086.

  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

@github-actions
Copy link

github-actions bot commented Jul 28, 2023

Unit Test Results

778 tests   778 ✔️  22s ⏱️
    1 suites      0 💤
    1 files        0

Results for commit 066c34e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@hfishback01 hfishback01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just need to fix the failed checks

…-repo`

Looking at our error logs, it's clear that customers frequently
start Bitbucket migrations, waiting for the export to run, and
then discover that the  migration can't happen because the target
repo already exists.

This wastes a bunch of time, since Bitbucket archive generation
can be reasonably slow!

This changes the behaviour of `bbs2gh migrate-repo` to match
what `gei migrate-repo` does for GHES migrations: check if the
target repo already exists *before* running the export.

This should only happen when `migrate-repo` is run with a
combination of arguments that includes GitHub credentials - so
not the export-only or the export-and-download modes.

Fixes #1086.
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Code Coverage

Package Line Rate Branch Rate Complexity Health
Octoshift 86% 75% 1216
ado2gh 84% 81% 601
gei 80% 72% 496
bbs2gh 79% 75% 626
Summary 83% (6529 / 7858) 76% (1481 / 1952) 2939

@timrogers timrogers merged commit ff8d368 into main Aug 2, 2023
30 checks passed
@timrogers timrogers deleted the timrogers/fix-1086 branch August 2, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail fast if the target GitHub repo already exists in bbs2gh migrate-repo
2 participants