Support for CMF is provided by the RDK Support group.
A new deployment ready branch “rdk-next” has been created with higher standards of test qualification
Deployment ready code
Monthly Iteration releases
Reviewed by component owners
Tested with Reference platforms
A feature contribution should follow after creating an appropriate JIRA project. This will present a clear picture about the architecture, testing details and other information which will be helpful during the acceptance process of the contribution.
A brief summary about what we are trying to contribute
A descriptive information about the contribution should be present so that component developers & architecture team can do assessment of the feature. Below details are desirable if the contribution is a new feature or having an significant impact on the current architecture.
Brief introduction on what the current system lacks & what needs to be done:
1. Individual task/highlighted point #1 brief description.
The following items should be considered/addressed in the documentation for any RDK design initiative JIRA Update Checklist -----------------------
The following JIRA fields MUST be filled in to be considered "Definition Complete":
RDK SoC, RDK OEM - populate these fields for any user story where we have dependency on OEM and/or SoC
OEM/SoC Impact Details - description of impact (or "see Solution Overview" if included in the architecture specification) * Platforms - ensure correct list of devices * Validation - type of testing * Regression - is regression required? * Impacted Party - Comcast Only, Syndication, etc. * Dependency - Internal/External * Description - Solution Overview and Architecture Checklist
------------------------ * Impacted modules * Test process Automated Testing ------------------
* Automation test procedure. Diagnostics, Telemetry and Logging -----------------------------------
Outbound Network Connections ------------------------------
* Does this component make outbound connection requests? * If yes, do the connection requests retry in the case of failure? ** Do the repeated requests use an exponential back-off? ** If a maximum back-off has been defined, is it greater than 10 minutes? Security ----------
* For Security Review - Do feature elements: ** make any changes to network port assignments? ** change iptables rules? ** require credentials, passwords, secret data? ** make any changes to our network connections? ** connect to new services or servers? ** use data input from users or external tools? ** use any cryptographic functions? ** create or disclose proprietary or sensitive Co. or device data? ** properly log operational and configuration changes? ** If possible describe what could happen if feature elements are: *** spoofed? *** tampered with? *** used by an unauthorized actor? ** Advanced questions (optional) *** what happens if a record of actions taken is destroyed? *** what happens if an attacker attempts to DOS with the feature? SI Concerns -------------
* Yes/No/Any Performance expectations -------------------------
Timing consideration ----------------------
* If Any.
In order to contribute code, first-time users are requested to agree to the license at https://wiki.rdkcentral.com/signup.action.
The rdk-next source is hosted at code.rdkcentral.com. Earlier, we were using master source code, now everything is migrated to rdk-next. You can submit your changes for review via that site using the workflow outlined below.
1. Clone the component repository from the Gerrit server https://code.rdkcentral.com/r/ into a local workspace
Clone with commit-msg hook (to add Change-ID footer to commit messages)
Note: The commit-msg hook is installed in the local Git repository and is a prerequisite for Gerrit to accept commits. The inclusion of the unique Change-ID in the commit message allows Gerrit to automatically associate a new version of a change back to its original review.
Note: You may need to configure your Git identity on the cloned repository. The email address that your local Git uses should match the email address listed in Gerrit.
Example commands to run are as follows:
2. Work on the change, commit to local clone
Each commit constitutes a change in Gerrit and must be approved separately. It is recommended to squash several commits into one that represents a change to the project.
If necessary, it is possible to squash a series of commits into a single commit before publishing them, using interactive rebase:
It is important to preserve the Change-Id line when editing and there should only be one "pick" entry at the end of this process. The end result is to submit one change to Gerrit.
3. Push the new change to Gerrit for review
Commits will be BLOCKED if the format of the commit message does not comply with the standard. You will see a warning as to why the commit was blocked.
Mandatory Information in Commit Message
When interfacing with Gerrit you push to a virtual branch /refs/for/<branch>, representing "code review before submission to branch". Gerrit will subsequently assign a unique URL for the change, to facilitate access and review via the web UI.
4. Review notifications and addition of new reviewers
Component owners/reviewers/approvers, defined as specific groups in Gerrit, will be added to the review by default. You may request additional feedback by specifically adding reviewers via the Gerrit web GUI.
5. Scan and build on code submission
BlackDuck, copyright scanning and build jobs will be triggered automatically from CMF Jenkins. The output of these jobs is integrated into the Gerrit voting process via custom labels and will reflect any 'red flag' in a file that has new code changes, whether introduced in the new change/patch-set or not. Scans will post any findings as comments in the Gerrit review. Build jobs also do that, but in addition will upload the build log to the corresponding JIRA ticket (if there is one) as an attachment.
6. Code review and scoring process
Reviewers can comment on and score a given change.
The default set of rules for enabling a code change for submission requires:
The result of the scoring process and validation rules is to enable the Submit action on the Gerrit Web UI and subsequent merge capability to the target branch.
Label: Code Review(Highlighted in yellow color) For a change to be mergeable, the latest patch set must have a '+2' value approval in this category or label, and no '-2 Do not submit'. Thus -2 on any patch set can block a submit, while +2 on the latest patch set enables it for merging.
Labels: Blackduck/Copyright/Component-Build (Highlighted in yellow color) For a change to be mergeable, the change must have a '+1' score on these labels, and no '-1 Fails'. Thus, '-1 Fails' can block a submit, while '+1' enables a submit.
|! Review input is generally referred to as labelling with a positive/negative score.|
7. Submit change
Only authorised users, i.e. component owners, component approvers or admins, can submit the change allowing Gerrit to merge it to the target branch as soon as possible. A change can be submitted, having satisfied the approval conditions described earlier, by clicking the 'Submit Patch Set n' button within the Gerrit UI. When a change has been Submitted, it is automatically merged to the target branch by Gerrit.
8. Abandon change
Depending on the review outcome, it might be decided to abandon the change. The component owner or an authorised user may abandon the change by clicking the "Abandon Change" button. The abandoned changes are not removed from the Gerrit database and can be restored at a later stage.
9. Submitted, Merge Pending
If a change depends on another change that is still in review, it will enter this state. It will be merged automatically by Gerrit once all its dependencies are submitted and merged.
10. Change needs to be reworked
If you need to rework a change, you need to push another commit with the same Change-ID as the original in its commit message.
This is the mechanism Gerrit uses to associate or link the two items. The `--amend` option to the Git commit command prevents a new Change-ID being generated by the commit-msg hook.
The basic steps are outlined below.
First, fetch the change. If you still have the checkout that was used to push the original change, you can skip this step.
where the numbering scheme for fetching the changes is as follows:
refs/changes/<last two digits of change number> <change number> <patch set number>
|! Gerrit will specify this fetch URL via the web UI on the 'Download' link on the review page for the change in question, you just paste it into the command line.|
Next, make any necessary source changes, and do:
A new patch set is now appended to the Gerrit review item, and this will go through the same review process as before.
11. Gerrit merge failure as a result of a conflict
Essentially this means that the remote branch has evolved since this change was started and now software conflicts with changes in the remote branch. The developer must resolve the merge conflicts in their local clone and then push another patch-set.
The process is resumed at step 4, with the important distinction of committing with the --amend option, once the developer pulls the latest changes. Note: A summary of the steps involved, assuming the local branch still exists:
Rebase the local branch to the latest state of origin/<branch>;Resolve all conflicts; Commit with the `--amend` option; Push changes to Gerrit for review. After this change a new patch set is created for the change.
Note: If the local branch no longer exists, the steps are as follows :