ManageIQ / manageiq-cross_repo

ManageIQ cross-repository testing framework
MIT License
3 stars 18 forks source link

Pass BUNDLE_PATH env var to test script #71

Closed agrare closed 3 years ago

agrare commented 3 years ago

Have the test-repo use the top-level vendor/bundle directory allowing for shared caches

agrare commented 3 years ago

So when using cache: bundler in .travis.yml it runs bundle clean from the manageiq-cross_repo dir which cleans all of the core repo's gems.

I was able to get around this by using the custom cache directories per https://docs.travis-ci.com/user/caching/#cleaning-up-bundle

https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/285/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485L4-R6

agrare commented 3 years ago

Example of cross-repo using the bundler cache (force-pushing a PR, reusing the cache from the PR): https://travis-ci.com/github/ManageIQ/manageiq-cross_repo-tests/builds/217852414#L324-L728

agrare commented 3 years ago

We could manually run bundle clean from the test-repo directory to ensure that the cache doesn't grow unbounded

Fryguy commented 3 years ago

Awesome you got this working...I had tried something similar a few months ago, but I couldn't get it to work...not sure what I was going differently, but glad you got it!

So, after this PR there are 2 more problems

  1. There is no "base" cache that a PR could pull from, since we don't merge PRs. I think what we could do is commit the .travis.yml with the full suite and maybe cron that weekly. It might be good to just get a weekly full test suite anyway.
  2. Once we solve 1, the cache itself can grow indefinitely. I think what we can do here is somehow blow away the cache on that weekly cron run (i.e. manually blow away the cache before the master run executes).
agrare commented 3 years ago

There is no "base" cache that a PR could pull from, since we don't merge PRs. I think what we could do is commit the .travis.yml with the full suite and maybe cron that weekly. It might be good to just get a weekly full test suite anyway.

Yeah for this I was thinking we can just leave the current .travis.yml the way it is and set up a weekly cron run. It doesn't have to be a /all unless we want it to be. The current vars will run core tests on the current master branch.

Once we solve 1, the cache itself can grow indefinitely. I think what we can do here is somehow blow away the cache on that weekly cron run (i.e. manually blow away the cache before the master run executes).

Yes I'm thinking we can run bundle clean from the test-repo dir before finishing the test so it won't do that, I'll play with that in a follow-up (https://github.com/ManageIQ/manageiq-cross_repo/pull/71#issuecomment-783540247)

Fryguy commented 3 years ago

It doesn't have to be a /all unless we want it to be.

Oh yeah I guess master is enough. Though it might be nice to do a /all anyway.