Skip to content

Gutenberg/shallow submodules#11747

Merged
cameronvoell merged 3 commits intowoo/aztec-design-changesfrom
gutenberg/shallow-submodules
Apr 24, 2020
Merged

Gutenberg/shallow submodules#11747
cameronvoell merged 3 commits intowoo/aztec-design-changesfrom
gutenberg/shallow-submodules

Conversation

@hypest
Copy link
Copy Markdown
Contributor

@hypest hypest commented Apr 24, 2020

Addresses wordpress-mobile/gutenberg-mobile#2182

gb-mobile PR: wordpress-mobile/gutenberg-mobile#2183

This PR turns the gutenberg-mobile git submodule to a shallow one by default, to minimize the size pulled when casually cloning gutenberg-mobile.

Note: This PR is targeting another PR, only because the gutenberg-mobile bridge changes that PR introduces are already merged to gutenberg-mobile develop, and targeting develop will result to build errors.

That said, the issue at hand (JitPack seemingly taking too long to clone the gutenberg-mobile repo and bailing) is plaguing this PR anyway, by failing many of its CI jobs.

To test A

  1. Prepare for a fresh clone of the repo by going into a folder that doesn't have the repo clone yet
  2. Issue git clone --single-branch --branch gutenberg/shallow-submodules git@github.com:wordpress-mobile/WordPress-Android.git to pull the repo. Wait until that finishes.
  3. cd WordPress-Android to go into the clone
  4. Issue git submodule update --init --recursive and wait until it finishes
  5. cd libs/gutenberg-mobile to go into the gb-mobile submodule
  6. Issue git rev-parse --is-shallow-repository to verify it's a shallow clone. It should return true.
  7. Check that the nested submodules are also shallow, namely the gutenberg and jetpack submodules.
  8. Issue git fetch --unshallow to pull the whole submodule history, to verify that it can be done. git rev-parse --is-shallow-repository should return false after this.

To test B

  1. Prepare for a fresh clone of the repo by going into a folder that doesn't have the repo clone yet
  2. Issue git clone --single-branch --branch gutenberg/shallow-submodules git@github.com:wordpress-mobile/WordPress-Android.git to pull the repo. Wait until that finishes.
  3. cd WordPress-Android to go into the clone
  4. Issue git submodule update --init --recursive --no-recommend-shallow and wait until it finishes
  5. cd libs/gutenberg-mobile to go into the gbm-mobile submodule
  6. Issue git rev-parse --is-shallow-repository to verify it's a not shallow clone. It should return false.
  7. Verify that the nested submodules (namely the gutenberg and jetpack submodules) are also not shallow

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@hypest hypest requested a review from cameronvoell April 24, 2020 14:28
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Apr 24, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@hypest hypest added this to the 14.8 milestone Apr 24, 2020
@hypest hypest mentioned this pull request Apr 24, 2020
3 tasks
@hypest
Copy link
Copy Markdown
Contributor Author

hypest commented Apr 24, 2020

Updated the description with the git clone option to clone the particular branch, to avoid pulling the full submodules from develop.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Apr 24, 2020

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

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

TestA and TestB worked perfectly. LGTM! :shipit:

@cameronvoell cameronvoell merged commit 2a95630 into woo/aztec-design-changes Apr 24, 2020
@hypest hypest deleted the gutenberg/shallow-submodules branch April 24, 2020 20:44
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.

2 participants