Skip to content

Conversation

@spencertransier
Copy link
Contributor

@spencertransier spencertransier commented Nov 4, 2022

WooCommerce iOS has had a cache-builder.yml configuration file for a while, but the git cache uses the Buildkite organization when uploading the cache instead of the GitHub repo (I discovered that after a lot of troubleshooting when adding caching to Day One 😄). This PR updates the repo path to automattic instead of woocommerce so that the caches can save correctly.

There has been a single git cache file saved from 2022-03-22 saved in the a8c-repo-mirrors/woocommerce/woocommerce-ios folder that has been used to update the cache from. These changes make it so the cache can be updated daily and not have to update from the older cache. That woocommerce folder can be removed after this PR is merged.

I also created a schedule in Buildkite (WooCommerce iOS > Pipeline Settings > Schedules) to rebuild the cache daily.

How to Test

  1. Open WooCommerce iOS in Buildkite
  2. Click the green "New Build" button in the upper right
  3. Use update/Git-cache-path for the branch to build
  4. Add PIPELINE=cache-builder.yml in the Environment Variables field (click the Options button to show the field)
  5. Click "Create Build"
  6. A cache rebuild will be kicked off.
  7. It should complete successfully. You can also verify by checking in the a8c-repo-mirrors/automattic/woocommerce-ios for the Git cache file (labeled with today's date) and in the a8c-ci-cache bucket for the pods cache (labeled woocommerce-ios-specs-repos and woocommerce-ios-global-pod-cache)

@spencertransier spencertransier added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Nov 4, 2022
@spencertransier spencertransier added this to the 11.1 milestone Nov 4, 2022
@spencertransier spencertransier requested a review from a team November 4, 2022 00:18
@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@spencertransier spencertransier modified the milestones: 11.1, 11.2 Nov 4, 2022
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8022-5f2b325 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@AliSoftware
Copy link
Contributor

AliSoftware commented Nov 4, 2022

I don't think that's the first time we got bitten by this. So we should probably deprecate this repo parameter and replace it with a buildkite_slug parameter instead (or any other name that would be clearer than repo to avoid confusion)…

Though I know that Jeremy has also talked about refactoring / cleaning up the cache builder mechanism to avoid having the logic live in two separate/independent plugins (one to restore the git-s3-cache, the other to save_cache via bash-cache plugin command and make it simpler to setup so we could also wait for that… but we also know how the trend go with our backlog and our hopes of plans… so maybe it's still worth patching now instead of waiting forever for the refactor to clean everything up?

@spencertransier
Copy link
Contributor Author

@AliSoftware Yes to everything you said. I'll go ahead with this for now with the hopes it can be improved even more in the future. 🙂

@spencertransier spencertransier merged commit 41a3639 into trunk Nov 4, 2022
@spencertransier spencertransier deleted the update/Git-cache-path branch November 4, 2022 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants