Skip to content

Commit c928660

Browse files
author
Amanda Butler
authored
Merge pull request #1158 from adbridge/development
Update the workflow sections
2 parents 033f3ed + 1817345 commit c928660

File tree

1 file changed

+101
-51
lines changed

1 file changed

+101
-51
lines changed

docs/reference/contributing/guidelines/workflow.md

Lines changed: 101 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -61,90 +61,131 @@ If commits do not follow the above guidelines, we may request that you modify th
6161

6262
[How We Release Arm Mbed OS](../introduction/how-we-release-arm-mbed-os.html) explains Mbed OS versioning.
6363

64-
## Pull request types
64+
## Pull request template
6565

66-
We consider the following pull request types.
66+
The following template is automatically provided when you raise a pull request against `mbed-os`. The details required depend on the type of pull request you create:
6767

68-
### Fix
68+
### Description (*required*)
6969

70-
A bug fix is a change that fixes a specific defect in the codebase with backward compatibility. These are the highest priority because of the positive effect the change will have on users developing against the same code. A bug fix should be limited to restoring the documented or proven otherwise, originally intended behavior. Every bug fix should contain a test to verify results before and after the pull request. Bug fixes are candidates for patch releases. Large, nontrivial bug fixes approaching the size of refactors run the risk of being considered refactors themselves.
70+
##### Summary of change (*What the change is for and why*)
7171

72-
Release: patch
7372

74-
### Refactor
73+
##### Documentation (*Details of any document updates required*)
7574

76-
A refactor is a contribution that modifies the codebase without fixing a bug or changing the existing behavior. Examples of this are moving functions or variables between translation units, renaming source files or folders, scope modification for nonpublic code, documentation structure changes and test organization changes. There is always the risk that someone depended on the location or name before a refactor; therefore, these are lower in priority than bug fixes and might require detailed justification for the change. Refactors are candidates for feature releases.
7775

78-
Release: feature
76+
----------------------------------------------------------------------------------------------------------------
77+
### Pull request type (*required*)
7978

80-
### Target update
79+
[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
80+
[] Feature update (New feature / Functionality change / New API)
81+
[] Major update (Breaking change E.g. Return code change / API behaviour change)
8182

82-
Updating target implementation (adding a new target or updating already supported target) is a change for a patch release.
83+
----------------------------------------------------------------------------------------------------------------
84+
### Test results (*required*)
8385

84-
A test report for the new target must be part of the pull request. The new target must pass all Mbed OS functional and system validation tests (using `mbed test` command) for the current Mbed OS major release, including all Mbed OS supported toolchains.
86+
[] No Tests required for this change (E.g docs only update)
87+
[] Covered by existing mbed-os tests (Greentea or Unittest)
88+
[] Tests / results supplied as part of this PR
89+
90+
91+
----------------------------------------------------------------------------------------------------------------
92+
### Reviewers (*optional*)
8593

86-
Release: patch
8794

88-
### Functionality change
95+
----------------------------------------------------------------------------------------------------------------
96+
### Release Notes (*required for feature/major PRs*)
8997

90-
A functionality change can be any change in the functionality, including adding a new feature, a new method or a function. Software language does not matter.
9198

92-
A feature contribution contains a new API, capability or behavior. It does not break backward compatibility with existing APIs, capabilities or behaviors. New feature contributions are very welcome in Mbed OS. However, because they add capability to the codebase, a new feature may introduce bugs and a support burden. New features should also come with documentation, support for most targets and comprehensive test coverage. Feature PRs are treated cautiously, and new features require a new minor version for the codebase. Features are candidates for feature releases.
99+
##### Summary of changes
93100

94-
Every pull request changing or adding functionality must contain a "Release notes" section describing the changes to users.
101+
##### Impact of changes
95102

96-
It must contain:
103+
##### Migration actions required
97104

98-
- A brief description of changes introduced, including justification.
99-
- An analysis of effects: components affected and potential consequences for users.
100-
- Migration guidance: actions for updating the current code. Please include code snippets to illustrate before and after the addition or change.
101105

102-
<span class="notes">**Note:** We may use this content in our official release notes.</span>
106+
### Description field
103107

104-
For more details, please see the [pull request template addition for functional changes](#pull-request-template-functional-changes).
108+
There are two parts to the description, both of which are required:
105109

106-
We initially implement new features on separate branches in the Mbed OS repository. Mbed OS maintainers create the new branches by following the naming convention: "feature-" prefix.
110+
- The summary of the pull request clearly states the reason for the PR and what the changes involve.
111+
- The documentation section requires you to state what, if any, documentation changes need to accompany the code changes.
107112

108-
Each feature has a tech lead. This person is responsible for:
113+
### Pull request type
109114

110-
- Rebasing often to track master development.
111-
- Reviewing any addition to the feature branch (approval required by the feature tech lead or another assigned person).
115+
There are three pull request types, and these correspond to the three main categories specified in semantic versioning: patch, feature (minor) and major.
112116

113-
Release: feature
117+
#### Patch update
114118

115-
### Documentation update
119+
This can contain any of the following changes:
116120

117-
Documentation updates include changes to markdown files or Doxygen documentation (comment-only changes).
121+
##### Bug Fix
122+
123+
A bug fix is a change that fixes a specific defect in the codebase with backward compatibility. These are the highest priority because of the positive effect the change will have on users developing against the same code. A bug fix should be limited to restoring the documented or proven otherwise, originally intended behavior. Every bug fix should contain a test to verify results before and after the pull request. Bug fixes are candidates for patch releases. Large, nontrivial bug fixes approaching the size of refactors run the risk of being considered refactors themselves.
124+
125+
##### Refactor
118126

119-
Release: patch
127+
A refactor is a contribution that modifies the codebase without fixing a bug or changing the existing behavior. Examples of this are moving functions or variables between translation units, renaming source files or folders, scope modification for nonpublic code, documentation structure changes and test organization changes. There is always the risk that someone depended on the location or name before a refactor; therefore, these are lower in priority than bug fixes and might require detailed justification for the change. 
120128

121-
### Test update
129+
##### Target update
130+
131+
Updating target implementation (adding a new target or updating already supported target) is a change for a patch release.
132+
133+
A test report for the new target must be part of the pull request. The new target must pass all Mbed OS functional and system validation tests (using `mbed test` command) for the current Mbed OS major release, including all Mbed OS supported toolchains.
134+
135+
##### Documentation update
136+
137+
Documentation updates include changes to markdown files or Doxygen documentation (comment-only changes).
138+
139+
##### Test update
122140

123141
Test updates include updates to a new test unit or test case.
124142

125-
Release: patch
143+
#### Feature update
126144

127-
### Breaking change
145+
This can be any change in the functionality, including adding a new feature, a new method or a function. Software language does not matter.
128146

129-
A breaking change is any change that results in breaking user space. It should have strong justification for us to consider it. Often, such changes can be backward compatible, for example, deprecating the old functionality and introducing the new replacement.
147+
A feature contribution contains a new API, capability or behavior. It does not break backward compatibility with existing APIs, capabilities or behaviors. New feature contributions are very welcome in Mbed OS. However, because they add capability to the codebase, a new feature may introduce bugs and a support burden. New features should also come with documentation, support for most targets and comprehensive test coverage. Feature PRs are treated cautiously, and new features require a new minor version for the codebase. 
130148

131-
A contribution containing a breaking change is the most difficult PR to get merged. Any breaking changes in a codebase can have a large negative impact on any users of the codebase. Breaking changes are always limited to a major version release.
149+
We initially implement new features on separate branches in the Mbed OS repository. Mbed OS maintainers or Mbed OS technical leads may create the new branches by following the naming convention: "feature-" prefix.
132150

133-
Every pull request with breaking change must contain a release notes section called "Release notes" to describe the changes to users.
151+
Each feature has a Mbed OS technical lead. This person is responsible for:
134152

135-
It must contain:
153+
- Rebasing often to track master development.
154+
- Reviewing any addition to the feature branch.
155+
- Approving all feature change pull requests.
136156

137-
- A brief description of changes introduced, including justification description.
138-
- An analysis of effects: components affected, potential consequences for users.
139-
- Migration guidance: actions for updating the current code. Please include code snippets to illustrate before and after the addition or change.
157+
#### Major update
140158

141-
<span class="notes">**Note:** We may use this content in our official release notes.</span>
159+
This is for breaking changes and should be rare. A breaking change is any change that results in breaking user space. It should have strong justification for us to consider it. Often, such changes can be backward compatible, for example, deprecating the old functionality and introducing the new replacement.
142160

143-
Please see the [Pull request template](../contributing/workflow.html#pull-request-template-breaking-changes).
161+
A contribution containing a breaking change is the most difficult PR to get merged. Any breaking changes in a codebase can have a large negative effect on any users of the codebase. Breaking changes are always limited to a major version release.
144162

145163
A project technical lead and the Mbed OS technical lead must approve breaking change pull requests.
146164

147-
Release: major
165+
### Test results
166+
167+
This section is to indicate what test results, if any, are required for the PR. The three options are:
168+
169+
- No tests required for this change (for example, a documentation-only update).
170+
- Changes will be tested by existing `mbed-os` tests (Greentea or Unittest).
171+
- Tests and results will be supplied as part of this PR. For this option, post the tests and test results
172+
below the tick boxes.
173+
174+
### Reviewers
175+
176+
A bot automatically adds reviewers based on the files that are actually changed. However, this section gives you the option to specify additional, specific reviewers. Tag required reviewers here, such as @adbridge, @0xc0170.
177+
178+
### Release Notes
179+
180+
Every pull request changing or adding functionality must fill in the "Release notes" section. This applies to feature and major PRs. For both these types, you must complete the "Summary of changes" section. Provide a brief description of changes introduced, including justification.
181+
182+
For major PRs, it is also compulsory to complete the "Impact of changes" and "Migration actions required".
183+
184+
The impact of changes must contain an analysis of effects: components affected and potential consequences for users.
185+
186+
The migration actions required should describe how to migrate from a previous version of the code being changed to the new version. Please include code snippets to illustrate before and after the addition or change.
187+
188+
The release notes section is automatically pulled into the overall release notes for a feature or major release. This should be considered when you write the entries.
148189

149190
## GitHub pull requests workflow
150191

@@ -166,37 +207,46 @@ All pull requests must be reviewed. The Arm Mbed CI bot determines the most suit
166207

167208
GitHub dismisses a reviewer's status after any change to the pull request commit history (such as adding a new commit or rebasing). Smaller changes, such as documentation edits or rebases on top of latest master, only require additional review by maintainers. Their approval is sufficient because a team assigned as a reviewer already approved the pull request.
168209

169-
Label: `needs: review`
170-
Time: Three days for reviewers to leave feedback after the maintainers add the label.
210+
- Label: `needs: review`.
211+
- Time: Three days for reviewers to leave feedback after the maintainers add the label.
171212

172213
### The Continuous Integration (CI) testing
173214

174215
There are many [CI systems available](../contributing/ci.html) for testing Mbed OS pull requests and braches. Which CI tests we run against a particular pull request depends on the effect that it has on the code base. Irrespective of which CI tests run, Mbed OS has an all-green policy, meaning that all triggered CI jobs must pass before we merge the pull request.
175216

176-
- Label: `needs: CI`
217+
- Label: `needs: CI`.
177218
- Time: One day for CI to complete and report back results.
178219

179220
### Work needed
180221

181222
A pull request in the "work needed" state requires additional work due to failed tests, or rework as a result of the review. If a pull request is in this state, our maintainers request changes from the pull request author.
182223

183-
- Label: `needs: work`
224+
- Label: `needs: work`.
184225
- Time: Three days for the pull request author to action the review comments.
185226

186227
### Ready for integration
187228

188229
Maintainers merge pull requests during the internal gatekeeping meetings that occur three times a week. They can merge straightforward pull requests immediately.
189230

190-
- Label: `Ready for merge`
191-
- Time: Two days
231+
- Label: `Ready for merge`.
232+
- Time: Two days.
192233

193234
### Releases
194235

195236
When we merge a pull request that we will publish in a patch release, we tag it with the specific patch release version. This is the release in which we first publish this pull request. For patch releases, we allow only bug fixes, new targets and enhancements to existing functionality. New features are only published in feature releases.
196237

197-
The release tag has the following format:
238+
The release tag has the format:
239+
240+
*release-version: m.f.p*
241+
242+
Where:
243+
244+
- `m` is the major release.
245+
- `f` is the feature release.
246+
- `p` is the patch release.
198247

199-
*release-version: 5.f.p* - Where `f` is the feature release and `p` the patch release.
248+
From time to time there may be additional suffixes added which could represent a release candidate or
249+
alpha/beta release etc
200250

201251
## Additional labels
202252

0 commit comments

Comments
 (0)