The following are a few steps for doing Comcast Downstreaming:

1 Incoming changes for component owner review

https://code.rdkcentral.com/r/q/status:open+-owner:stephen.barrett%2540rdkcentral.com+

When a community contribution is submitted to CMF:
First we check that the BD, Copyright and Component Build are all OK.
Then we check that the test procedure is detailed enough for someone in Comcast to perform the tests with expected results. This could be either in the commit-msg or in the JIRA ticket and referenced in the commit-msg.
When the changes fulfils both of them, then we submit the change to review by component owner:

  • If the topic has not been set, then we set it to `comcast-review`, `lnt-review`, `lgi-review`, etc, dependent on the owner of the component.
  • Set the Review-State label to +1 if not set
  • Notify Pradeepta if the component is mastered in Comcast and needs downstreaming later.


2 Component Owner approved the change and downstream to Comcast


https://wiki.rdkcentral.com/display/CMF/Contributions+Pending+Review

When the component owner has approved a change by either voting CR +1 or CR +2.

If CR +1, then vote CR +2. Voting CR +2 .

If a change is CR+2 it will set the Review State to +2 (Downstream Candidate)

2.1 If Review-State is set to +2 by set review state script

Vote the original changeset Review-State +4 (Downstream Pending) and remove the RS +2 and +1 votes.

After the RS is set to +4, and the BD, Copyright, CB are +1 and CR is ++2, then it can be downstreamed to Comcast using the job: https://jenkins.cmf.code.rdkcentral.com/view/SCM/job/scm-downstream/

The `CHANGE` parameter is the Gerrit change number of the original change, and the `START` parameter is the latest sprint in Comcast.

Please check the latest sprint branch in Comcast during the last week of the month, the sprint branch for the next month is usually created in the second last weekend of the month.

Then run the job and successful, the RS label of the original change would be set to +5.

Then the old RS +4 vote can be removed (not mandatory) and any `comcast-review` topic also removed. 

Notify Pradeepta an email about the downstream with the original changeset in CMF and the new changeset in Comcast Gerrit.

Note if the automatic downstream works then a slack notification is sent to the RDKM #cmf-downstreaming channel, it also notifies if it fails.


2.2 Automatic downstream failed due to conflict

If the automatic downstream failed due to a conflict you need to manually downstream the change


git clone <comcast Gerrit url>  --no-tags --single-branch -b <sprint branch> <project>
cd <project>

# cherry-pick the CMF contributon - go to the CMF change in rdkcentral then click on "Download patch - Cherry-Pick - copy the url"
git fetch <cmf change url/ps> && git cherry-pick FETCH_HEAD 


# resolve the conflicts
git add <conflicted files>
git cherry-pick --continue

#hint: After resolving the conflicts, mark them with
#hint: "git add/rm <pathspec>", then run
#hint: "git cherry-pick --continue".
#hint: You can instead skip this commit with "git cherry-pick --skip".
#hint: To abort and get back to the state before "git cherry-pick",
#hint: run "git cherry-pick --abort".

git commit <-- AT THIS STAGE YOU NEED TO MANUALLY CREATE A RDKCOM TICKET

# add the RDKCOM ticket to the commit message

# push the change to the sprint branch
git --no-pager push origin HEAD:refs/for/<sprint branch> 


Example:
git clone https://gerrit.teamccp.com/rdk/rdkb/components/opensource/ccsp/MeshAgent/generic  --no-tags --single-branch -b 24Q3_sprint MeshAgent
cd MeshAgent

# fetch the CMF change/ps - note this is an example only and may not one an actual conflict
git fetch https://code.rdkcentral.com/r/rdkb/components/opensource/ccsp/MeshAgent refs/changes/14/107314/1 && git cherry-pick FETCH_HEAD

# resolve conflict
git add <files>
git commit --amend

# manually create RDKCOM ticket, add to commit message
git --no-pager push origin HEAD:refs/for/24Q3_sprint

# Once change is pushed to Comcast Gerrit you need to MANUALLY add the RDKCOM and Comcast Gerrit Change as comments in the CMF change and MANUALLY set RS to 5
Comcast JIRA: https://ccp.sys.comcast.net/browse/RDKCOM-<xxxx>
Comcast review:  https://gerrit.teamccp.com/<changeNum>


3 Rework required

https://code.rdkcentral.com/r/q/(topic:%22contributor-review%22+status:open)

If a downstreamed change needs reworking for whatever reason, e.g. comment / rejection from component owner in Comcast, test failures in Comcast, etc. Then:

  • The comment / reject reason / test report is communicated back to the contributor as a comment in the changes and also in the JIRA ticket.
  • Set the topic to `contributor-review` if it is not set by the original contributor.
  • Set the Review-State label to -1 or -2.

TIPS

  • Review State can be reset by a new patchset which has new code, in this case you may need to reset RS +1 , it is not reset on a trivial rebase or commit message change
  • If a downstream change is updated post downstream the scm set review state jenkins job will fail, you need to manually set RS+1 and remove and + 5, + 6 etc RS votes
  • No labels