Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relying on a temp branch of an rspec repo can cause problems #137

Open
myronmarston opened this issue Aug 30, 2015 · 0 comments
Open

Relying on a temp branch of an rspec repo can cause problems #137

myronmarston opened this issue Aug 30, 2015 · 0 comments

Comments

@myronmarston
Copy link
Member

It's common for us to create a branch and open a PR in one repo (e.g. rspec-support) and also create a branch and open a PR in another repo (e.g. rspec-core) that relies upon some new API added to rspec-support. When this happens, it can cause confusing build failures, as is the case right now for rspec/rspec-support#237, rspec/rspec-core#2063 and rspec/rspec-expectations#844. Using that as an example, here's the problem:

  • The rspec-support adds a new API intended for use by other rspec repos -- in this case, RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue.
  • The rspec-core and rspec-expectations PRs both use this new API.
  • In the rspec-core PR, the build is failing when it hits the part that runs the rspec-mocks specs against the rspec-core changes.
  • In the rspec-expectations PR, the build is failing when it hits the part that runs the rspec-core specs against the rspec-expectations changes.
  • In both cases, when the build runs the specs from the other rspec repo, it does so after using the master Gemfile of the other repo -- and the master Gemfile uses the master branch of rspec-support. However, while the rspec-mocks specs run, they hit the situation where rspec-core uses RSpec:Support::AllExceptionsExceptOnesWeMustNotRescue but that module is not defined because it's not running against the rspec-support branch that defines that module. A similar thing is happening for the rspec-expectations build failure: it uses RSpec:Support::AllExceptionsExceptOnesWeMustNotRescue in the contain_exactly matcher and the rspec-core specs use that matcher, so when the rspec-core specs run using rspec-support master and the rspec-expectations PR branch, it fails.

To solve this problem, we need to make sure that when running a CI build, we use the same commit of all rspec repos for every part of the build. The "main" repo (the one that triggered the build) is the one that should determine what SHAs should be used for each RSpec repo.

I think some intelligence could be added to https://github.com/rspec/rspec-dev/blob/master/travis/script/clone_all_rspec_repos to do this.

Anyone want to tackle this, @rspec/rspec ?

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

No branches or pull requests

1 participant