Using Git with Atlas
These are the general guidelines that the committers should try to follow always, but can use their discretion, and rely on good faith and trust to do the right thing:
All commits need a JIRA
All jiras need a +1 from a committer (preferably) or subject matter expert (for things like UI - which has fewer experts in the committer list) before committing. Of course, no commit can happen if another contributor/committer has requested time for review. +1 can't be from the same person who has submitted the patch
For bugs and improvements that touch core of Atlas - the type system, metadata repository, notification interface, please wait at least 18 hours from when the patch was submitted(excluding holidays), to give time for contributors/committers in other timezones to review.
Features or large patches that touch many areas should have a proposal about the approach in JIRA and should be reviewed by more than one committer.
Conversely, we can be a little lax with commits that touch peripheral areas that are unlikely to destabilise core - including UI, hooks, documentation and commit more freely.
Exceptions are fixes for bugs that are breaking builds/tests - these can be committed without waiting, irrespective of which area they fall in. But they need +1 from some contributor, not same as patch owner.
Committers should try to closely monitor activity and comments on JIRAs and proactively engage if they have issues with the approach etc.
If any commit is found to break things badly, the right way to fix is to open a new JIRA stating what the issue is, caused by which JIRA and wait for the committer or contributor to respond back. A revert can be proposed depending on how bad the regression is, and the committer / contributor must be open to this in the best interest of the project.
- Apply the patch from the JIRA on the latest codebase with no other local changes
If the patch has been produced in the mail format:
git am --signoff < ATLAS_xxxx.patch
- If the patch has not been produced in the mail format, you need to supply the author and message on the commit:
- Run git apply ATLAS_xxxx.patch
- Run git commit --author="<author>" --m="<ATLAS-xxxx message text>" --signoff
- Run 'mvn clean install'
- If you want to check the commits that will be pushed run '
git cherry -v'
- 'git push'. If git push fails because the codebase is out of sync with remote, the differences need to be resolved.
- If the conflicts are trivial run 'git pull --rebase'. Please don't run just 'git pull' as it adds merge commits. Resolve conflicts if any and verify the build and commit again.
- If the merge is not trivial, send back to the author to resolve conflicts and rerun testing and resubmit with the conflicts resolved.
- Make sure the JIRA has the latest patch and resolve the JIRA with the right fixVersion
- Add the commit url to the Jira. To find the commit url - see https://email@example.com.
- Rectifying mistakes:
- Should be done in new JIRA / commits.
- If you commit with the wrong commit message you can alter the commit message if it is the last commit. https://help.github.com/articles/changing-a-commit-message/.
Note: Replace 0.7 with the version that you are releasing
Prepare for release
- Send an email to dev@ with the scope of the release and the release timelines atleast a week before the planned release start date
- Cut the branch 0.7-incubating
- Change the project versions - master branch to 0.8-incubating-SNAPSHOT and 0.7-incubating branch to 0.7-incubating
- Verify the source package built on 0.7-incubating - code builds with empty local mvn repo(~/.m2/repostory), tests pass, the binary package functionality
Generate key: http://www.apache.org/dev/openpgp.html#generate-key
svn co https://dist.apache.org/repos/dist/release/incubator/atlas atlas-release
- Add your key to atlas/KEYS:
(gpg --list-sigs <your name> \ && gpg --armor --export <your name>) >> atlas-release/KEYS
- Commit atlas-release
Prepare source package
- Go to atlas code with the release branch
- Verify - build with tests succeed, the functionality works with a binary package
- git tag -a release-0.7-rc0 -m "Atlas 0.7-rc0 release"
git push origin release-0.7-rc0
- mvn clean package -Pdist -DskipTests
Upload source package
svn co https://dist.apache.org/repos/dist/dev/incubator/atlas atlas-dev
- mkdir atlas-dev/0.7-incubating-rc0
- cp atlas/distro/target/apache-atlas-0.7-incubating-sources.tar.gz atlas-dev/0.7-incubating-rc0/
- cd atlas-dev/0.7-incubating-rc0/
- gpg --armor --output apache-atlas-0.7-incubating-sources.tar.gz.asc --detach-sig apache-atlas-0.7-incubating-sources.tar.gz
- gpg --print-md MD5 apache-atlas-0.7-incubating-sources.tar.gz >apache-atlas-0.7-incubating-sources.tar.gz.md5
- gpg --print-md SHA512 apache-atlas-0.7-incubating-sources.tar.gz > apache-atlas-0.7-incubating-sources.tar.gz.sha512
- Commit atlas-dev
Vote mail template
If the above dev vote passes, send the result vote on dev@ and start vote on general@incubator:
If the vote on general@ passes, send a result vote and the release is now successful.
Post release steps
- Publish release artifacts in apache mvn repository using instructions for branch 0.7-incubating
- Publish the release packages:
- svn co https://dist.apache.org/repos/dist/release/incubator/atlas atlas-release && cd atlas-release
- Delete the old release 0.6.0-incubating
- Copy the release artifacts from https://dist.apache.org/repos/dist/dev/incubator/atlas/0.7.0-incubating-rc2/ to new release directory 0.7.0-incubating
- Commit atlas-release
- Update atlas website documentation:
- Update sections Releases and Documentation in atlas code docs/src/site/site.xml - update the old release link to use archives, add sections for new release
- Create new directory for release in atlas-website git base - 0.7.0-incubating
- cp -r 0.7.0-incubating/atlas/docs/target/site/* atlas-website/0.7.0-incubating/
- cp -r 0.7.0-incubating/atlas/webapp/target/apidocs atlas-website/0.7.0-incubating/api
- cp -r master/atlas/docs/target/site/index.html atlas-website/index.html
- Commit atlas-website
- Commit atlas
Send release announcement
Publishing artifacts in apache mvn repository
Generate PGP keys: http://www.apache.org/dev/openpgp.html#generate-key
Set-up apache id credentials for maven: http://www.apache.org/dev/publishing-maven-artifacts.html#dev-env
Test your settings: 'mvn clean install -Papache-release -DskipTests' (this will build artifacts, sources and sign)
- Deploy the artifacts: 'mvn clean deploy -Papache-release -DskipTests'
- For SNAPSHOT version, verify the artifacts at https://repository.apache.org/content/repositories/snapshots/org/apache/atlas/
- For release version, the artifacts are deployed in staging repository.
- Login at https://repository.apache.org/index.html, go to stagingRepositories
- Select the atlas repository and close. This will trigger validations on checksum and signature. If any checks fail, fix the issue, deploy the artifacts and close the repository again. If all checks succeed, release the repository
- Verify the artifacts at https://repository.apache.org/content/repositories/releases/org/apache/atlas/
Deploying site http://atlas.apache.org/
- Run 'mvn clean site' in apache/atlas
- git clone https://git-wip-us.apache.org/repos/asf/incubator-atlas-website.git atlas-website
- Go to asf-site branch
- cp -r atlas/docs/target/site/* atlas-website/
- cp -r atlas/webapp/target/apidocs atlas-website/api
- Verify the html files and commit
- Verify the site http://atlas.apache.org/
Deploying site http://incubator.apache.org/projects/atlas.html
Instructions to update an incubator site are http://incubator.apache.org/guides/website.html