Skip to content

feat: adds script for git migration. - #10882

Merged
atulep merged 12 commits into
mainfrom
monorepo_migration_git_migration_script
Apr 20, 2023
Merged

feat: adds script for git migration.#10882
atulep merged 12 commits into
mainfrom
monorepo_migration_git_migration_script

Conversation

@atulep

@atulepatulep commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

Script that migrates Git history of a split repo to google-cloud-python.

It copies Git history from source repo (i.e. "split repo") to target repo (i.e. google-cloud-python). Then, creates a pull request in target repo.

Comment threadscripts/split_repo_migration/run.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
@atulep
atulep marked this pull request as ready for review April 7, 2023 01:54
@atulep
atulep requested a review from a teamApril 7, 2023 01:54
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh
Comment threadscripts/split_repo_migration/git-migrate-history.sh
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/run.sh Outdated
Comment threadscripts/split_repo_migration/run.sh Outdated
Comment threadscripts/split_repo_migration/run.sh Outdated

@vchudnov-gvchudnov-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One relatively minor comment.

But I do think we want the other open comment, deriving ${ARTIFACT_NAME} from the split repo.

Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/run.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
@atulep
atulep requested a review from vchudnov-gApril 18, 2023 17:53
Comment threadscripts/split_repo_migration/git-migrate-history.sh
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
@atulep
atulep requested a review from vchudnov-gApril 19, 2023 00:53

@vchudnov-gvchudnov-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Only issue is about the commented-out gh command. Could you address that before merging?

Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
Comment threadscripts/split_repo_migration/git-migrate-history.sh
$EXIT 1
fi

pushd "${TARGET_REPO}" # To target repo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As per offline chat, sounds like we also need to mkdir -p owl-bot-staging/${DISTRIBUTION_NAME} after validation and before creating the PR.

Which means maybe we do the jq extract into ${DISTRIBUTION_NAME} and then set TARGET_PATH="packages/${DISTRIBUTION_NAME}" above?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As per correction in chat, we'll need to

mkdir -p owl-bot-staging/${DISTRIBUTION_NAME}/${DISTRIBUTION_NAME}
touch owl-bot-staging/${DISTRIBUTION_NAME}/${DISTRIBUTION_NAME}/${DISTRIBUTION_NAME}.txt
git add owl-bot-staging
git commit -m "Trigger owlbot post-processor"

although it's not clear this is sufficient to make the migrated repo pass pre-submits.

@atulepatulepApr 19, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Ok, added owl-bot-staging. But, we should add any necessary fixes, if needed, in follow-up PRs.

Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated

@vchudnov-gvchudnov-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One non-trivial comment about making the title have a conventional commit format.

Comment threadscripts/split_repo_migration/git-migrate-history.sh Outdated
@atulep
atulep merged commit 0cd2938 into mainApr 20, 2023
@atulep
atulep deleted the monorepo_migration_git_migration_script branch April 20, 2023 01:38
Sign up for freeto 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.

2 participants

@atulep@vchudnov-g