Automattic / a8c-ci-toolkit-buildkite-plugin

A caching plugin that can be invoked from your build script.
22 stars 5 forks source link

Rename the repository to a8c-ci-toolkit-buildkite-plugin #39

Closed rynaardb closed 1 year ago

rynaardb commented 1 year ago

What it does

Additional Improvements Made

How the changes was verified and tested

AliSoftware commented 1 year ago
  • All the checks for the Buildkite Plugin Linter build step passed
  • All tests are passing
  • The new build step added in this PR was tested and verified working with this and this build

I also wanted to say that I looked at a couple of recent builds from other repos, and the renaming of this repo to a8c-ci-toolkit-buildkite-plugin didn't seem to have affected them, which is great 👍

This was more thanks to the fact that the plugin was already cached in the various agents already though, rather than thanks to "GitHub auto-redirect on repo renames" like we thought. I'm sure that, if it were not cached on some agents, then the redirect would still solve this for us anyway like we hoped / mentioned in the Project Thread, but at least even if it didn't, we have the cache helping us on that matter too until we rename the references in all client repos 🙂

  | Running global environment hook | 0s
  | Preparing plugins | 0s
  | # Plugin "github.com/automattic/bash-cache-buildkite-plugin#1.7.0" already checked out (824d1b0)
  | # Plugin "github.com/automattic/git-s3-cache-buildkite-plugin#v1.1.0" already checked out (16d0bea)
  | Running plugin bash-cache environment hook
rynaardb commented 1 year ago
  • All the checks for the Buildkite Plugin Linter build step passed
  • All tests are passing
  • The new build step added in this PR was tested and verified working with this and this build

I also wanted to say that I looked at a couple of recent builds from other repos, and the renaming of this repo to a8c-ci-toolkit-buildkite-plugin didn't seem to have affected them, which is great 👍

This was more thanks to the fact that the plugin was already cached in the various agents already though, rather than thanks to "GitHub auto-redirect on repo renames" like we though. I'm sure that, if it were not cached on some agents, then the redirect would still solve this for us anyway like we hoped / mentioned in the Project Thread, but at least even if it didn't, we have the cache helping us on that matter too until we rename the references in all client repos 🙂

  | Running global environment hook | 0s
  | Preparing plugins | 0s
  | # Plugin "github.com/automattic/bash-cache-buildkite-plugin#1.7.0" already checked out (824d1b0)
  | # Plugin "github.com/automattic/git-s3-cache-buildkite-plugin#v1.1.0" already checked out (16d0bea)
  | Running plugin bash-cache environment hook

Yeah, I'm also really pleased to see that nothing, so far, broke because of the renaming. As far as I can tell, the GitHub repository redirect is also working as expected.

https://github.com/Automattic/bash-cache-buildkite-plugin/ redirects to https://github.com/Automattic/a8c-ci-toolkit-buildkite-plugin and with my local repository (still pointing to bash-cache-buildkite-plugin) I'm still able to push & pull without any issues.

AliSoftware commented 1 year ago

I wanted to validate that the tests would properly go red if one of the command indeed didn't have the +x flag, so I cut a test-pr/39 branch to chmod -x on one of the commands to check.

That's where I noticed that, while the tests were properly going red, the error output shown in Buildkite logs wasn't super helpful in indicating which one failed (as we're now using a loop with $cmd), so I tweaked the test code a bit, to make the errors hopefully a bit more helpful.

Feel free to cherry-pick af2ae5db65293e559258af612365f0c4a530c91f into your branch if you like it 🙂

AliSoftware commented 1 year ago

PS: Side note that we'll have to remember to also update the required checks in GitHub's branch protection Settings 🙂

image
rynaardb commented 1 year ago

PS: Side note that we'll have to remember to also update the required checks in GitHub's branch protection Settings 🙂

image

Done ✅

rynaardb commented 1 year ago

I wanted to validate that the tests would properly go red if one of the command indeed didn't have the +x flag, so I cut a test-pr/39 branch to chmod -x on one of the commands to check.

That's where I noticed that, while the tests were properly going red, the error output shown in Buildkite logs wasn't super helpful in indicating which one failed (as we're now using a loop with $cmd), so I tweaked the test code a bit, to make the errors hopefully a bit more helpful.

Feel free to cherry-pick af2ae5d into your branch if you like it 🙂

Thanks, happy to do so! See 04a5952b95d62751efe649275c2a21e7ffaa9b17