WARNING: This is the _old_ Lustre wiki, and it is in the process of being retired. The information found here is all likely to be out of date. Please search the new wiki for more up to date information.

Submitting Patches: Difference between revisions

From Obsolete Lustre Wiki
Jump to navigationJump to search
(rework to include testing, and fix up questions)
Line 1: Line 1:
When you are ready to have your patch reviewed and committed, please do so using Bugzilla by following the process described below.
When you are ready to have your patch reviewed, please do so using Bugzilla by following the process described below.  It is sometimes also desirable to solicit reviews of patches on the lustre-devel mailing list, which will expose the patch to a much wider audience, but this will ''not'' put the patch on the track to being accepted to the Lustre repository.


=== Submitting Patches for Review ===
=== Submitting Patches for Review ===


To have your changes accepted into a main-line Lustre branch, your code must be reviewed and approved. Following these steps will speed up review of your changes and increase the likelihood of success:
To have your changes accepted into a main-line Lustre branch, your code must be reviewed and approved by senior Lustre engineers. Following these steps will speed up review of your changes and increase the likelihood of success:


1. Read, complete, and return the form found at [http://wiki.lustre.org/images/c/cd/Sun_Contributor_Agreement_1_5.pdf Contributor Agreement]  We cannot accept your contributions without this form. See [[Contribution_Policy|Contribution Policy]] for more information.
1. Read, complete, and return the form found at [http://wiki.lustre.org/images/c/cd/Sun_Contributor_Agreement_1_5.pdf Contributor Agreement]  We cannot accept your contributions without this form. See [[Contribution_Policy|Contribution Policy]] for more information.


2. Generate a patch with the "-upN" flags set to diff or cvs diff.  Please do not send other kinds of patches unless your reviewer requests them.
2. Generate a patch with the "-upN" flags set to diff or cvs diff.  Please do not send other kinds of patches unless your reviewer requests them.  It is possible to have these flags set as default by moving/adding the '''build/cvsrc''' and/or '''build/quiltrc''' to the respective '''.cvsrc''' and '''.quiltrc''' files in your home directory.


'''''[[Would this step be clearer if it said something like this?]]'''''
Commands for generating a patch are:<pre>
[lustre]$ cvs diff -up > {patchname}.diff
</pre>


[[Generate a patch file showing the differences between your code and the code in the repository by entering:]]
If you have added new files it is also necessary to include the new file into the patch:
<pre>
[lustre]$ cvs diff -upN {path_to_new_file} >> {patchname}.diff
</pre>


[[$ cvs diff -upN FILENAME]]  '''''[[(please fix if not correct)]]'''''
Using the ''-N'' flag for the entire CVS diff will potentially include a number of unrelated files and should be avoided.  After the patch has been created, it should be opened in an editor to verify that it contains all and only the changes you are expecting.


[[Where N designates the number of lines of context to include.]]
3. Find or file a bug corresponding to your contribution at http://bugzilla.lustre.org/ . For more information about Bugzilla, see the [https://bugzilla.lustre.org/page.cgi?id=bug-writing.html Bugzilla - Bug Writing Guidelines] or the [https://bugzilla.lustre.org/docs/html/using.html Bugzilla User Guide].
[[Please do not send other kinds of patches unless your reviewer requests them.]]
 
3. Find or file a bug corresponding to your contribution at http://bugzilla.lustre.org/ . For more information about Bugzilla, see the [https://bugzilla.lustre.org/page.cgi?id=bug-writing.html Bugzilla - Bug Writing Guidelines] or the [https://bugzilla.lustre.org/docs/html/using.html Bugzilla User Guide].


* Provide the patch as an Attachment (click on "Add an Attachment")
* Provide the patch as an Attachment (click on "Add an Attachment")
* Select the "patch" box.
* Select the "patch" box.
* Edit the new attachment. Under "Flags" [[select "Review" -]] '''''[[is this correct?-I don't see this entry in Bugzilla]]''''' and set the flag to a question mark (?).
** If submitting a new bug with a patch attached, follow normal bug submission procedures. The support team will assign the bug and inspections as appropriate.
If working with an Lustre internal engineer (not a new bug), set the Inspection tag to "?" and take the owner of the bug (Assigned to field) - copy and past into field next to "?" the email address of the engineer who owns the bug.
** If working with an Lustre internal engineer, under "Flags" set the '''inspection''' flag to "'''?'''" and copy the email address of the engineer into the adjacent '''Requestee:''' field.
If submitting new bug with patch attached following normal bug submission procedure. Support team will assign bug as appropriate.  
** If you have not been collaborating with someone on the Lustre team and don't know who should review your work, assign the inspection to '''lustre-rmg-team@sun.com'''
* (Still OK) Enter the email address of the person who should review.  If you have not been collaborating with someone and don't know who should review your work, send an email to [mailto:lustre-rmg-team@sun.com lustre-rmg-team@sun.com]
* Click on "commit" to submit the attachment and inspection request.
* Click on "commit" to submit the attachment update.
 
4. One or more reviewers will submit comments regarding your patch. Iterate the patch until you receive inspection approval or the bug is closed.


4. One or more reviewers will submit comments regarding your patch. Iterate the patch until you receive approval or the bug is closed.
5. Testing the patch is also required before it can be committed to CVS.  See [[Testing Lustre Code]] for specific details. If you have completed testing of the patch, including the addition of tests specific to any defect that is found and/or new functionality that has been added, you should set the '''acc-sm_passed_''release''''' flag to "'''+'''" for the branch(es) that passed testing.


5. Once you have approval, commit the patch (or, if you do not have CVS access, the internal engineer assigned to the bug will direct the bug appropriately or land the change). Include the bug number and reviewer in the commit message, along with a concise description of the change.
6. Once you have approval, commit the patch (or, if you do not have CVS write access, the internal  
engineer assigned to the bug will direct the bug appropriately or land the change). Include the bug number and reviewer in the commit message, along with a concise description of the change.  See ''build/cvsdiffclient'' and ''build/cvs-modified-files.pl'' in the lustre source tree for commit template generation.


'''Note:''' This process applies even if you have write access to the CVS tree. If you do not follow these steps, then expect your changes to be backed out of the tree without warning.
'''Note:''' This process applies even if you have write access to the CVS tree. If you do not follow these steps, then expect your changes to be backed out of the tree without warning.

Revision as of 14:45, 3 September 2009

When you are ready to have your patch reviewed, please do so using Bugzilla by following the process described below. It is sometimes also desirable to solicit reviews of patches on the lustre-devel mailing list, which will expose the patch to a much wider audience, but this will not put the patch on the track to being accepted to the Lustre repository.

Submitting Patches for Review

To have your changes accepted into a main-line Lustre branch, your code must be reviewed and approved by senior Lustre engineers. Following these steps will speed up review of your changes and increase the likelihood of success:

1. Read, complete, and return the form found at Contributor Agreement We cannot accept your contributions without this form. See Contribution Policy for more information.

2. Generate a patch with the "-upN" flags set to diff or cvs diff. Please do not send other kinds of patches unless your reviewer requests them. It is possible to have these flags set as default by moving/adding the build/cvsrc and/or build/quiltrc to the respective .cvsrc and .quiltrc files in your home directory.

Commands for generating a patch are:

[lustre]$ cvs diff -up > {patchname}.diff

If you have added new files it is also necessary to include the new file into the patch:

[lustre]$ cvs diff -upN {path_to_new_file} >> {patchname}.diff

Using the -N flag for the entire CVS diff will potentially include a number of unrelated files and should be avoided. After the patch has been created, it should be opened in an editor to verify that it contains all and only the changes you are expecting.

3. Find or file a bug corresponding to your contribution at http://bugzilla.lustre.org/ . For more information about Bugzilla, see the Bugzilla - Bug Writing Guidelines or the Bugzilla User Guide.

  • Provide the patch as an Attachment (click on "Add an Attachment")
  • Select the "patch" box.
    • If submitting a new bug with a patch attached, follow normal bug submission procedures. The support team will assign the bug and inspections as appropriate.
    • If working with an Lustre internal engineer, under "Flags" set the inspection flag to "?" and copy the email address of the engineer into the adjacent Requestee: field.
    • If you have not been collaborating with someone on the Lustre team and don't know who should review your work, assign the inspection to lustre-rmg-team@sun.com
  • Click on "commit" to submit the attachment and inspection request.

4. One or more reviewers will submit comments regarding your patch. Iterate the patch until you receive inspection approval or the bug is closed.

5. Testing the patch is also required before it can be committed to CVS. See Testing Lustre Code for specific details. If you have completed testing of the patch, including the addition of tests specific to any defect that is found and/or new functionality that has been added, you should set the acc-sm_passed_release flag to "+" for the branch(es) that passed testing.

6. Once you have approval, commit the patch (or, if you do not have CVS write access, the internal engineer assigned to the bug will direct the bug appropriately or land the change). Include the bug number and reviewer in the commit message, along with a concise description of the change. See build/cvsdiffclient and build/cvs-modified-files.pl in the lustre source tree for commit template generation.

Note: This process applies even if you have write access to the CVS tree. If you do not follow these steps, then expect your changes to be backed out of the tree without warning.