CSIT/Submitting Patches

From fd.io
< CSIT
Revision as of 11:17, 2 May 2018 by Vrpolak (Talk | contribs)

Jump to: navigation, search

Submitting Patches

The VPP wiki has a nice set of instructions for Pushing Code with git review. The same process is recommended for submitting patches to the CSIT git repository.

Commit Message Headline Nomenclature

When committing code to the CSIT repository and pushing patches to gerrit, please add a prefix to the headline of the commit message that contains the Jira ticket id, "DO_NOT_MERGE" or both:

  • CSIT-<###>: Summary of patch
  • DO_NOT_MERGE: Summary of patch
  • both ( DO_NOT_MERGE CSIT-<###>: Summary of patch )

Note: DO_NOT_MERGE should always be at the beginning of the line when present.

Here are some examples:

CSIT-60: Create l2-vlan-dot1ad libraries for perf testing
DO_NOT_MERGE: test VXLAN + VLAN on newer version of VPP.
DO_NOT_MERGE CSIT-156: DPDK support for Nested VM image

Using this nomenclature makes the CSIT gerrit open patches list easier to manage for CSIT committers and code reviewers.

Verify documentation locally

Directory resources/tools/doc_gen/ contains run_doc.sh script, which can be run with your target branch as argument: $ ./run_doc.sh master

This creates _build directory with rendered .html documentation, but look for any warnings printed during the script execution. Attempt to fix such warning before Publishing your Gerrit change.

Code style choices

CSIT project has adopted a particular code style, and it is still improving slowly. Here are some quick rules.

TODO: Move to a separate wiki page?

String formatting in Python

New style with named placeholders is preferred due to increased readability.