Behind the Recent Magento 2 GitHub Changes

Big News! We have improved our GitHub interaction processes as a part of the Magento 2 developer beta launch to make it easier to accept community contributions. Ok, its no longer new news, but its important enough to repeat! Ben Marks published a recent blog on how to contribute to Magento 2. In this post I explain some of the details behind this change for those who like looking under the covers.

The Past

Part of the reason of the past pain was around our approach to push code from our internal repository to the public GitHub repository. We used to do things like inject copyright and license text into each header file. This meant our internal code base was not identical to the external code base, making it harder to merge pull requests directly back in. We had to manually apply the changes.

I was curious to see if anyone connected the dots as to what was coming in build 108 when we removed the lengthy license text from each header file. That was a part of the precursor to this change. There are now zero changes made during the weekly GitHub push. It is a direct push from one repository to another.

Another minor detail was internally the Magento Enterprise Edition (EE) code used to live in the same repository as the Community Edition (CE) code. It made internal development easier. There were different publish processes for the CE and EE releases to ensure the right files and license messages were included. This has been addressed by pulling EE code into a separate (internal) repository so is no longer an issue.

What Won’t Change

At least for now, there will be things that will not change. For example, we will continue with the weekly push process. This is the result of a regression test run passing, so at least for the short term we are going to continue the practice of running this test before releasing new code. Making it easier to accept community contributions does not mean we are lowering the internal coding standards we have been putting in place.

Code reviews for example will also be conducted before any community contribution is accepted. Again, this is an internal process issue. We are making it easier to accept pull requests, we are not radically changing the way we work internally as a part of the GitHub changes (at this stage anyway).

I assume it is obvious, but I will remind people that we make no promise to accept pull requests created. The team is going to evaluate each request on merit and make the final call.

So Why is it Better?

What is better is that it is easier to accept external pull requests against the public GitHub repository. This should make it faster for the internal team to accept them. This is great for small bug fixes in particular.

The weekly pushes will no longer squash all the intermediate commits. This means it will be possible to review the changes made to address a specific problem. Previously all changes were committed together in a single mega-commit.

Small changes may be possible without waiting for the weekly push. This is an area we will explore.

Attribution will remain. If you make a pull request and it gets accepted, your name will then be in the master Magento 2 repository. Previously this got lost in the commit history. (We did note it in the change log.)

Larger contributions should be possible, but are harder to coordinate. If you are thinking of a bigger change, please talk with us first. We would hate for the community to do a lot of work only to have it rejected when done. But it is a potential launching pad for more significant community involvement in projects in the future. (None are planned yet.)

Conclusions

At Imagine 2014 I remember Mark Lavelle up on stage making it clear that Magento 2 will remain open. This work of improving GitHub processes is a part of the ongoing commitment of eBay in keeping the commitment of keeping Magento open.

This change is not the last step. We will continue to iterate, learn, and improve our processes. Constructive feedback is always welcome and thank you for your patience and support as we get to that ‘happy place’.

If you like this change, why not drop a thank you to Max (twitter @maksek_ua) and team who drove this to completion in time for dev beta.