Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • In VNC/Gnome environment, either add to .bashrc or type at your current shell:

    Code Block
    languagebash
    unset SSH_ASKPASS


  • Pushing code to the Apache repository requires password authentication.
  • Ensure that your work space is cloned from GitHub:

    Code Block
    languagebash
    git clone https://github.com/apache/incubator-trafodion
  • Ensure that you have a remote pointing to the Apache repository. (Setting only the push URL with user name does not seem to work. This means that fetching the apache remote prompts for a password, but it is ignored. You can hit return without entering password, and fetch still works! You must enter password only when pushing to apache remote.)

    Code Block
    languagebash
    git remote add apache https://USERNAME@git-wip-us.apache.org/repos/asf/incubator-trafodion.git

...

  • If an unknown user submits a PR, then Jenkins automation will post a message to GitHub asking if it is okay to test.
    • Review the pull request. If the code is not malicious and is okay to test, post a comment jenkins, ok
  • If the author is a trusted contributor, you can add them to a white-list of known users.
  • New commits to the PR will trigger a new build. You can also trigger a retest without a new commit.
    • Post a comment jenkins, retest

...

Some things are necessary to keep in mind when doing code reviews:

 

  1. C code should comply with the [[cplusplus-guidelines,C Guidelines]].

  2. The code shouldlook should look like the code around it, to make the code more uniform and easier to read.

  3. New test cases should be implemented as described in Modifying Tests.

...

Be Aware of Licensing Concerns

Trafodion is developed and provided using the Apache 2.0 license. In order to not compromise that license, we must be careful about accepting code contributions that are not original code. We cannot accept code forked from other open source projects that have a non-permissive license for example.

 

If a reviewer suspects that contributed code is not original without attribution, the reviewer should -1 the change, and in the review comment, state the concern about originality and licensing. If the contributed code is proven to be unoriginal and with an incompatible license, the contribution should be rejected. If this happens, it is recommended that the Trafodion PPMC privately discuss with the contributor the importance of proper licensing and proper attribution or originality. The importance of attribution, originality, and licensing is often difficult for some new contributors, for some students, and for some people from various cultures of origin, and this should be seen as a learning and teaching opportunity.

Merge Pull Requests

 

 

Info
titleTarget Branch

Before beginning, make careful note of what branch you are merging to. At the top of the pull request, you'll see words like, "So-and-so wants to merge n commits into apache:target_branch from github_user:some_other_branch. Most of the time, target_branch will be "master", but occasionally you'll see a release branch instead, e.g., "release1.3". In the instructions below, if the target_branch is not "master", replace "master" with the name of the target branch.

 

 

Step 1: Check Status

Check the pull request status on GitHub, at the bottom of the pull request page. It will tell you if there are any merge conflicts with master branch.

...

Code Block
languagebash
# You will be prompted for your Apache passwordpassword, but you do not have to enter it for fetch. Just hit return.
git fetch apache
git checkout -b mrg_12345 apache/master

...

Code Block
languagebash
git log apache/master..HEAD
git diff apache/master HEHEAD

Step 6: Push Changes

Push changes to the Apache repository, specifying the source and the destination branch.

Code Block
languagebash
# You will be prompted for your Apache password
git push apache HEAD:master`

Publish Web Site Updates

If the change you are merging includes website or document updates, you should also update the project website. Look for files in the docs/ tree as well as some files in dcs/ and core/rest that affect documents.

For more info on documentation build, see Modifying Documents.

To publish the website:

  1. Fetch changes to be published from the Trafodion master branch (git fetch --all; git checkout apache/master).
  2. Build Trafodion site (source env.sh; mvn post-site).
  3. If there are documentation changes to prior releases, check out those release branch(es) and re-build the affected docs (git checkout apache/releaseX.Y; source env.sh; cd docs/... ; mvn post-site).
  4. git clone https://ApacheUserName@git-wip-us.apache.org/repos/asf/incubator-trafodion-site.git
  5. Checkout asf-site branch (cd incubator-trafodion-site; git checkout -b asf-site origin/asf-site).
  6. Copy content of trafodion build into the incubator-trafodion-site directory (cp -R trafodion/docs/target/*   incubator-trafodion-site/)
  7. Commit changes (git add --all ; git commit).
  8. Push them back to the apache origin repository to the asf-site branch (git push origin HEAD:asf-site).
  9. Check that the website is refreshed.

Once pushed, Apache gitpubsub takes care of populating http://incubator.trafodion.apache.org with your new changes. If they don’t show up, pushing another commit may work to trigger the automation. Just make an innocuous white-space change to some html file, commit it and push it.

Completion 

  1. Close Jira, if appropriate, or ask the contributor to do so.
  2. If ASF automation does not close the pull request, ask the contributor to do so.

...