Using Git with Atlas
Committer guidelines
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.
Commit Steps
- 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, run git log and copy and paste the commit information into the Jira. You can add this text at the same time as you resolve the Jira (step 6).
- 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/.
Releasing atlas
Note: Replace 0.8.1 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
- Create a new branch for the release, if necessary.
- Update Atlas version in all pom files (to the release version)
- Verify the sources in the release branch with the following steps:
- builds cleanly with empty local mvn repo(~/.m2/repostory):
mvn clean install &&
- packaging & distro creation completes successfully:
mvn clean package -Pdist,embedded-hbase-solr
- Atlas installed with the created binary package is functional
- builds cleanly with empty local mvn repo(~/.m2/repostory):
Prepare keys
Generate new PGP key: http://www.apache.org/dev/openpgp.html#generate-key
Checkout atlas release repo using svn:
svn co https://dist.apache.org/repos/dist/release/atlas atlas-release
- Add your key to atlas/KEYS:
(gpg --list-sigs <your name> \ && gpg --armor --export <your name>) >> atlas-release/KEYS
e.g.
(gpg --list-sigs "John Smith" \
&& gpg --armor --export "John Smith") >> atlas-release/KEYS - Verify KEYS file to see if your PGP key has been added successfully, svn commit modified KEYS file in atlas-release:
cd atlas-release
svn add KEYS
svn commit KEYS -m "Added GPG Key for <your name> to KEYS file" --username <apache user-id>
Prepare source package
- Go to atlas code with the release branch
git tag -a release-0.8.1-rc0 -m "Atlas 0.8.1-rc0 release"
git push origin release-0.8.1-rc0
mvn clean package -Pdist -DskipTests
Upload source package
svn co https://dist.apache.org/repos/dist/dev/atlas atlas-dev
mkdir atlas-dev/0.8.1-rc0
cp atlas/distro/target/apache-atlas-0.8.1-sources.tar.gz atlas-dev/0.8.1-rc0/
cd atlas-dev/0.8.1-rc0/
gpg --armor --output apache-atlas-0.8.1-sources.tar.gz.asc --detach-sig apache-atlas-0.8.1-sources.tar.gz
gpg --print-md MD5 apache-atlas-0.8.1-sources.tar.gz >apache-atlas-0.8.1-sources.tar.gz.md5
gpg --print-md SHA512 apache-atlas-0.8.1-sources.tar.gz > apache-atlas-0.8.1-sources.tar.gz.sha512
- Commit atlas-dev
Voting
Vote mail template
Subject: [VOTE] Release Apache Atlas version 0.8.1 To: dev@atlas.apache.org Body: Atlas team, Apache Atlas 0.8.1 release candidate #0 is now available for a vote within dev community. Links to the release artifacts are given below. Please review and vote. The vote will be open for at least 72 hours or until necessary votes are reached. [ ] +1 approve [ ] +0 no opinion [ ] -1 disapprove (and reason why) Thanks, Madhan List of issues addressed in this release: https://issues.apache.org/jira/issues/?jql=project%20%3D%20Atlas%20AND%20fixVersion%20%3D%200.8.1%20ORDER%20BY%20key%20DESC Git tag for the release: https://github.com/apache/atlas/tree/release-0.8.1-rc0 Sources for the release: https://dist.apache.org/repos/dist/dev/atlas/0.8.1-rc0/apache-atlas-0.8.1-sources.tar.gz Source release verification: PGP Signature: https://dist.apache.org/repos/dist/dev/atlas/0.8.1-rc0/apache-atlas-0.8.1-sources.tar.gz.asc MD5 Hash: https://dist.apache.org/repos/dist/dev/atlas/0.8.1-rc0/apache-atlas-0.8.1-sources.tar.gz.md5 Keys to verify the signature of the release artifacts are available at: https://dist.apache.org/repos/dist/dev/atlas/KEYS
If the above vote passes, send a result vote and the release is now successful.
Post release steps
- Publish release artifacts in apache mvn repository using instructions
- Publish the release packages:
svn co https://dist.apache.org/repos/dist/release/atlas atlas-release && cd atlas-release
- Delete the old releases
- Copy the release artifacts from https://dist.apache.org/repos/dist/dev/atlas/0.8.1-rc0/ to new release directory 0.8.1
- Commit atlas-release
- Update atlas website documentation:
Atlas source document changes:
Switch to release branch:
git checkout branch-2.0
- Generate Java/REST API docs from Atlas sources with the following command from atlas root directory:
mvn clean -DskipTests -DskipEnunciate=false package
Make necessary .md changes in "atlas/docs" module
Add a new page inside Whats-New folder to list new features in the current release - "What's new in Apache Atlas 2.1?"
Update
Downloads.md
to add the release artifacts (source, signature and SHA512) and add release notes for current release.- Add the version entry in config/versions.js to list new version in the dropdown.
Update Overview.md to update links to "What's new in Apache Atlas 2.1?" page.
Generate documentation from .md sources with the following command from "atlas/docs" directory:
mvn clean site
To validate the generated document execute the command: "mvn site:run"
Validate generated Atlas Doc and API docs; if looks good commit changes to
branch-2.0
(release branch) andmaster
branch.
Atlas Website changes:
- Clone Atlas Website sources:
git clone https://gitbox.apache.org/repos/asf/atlas-website.git atlas-website
- Switch to
asf-site
branch:cd atlas-website; git checkout asf-site; cd ../;
- Create following directories for release contents:
mkdir -p atlas-website/2.0.0/api/v2
- Copy documentation from atlas source generated earlier to Atlas website repository:
cp -r atlas/docs/target/site/* atlas-website/2.0.0/
- Copy Java/REST API doc from atlas source generated earlier to Atlas website repository:
cp -r atlas/webapp/target/api/v2/apidocs/* atlas-website/2.0.0/api/v2/
- Update site's root documentation with the latest version contents:
cp -r atlas-website/2.0.0/ atlas-website/
- Verify html files and commit
- Verify site http://atlas.apache.org
- Clone Atlas Website sources:
Send release announcement
To: announce@apache.org, dev@atlas.apache.org, user@atlas.apache.org Subject: [ANNOUNCE] Apache Atlas 0.8.1 released Body: Hi All, The Apache Atlas team is happy to announce the release of Apache Atlas - version 0.8.1. Atlas is a scalable and extensible set of core foundational governance services – enabling enterprises to effectively and efficiently meet their compliance requirements within Hadoop and allows integration with the whole enterprise data ecosystem. The release artifacts are available at: https://atlas.apache.org/#/Downloads The binary artifacts are available from Maven central and its mirrors. To use these artifacts, please use the following documentation: http://atlas.apache.org/0.8.1/index.html More details on Apache Atlas can be found at: http://atlas.apache.org/ We thank everyone who made this release possible. Thanks, Apache Atlas team
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 -DskipDocs
' (this will build artifacts, sources and sign)- Deploy the artifacts: '
mvn clean deploy -Papache-release -DskipTests -DskipDocs
'- 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/