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

Change to our git flow: introducing the new stable, build green, master branch. #5954

Closed
mattab opened this issue Aug 7, 2014 · 7 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Aug 7, 2014

Challenge to solve
Community developers contributing to Piwik (eg. via pull requests) often will checkout a code that has broken tests. Pull requests execute on tests that were already broken so devs get a bad feeling when they start contributing 👎

Solution
We have discussed this for two hours during our team meetup in Munich and have come to some useful action points:

  • master branch should always have a green build!
  • core team members work in develop branch
  • we merge develop to master when develop is green, regularly
  • document our new git flow in dev docs

Questions

  • how do we make it work nicely with submodules?
  • how often do we merge develop to master (daily or every few days?)
  • should we also check that piwik-ui-tests build is green too?

Result: anyone issuing Pull requests will have a chance to see green build for their proposed changes,

this is part of broader improvements to the way Piwik functions internally and as a community. see also #5953 new Changelog.md file for developers

@mattab mattab added this to the Piwik 2.6.0 milestone Aug 7, 2014
@diosmosis
Copy link
Member

FYI, develop can be rebased automatically using .travis.yml (after travis_system branch is merged).

@mattab mattab modified the milestones: Piwik 2.6.0, Piwik 2.7.0 Aug 25, 2014
@mattab mattab modified the milestones: Piwik 2.9.0, Piwik 2.8.0 Oct 2, 2014
@mattab mattab added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Oct 10, 2014
@mattab
Copy link
Member Author

mattab commented Oct 17, 2014

Can Travis CI automatically merge develop into master when develop is green?

@diosmosis
Copy link
Member

I think so yes, have to do the following for each job in a build:

  • if this job failed, abort
  • use travis API to get status of each job in current build (using $TRAVIS_BUILD)
  • if all of the jobs (except this one) have finished and are green, keep going
  • in travis git clone, checkout master, then rebase w/ develop
  • then git push as is done w/ current .travis.yml auto updating

For this to work, no commits should be done manually on master w/o sync-ing w/ develop. When merging pull requests, we will have to sync manually w/ develop.

@mattab mattab modified the milestones: Piwik 2.9.0, Piwik 2.10.0 Oct 23, 2014
@mattab
Copy link
Member Author

mattab commented Nov 13, 2014

Moving back this issue to Short term as I'm still not convinced we need to work with branches...

@mattab mattab modified the milestones: Short term, Piwik 2.10.0 Nov 13, 2014
@mattab
Copy link
Member Author

mattab commented Dec 18, 2014

this issue may help: #6757

@mattab mattab modified the milestones: Short term, Mid term Apr 7, 2015
@mattab
Copy link
Member Author

mattab commented Apr 7, 2015

In the last few months we have made many improvements to our CI setup.

One major issue remains, it is to fix all randomly failing tests. Luckily we have fixed almost all cases, but here are the last remaining ones:

Once we do these fixes, master branch will be always green, because Product Engineering team now uses Pull request for everything non-trivial (that could potentially break the build).

@mattab
Copy link
Member Author

mattab commented Apr 7, 2015

once we fix random builds, master branch will always be green. So we won't change out git flow for now as it's not needed (assuming we manage to find solution to those random UI screenshot tests -- help needed 👍 )

@mattab mattab closed this as completed Apr 7, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants