Jump to: navigation, search

Difference between revisions of "StarlingX/CodeSubmissionGuidelines"

(StarlingX Code Submission Guidelines)
Line 22: Line 22:
 
** During patch re-base, there is chance that patches can be applied by treating the patch line numbers as approximate, rather than a strict requirement, just so long as the before/after context seems to be correct. They require fuzzing during the patch apply, and an .orig files will be created as the consequence of applying patches that are not clean.  
 
** During patch re-base, there is chance that patches can be applied by treating the patch line numbers as approximate, rather than a strict requirement, just so long as the before/after context seems to be correct. They require fuzzing during the patch apply, and an .orig files will be created as the consequence of applying patches that are not clean.  
 
** In StarlingX project, we will not accept fuzzing patches. All patches are required to be re-based cleanly so that no fuzzing and no .orig files are generated.
 
** In StarlingX project, we will not accept fuzzing patches. All patches are required to be re-based cleanly so that no fuzzing and no .orig files are generated.
 +
* Early review and feedback
 +
** If desired changes can be posted for early review.
 +
** Such changes should be marked as WIP in the commit message and given a Workflow -1 by the submitter
 +
** Reviewing code early and often helps catch design and coding errors sooner and shows us following the Four Opens.
 
* Pre-Submission / Pre-Gerrit Testing
 
* Pre-Submission / Pre-Gerrit Testing
 
** At a minimum, make sure the code builds and runs
 
** At a minimum, make sure the code builds and runs

Revision as of 14:33, 24 October 2018

StarlingX Code Submission Guidelines

  • Use Gerrit for StarlingX code reviews
  • Follow the Openstack Git Commit Good Practice here
  • Add the core reviewers for the affected sub-project to the review
    • The core reviewers are listed on each sub-project wiki pages. The list of sub-projects is available here
  • All code changes must be pushed to master first and then cherry-picked to the appropriate release branch as needed
    • Exception: Feature branches used during development
  • Link your code change to a StoryBoard Story or Launchpad Bug
    • For traceability, always link your code change to a story or bug. Gerrit will update the status of the story/bug automatically once the code is merged.
    • Linking to StoryBoard Stories: Specify the story and task ID in the commit message as follows:
    • Linking to Launchpad Bugs: Specify the Bug ID in the commit message as follows:
      • Closes-Bug: $bug_id -- use 'Closes-Bug' if the commit is intended to fully fix and close the bug being referenced.
      • Partial-Bug: $bug_id -- use 'Partial-Bug' if the commit is only a partial fix and more work is needed.
      • Related-Bug: $bug_id -- use 'Related-Bug' if the commit is merely related to the referenced bug.
      • If a fix requires multiple commits, use "Partial-Bug" with only the final commit using "Closes-Bug"
      • Example: https://review.openstack.org/596305
  • Patch rebase
    • During patch re-base, there is chance that patches can be applied by treating the patch line numbers as approximate, rather than a strict requirement, just so long as the before/after context seems to be correct. They require fuzzing during the patch apply, and an .orig files will be created as the consequence of applying patches that are not clean.
    • In StarlingX project, we will not accept fuzzing patches. All patches are required to be re-based cleanly so that no fuzzing and no .orig files are generated.
  • Early review and feedback
    • If desired changes can be posted for early review.
    • Such changes should be marked as WIP in the commit message and given a Workflow -1 by the submitter
    • Reviewing code early and often helps catch design and coding errors sooner and shows us following the Four Opens.
  • Pre-Submission / Pre-Gerrit Testing
    • At a minimum, make sure the code builds and runs
    • Verify basic functional testing on a builtISO (ensure the new code get executed)
    • Include automated unit tests when applicable. As we build out the Zuul infrastructure, those tests will run per merge
    • If needed, consult with the component core reviewers for any required/recommended testing.
    • Code reviewers should ask about testing details as part of the gerrit code inspection.