1.. _release_process: 2 3Release Process 4############### 5 6The Zephyr project releases on a time-based cycle, rather than a feature-driven 7one. Zephyr releases represent an aggregation of the work of many contributors, 8companies, and individuals from the community. 9 10A time-based release process enables the Zephyr project to provide users with a 11balance of the latest technologies and features and excellent overall quality. A 12roughly 4-month release cycle allows the project to coordinate development of 13the features that have actually been implemented, allowing the project to 14maintain the quality of the overall release without delays because of one or two 15features that are not ready yet. 16 17The Zephyr release model was loosely based on the Linux kernel model: 18 19- Release tagging procedure: 20 21 - linear mode on main branch, 22 - release branches for maintenance after release tagging. 23- Each release period will consist of a development phase followed by a 24 stabilization phase. Release candidates will be tagged during the 25 stabilization phase. During the stabilization phase, only stabilization 26 changes such as bug fixes and documentation will be merged unless granted a 27 special exemption by the Technical Steering Committee. 28 29 - Development phase: all changes are considered and merged, subject to 30 approval from the respective maintainers. 31 - Stabilisation phase: the release manager creates a vN-rc1 tag and the tree 32 enters the stabilization phase 33 - CI sees the tag, builds and runs tests; Test teams analyse the report from the 34 build and test run and give an ACK/NAK to the build 35 - The release owner, with test teams and any other needed input, determines if the 36 release candidate is a go for release 37 - If it is a go for a release, the release owner lays a tag release vN at the 38 same point 39 40.. figure:: release_cycle.svg 41 :align: center 42 :alt: Release Cycle 43 :figclass: align-center 44 :width: 80% 45 46 Release Cycle 47 48.. note:: 49 50 The milestones for the current major version can be found on the 51 `Official GitHub Wiki <https://github.com/zephyrproject-rtos/zephyr/wiki/Release-Management>`_. 52 Information on previous releases can be found :ref:`here <zephyr_release_notes>`. 53 54Development Phase 55***************** 56 57A relatively straightforward discipline is followed with regard to the merging 58of patches for each release. At the beginning of each development cycle, the 59main branch is said to be open for development. At that time, code which is deemed to be 60sufficiently stable (and which is accepted by the maintainers and the wide community) is 61merged into the mainline tree. The bulk of changes for a new development cycle 62(and all of the major changes) will be merged during this time. 63 64The development phase lasts for approximately three months. At the end of this time, 65the release owner will declare that the development phase is over and releases the first 66of the release candidates. For the codebase release which is destined to be 673.1.0, for example, the release which happens at the end of the development phase 68will be called 3.1.0-rc1. The -rc1 release is the signal that the time to merge 69new features has passed, and that the time to stabilize the next release of the 70code base has begun. 71 72Stabilization Phase 73******************* 74 75Over the next weeks and depending on the release milestone, only stabilization, 76cosmetic changes, tests, bug and doc fixes are allowed (See :ref:`table 77<release_milestones>` below). 78 79On occasion, more significant changes and new features will be allowed, but such 80occasions are rare and require a TSC approval and a justification. As a general 81rule, if you miss submitting your code during the development phase for a given 82feature, the best thing to do is to wait for the next development cycle. (An 83occasional exception is made for drivers for previously unsupported hardware; if 84they do not touch any other in-tree code, they cannot cause regressions and 85should be safe to add at any time). 86 87As fixes make their way into the mainline, the patch rate will slow over time. 88The mainline release owner releases new -rc drops once or twice a week; a normal 89series will get up to somewhere between -rc4 and -rc6 before the code base is 90considered to be sufficiently stable and the release criteria have been achieved 91at which point the final 3.1.0 release is made. 92 93At that point, the whole process starts over again. 94 95.. _release_quality_criteria: 96 97Release Criteria 98**************** 99 100The main motivation is to clearly have the criteria in place that must be met 101for a release. This will help define when a release is "done" in terms that most 102people can understand and in ways that help new people to understand the process 103and participate in creating successful releases: 104 105- The release criteria documents all the requirements of our target audience for 106 each Zephyr release 107- The target audiences for each release can be different, and may overlap 108- The criteria at any given time are not set in stone: there may be requirements 109 that have been overlooked, or that are new, and in these cases, the criteria 110 should be expanded to ensure all needs are covered. 111 112Below is the high level criteria to be met for each release: 113 114- No blocker bugs / blocking issues 115- All relevant tests shall pass on ``Tier 0`` platforms 116- All relevant tests shall pass on Tier 0 and 1 platforms (at least 1 per 117 architecture/architecture variant/Hardware features) 118- All applicable samples/tests shall build on Tiers 0, 1 and 2 119- All high and critical static analysis and security issues addressed 120- Release Notes are up-to-date. 121 122Blocker Bugs 123============ 124 125Blocker bug process kicks in during the release process and is in effect after the 126feature freeze milestone. An issue labeled as a blocker practically blocks a 127release from happening. All blocker bugs shall be resolved before a release is 128created. 129 130A fix for a bug that is granted ``blocker`` status can be merged to 'main' and included in 131the release all the way until the final release date. 132 133Bugs of moderate severity and higher that have impact on all users are typically 134the candidates to be promoted to blocker bugs 135 136Contributors and member of the release engineering team shall follow these 137guidelines for release blocker bugs: 138 139- Only mark bugs as blockers if the software (Zephyr) must not be released with 140 the bug present. 141- All collaborators can add or remove blocking labels. 142- Evaluate bugs as potential blockers based on their severity and prevalence. 143- Provide detailed rationale whenever adding or removing a blocking label. 144- Ensure all blockers have the milestone tagged. 145- Release managers have final say on blocking status; contact them with any questions. 146 147 148.. _release_milestones: 149 150Release Milestones 151******************* 152 153 154.. list-table:: Release Milestones 155 :widths: 15 25 100 25 156 :header-rows: 1 157 158 * - Timeline 159 - Checkpoint 160 - Description 161 - Owner 162 * - T-5M 163 - Planning 164 - Finalize dates for release, Assign release owner and agree on project wide goals for this release. 165 - TSC 166 * - T-7W 167 - Review target milestones 168 - Finalize target milestones for features in flight. 169 - Release Engineering 170 * - T-4W 171 - Release Announcement 172 - Release owner announces feature freeze and timeline for release. 173 - Release Manager 174 * - T-3W 175 - Feature Freeze (RC1) 176 - No new features after RC1, ONLY stabilization and cosmetic changes, bug and doc 177 fixes are allowed. New tests for existing features are also allowed. 178 - Release Engineering 179 * - T-2W 180 - 2nd Release Candidate 181 - No new features after RC2, ONLY stabilization and cosmetic changes, bug and doc fixes are allowed. 182 - Release Manager 183 * - T-1W 184 - Hard Freeze (RC3) 185 - Only blocker bug fixes after RC3, documentation and changes to release notes are allowed. 186 Release notes need to be complete by this checkpoint. Release Criteria is 187 met. 188 - Release Manager 189 * - T-0W 190 - Release 191 - 192 - Release Manager 193 194 195Releases 196********* 197 198The following syntax should be used for releases and tags in Git: 199 200- Release [Major].[Minor].[Patch Level] 201- Release Candidate [Major].[Minor].[Patch Level]-rc[RC Number] 202- Tagging: 203 204 - v[Major].[Minor].[Patch Level]-rc[RC Number] 205 - v[Major].[Minor].[Patch Level] 206 - v[Major].[Minor].99 - A tag applied to main branch to signify that work on 207 v[Major].[Minor+1] has started. For example, v1.7.99 will be tagged at the 208 start of v1.8 process. The tag corresponds to 209 VERSION_MAJOR/VERSION_MINOR/PATCHLEVEL macros as defined for a 210 work-in-progress main branch version. Presence of this tag allows generation of 211 sensible output for "git describe" on main branch, as typically used for 212 automated builds and CI tools. 213 214 215.. figure:: release_flow.png 216 :align: center 217 :alt: Releases 218 :figclass: align-center 219 :width: 80% 220 221 Zephyr Code and Releases 222 223.. _release_process_lts: 224 225Long Term Support (LTS) 226======================= 227 228Long-term support releases are designed to be supported and maintained 229for an extended period and are the recommended release for 230products and the auditable branch used for certification. 231 232An LTS release is defined as: 233 234- **Product focused** 235- **Extended Stabilisation period**: Allow for more testing and bug fixing 236- **Stable APIs** 237- **Quality Driven Process** 238- **Long Term**: Maintained for an extended period of time (at least 5 years). 239 240 241Product Focused 242+++++++++++++++ 243 244Zephyr LTS is the recommended release for product makers with an extended 245support and maintenance which includes general stability and bug fixes, 246security fixes. 247 248An LTS includes both mature and new features. API and feature maturity is 249documented and tracked. The footprint and scope of mature and stable APIs expands 250as we move from one LTS to the next giving users access to bleeding edge features 251and new hardware while keeping a stable foundation that evolves over time. 252 253Extended Stabilisation Period 254+++++++++++++++++++++++++++++ 255 256Zephyr LTS development cycle differs from regular releases and has an extended 257stabilization period. Feature freeze of regular releases happens 3-4 weeks 258before the scheduled release date. The stabilization period for LTS is extended 259by 3 weeks with the feature freeze occurring 6-7 weeks before the anticipated 260release date. The time between code freeze and release date is extended in this case. 261 262Stable APIs 263+++++++++++ 264 265Zephyr LTS provides a stable and long-lived foundation for developing 266products. To guarantee stability of the APIs and the implementation of such 267APIs it is required that any release software that makes the core of the OS 268went through the Zephyr API lifecycle and stabilized over at least 2 releases. 269This guarantees that we release many of the highlighted and core features with 270mature and well-established implementations with stable APIs that are 271supported during the lifetime of the release LTS. 272 273- API Freeze (LTS - 2) 274 275 - All stable APIs need to be frozen 2 releases before an LTS. APIs can be extended 276 with additional features, but the core implementation is not modified. This 277 is valid for the following subsystems for example: 278 279 - Device Drivers (i2c.h, spi.h)... 280 - Kernel (k_*): 281 - OS services (logging,debugging, ..) 282 - DTS: API and bindings stability 283 - Kconfig 284 285 - New APIs for experimental features can be added at any time as long as they 286 are standalone and documented as experimental or unstable features/APIs. 287- Feature Freeze (LTS - 1) 288 - No new features or overhaul/restructuring of code covering major LTS features. 289 290 - Kernel + Base OS 291 - Additional advertised LTS features 292 293 - Auxiliary features on top of and/or extending the base OS and advertised LTS features 294 can be added at any time and should be marked as experimental if applicable 295 296Quality Driven Process 297++++++++++++++++++++++ 298 299The Zephyr project follows industry standards and processes with the goal of 300providing a quality oriented releases. This is achieved by providing the 301following products to track progress, integrity and quality of the software 302components provided by the project: 303 304- Compliance with published coding guidelines, style guides and naming 305 conventions and documentation of deviations. 306- Static analysis reports 307 308 - Regular static analysis on the complete tree using available commercial and 309 open-source tools, and documentation of deviations and false positives. 310 311- Documented components and APIS 312- Requirements Catalog 313- Verification Plans 314- Verification Reports 315- Coverage Reports 316- Requirements Traceability Matrix (RTM) 317- SPDX License Reports 318 319Each release is created with the above products to document the quality and the 320state of the software when it was released. 321 322Long Term Support and Maintenance 323++++++++++++++++++++++++++++++++++ 324 325LTS releases are published every 2.5 to 3 years and are branched and maintained independently from 326the main tree for approximately 5 years after they were released. 327 328Support is provided in three main phases: 329 330- **Phase 1 (first 2 years):** General bug fixes and security fixes, including platform and driver 331 fixes. 332- **Phase 2 (following 3+ years):** Security and OS stability fixes only. 333- **Phase 3:** Extended support may be available through third parties (details to be determined). 334 335Support for a given LTS release (LTS *N*) continues until the initial release of the LTS two 336versions ahead (LTS *N+2*). A final release of LTS *N* occurs shortly after the initial release of 337LTS *N+2*. 338 339The list of currently supported LTS releases and their EOL dates can be found 340:ref:`here <supported_releases>`. 341 342.. figure:: lts.svg 343 :align: center 344 :alt: Long Term Support Release 345 :figclass: align-center 346 :width: 80% 347 348 Long Term Support Release 349 350Changes and fixes flow in both directions. However, changes from main branch to an 351LTS branch will be limited to fixes that apply to both branches and for existing 352features only. 353 354All fixes for an LTS branch that apply to the mainline tree shall be submitted to 355mainline tree as well. 356 357Auditable Code Base 358=================== 359 360An auditable code base is to be established from a defined subset of Zephyr OS 361features and will be limited in scope. The LTS, development tree, and the 362auditable code bases shall be kept in sync after the audit branch is created, 363but with a more rigorous process in place for adding new features into the audit 364branch used for certification. 365 366This process will be applied before new features move into the 367auditable code base. 368 369The initial and subsequent certification targets will be decided by the Zephyr project 370governing board. 371 372Processes to achieve selected certification will be determined by the Security and 373Safety Working Groups and coordinated with the TSC. 374 375 376Hardware Support Tiers 377*********************** 378 379Tier 0: Emulation Platforms 380=========================== 381 382- Tests are both built and run in these platforms in CI, and therefore runtime 383 failures can block Pull Requests. 384- Supported by the Zephyr project itself, commitment to fix bugs in releases. 385- One Tier 0 platform is required for each new architecture. 386- Bugs reported against platforms of this tier are to be evaluated and treated as 387 a general bug in Zephyr and should be dealt with the highest priority. 388 389Tier 1: Supported Platforms 390=========================== 391 392- Commitment from a specific team to run tests using twister device 393 testing for the "Zephyr compatibility test suite" (details TBD) 394 on a regular basis using open-source and publicly available drivers. 395- Commitment to fix bugs in time for releases. Not supported by "Zephyr Project" 396 itself. 397- General availability for purchase 398- Bugs reported against platforms of this tier are to be evaluated and treated 399 as a general bug in Zephyr and should be dealt with medium to high priority. 400 401Tier 2: Community Platforms 402=========================== 403 404- Platform implementation is available in upstream, no commitment to testing, 405 may not be generally available. 406- Has a dedicated maintainer who commits to respond to issues / review patches. 407- Bugs reported against platforms of this tier are NOT considered as 408 a general bug in Zephyr. 409 410Tier 3: Deprecated and unsupported Platforms 411============================================ 412 413- Platform implementation is available, but no owner or unresponsive owner. 414- No commitment to support is available. 415- May be removed from upstream if no one works to bring it up to tier 2 or better. 416- Bugs reported against platforms of this tier are NOT considered as 417 a general bug in Zephyr. 418 419 420Release Procedure 421****************** 422 423This section documents the Release manager responsibilities so that it serves as 424a knowledge repository for Release managers. 425 426Release Checklist 427================= 428 429Each release has a GitHub issue associated with it that contains the full 430checklist. After a release is complete, a checklist for the next release is 431created. 432 433Tagging 434======= 435 436The final release and each release candidate shall be tagged using the following 437steps: 438 439.. note:: 440 441 Tagging needs to be done via explicit git commands and not via GitHub's release 442 interface. The GitHub release interface does not generate annotated tags (it 443 generates 'lightweight' tags regardless of release or pre-release). You should 444 also upload your gpg public key to your GitHub account, since the instructions 445 below involve creating signed tags. However, if you do not have a gpg public 446 key you can opt to remove the ``-s`` option from the commands below. 447 448.. tabs:: 449 450 .. tab:: Release Candidate 451 452 .. note:: 453 454 This section uses tagging 1.11.0-rc1 as an example, replace with 455 the appropriate release candidate version. 456 457 #. Update the version variables in the :zephyr_file:`VERSION` file 458 located in the root of the Git repository to match the version for 459 this release candidate. The ``EXTRAVERSION`` variable is used to 460 identify the rc[RC Number] value for this candidate:: 461 462 EXTRAVERSION = rc1 463 464 #. Post a PR with the updated :zephyr_file:`VERSION` file using 465 ``release: Zephyr 1.11.0-rc1`` as the commit subject. Merge 466 the PR after successful CI. 467 468 #. Tag and push the version, using an annotated tag:: 469 470 $ git pull 471 $ git tag -s -m "Zephyr 1.11.0-rc1" v1.11.0-rc1 472 473 #. Verify that the tag has been signed correctly, ``git show`` for the 474 tag must contain a signature (look for the ``BEGIN PGP SIGNATURE`` 475 or ``BEGIN SSH SIGNATURE`` marker in the output):: 476 477 $ git show v1.11.0-rc1 478 479 #. Push the tag:: 480 481 $ git push git@github.com:zephyrproject-rtos/zephyr.git v1.11.0-rc1 482 483 #. Send an email to the mailing lists (``announce`` and ``devel``) 484 with a link to the release 485 486 .. tab:: Final Release 487 488 .. note:: 489 490 This section uses tagging 1.11.0 as an example, replace with the 491 appropriate final release version. 492 493 When all final release criteria has been met and the final release notes 494 have been approved and merged into the repository, the final release version 495 will be set and repository tagged using the following procedure: 496 497 #. Update the version variables in the :zephyr_file:`VERSION` file 498 located in the root of the Git repository. Set ``EXTRAVERSION`` 499 variable to an empty string to indicate final release:: 500 501 EXTRAVERSION = 502 503 #. Post a PR with the updated :zephyr_file:`VERSION` file using 504 ``release: Zephyr 1.11.0`` as the commit subject. Merge 505 the PR after successful CI. 506 #. Tag and push the version, using two annotated tags:: 507 508 $ git pull 509 $ git tag -s -m "Zephyr 1.11.0" v1.11.0 510 511 #. Verify that the tag has been signed correctly, ``git show`` for the 512 tag must contain a signature (look for the ``BEGIN PGP SIGNATURE`` 513 or ``BEGIN SSH SIGNATURE`` marker in the output):: 514 515 $ git show v1.11.0 516 517 #. Push the tag:: 518 519 $ git push git@github.com:zephyrproject-rtos/zephyr.git v1.11.0 520 521 #. Find the new ``v1.11.0`` tag at the top of the releases page and 522 edit the release with the ``Edit tag`` button with the following: 523 524 * Copy the overview of ``docs/releases/release-notes-1.11.rst`` 525 into the release notes textbox and link to the full release notes 526 file on docs.zephyrproject.org. 527 528 #. Send an email to the mailing lists (``announce`` and ``devel``) with a link 529 to the release 530