From 5aae89c2ff0006446c6f4b103b42be228667ae0f Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Thu, 20 Nov 2025 11:19:21 -0300 Subject: [PATCH 1/2] docs: Add Frontend Dependency Freeze ADR And do it under OEP-0010, since it is mostly about releases and release schedules. --- .../oep-0010-proc-openedx-releases.rst | 12 ++++ .../0001-frontend-dependency-freeze.rst | 64 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst diff --git a/oeps/processes/oep-0010-proc-openedx-releases.rst b/oeps/processes/oep-0010-proc-openedx-releases.rst index b05454a9f..a11e8f6a1 100644 --- a/oeps/processes/oep-0010-proc-openedx-releases.rst +++ b/oeps/processes/oep-0010-proc-openedx-releases.rst @@ -179,6 +179,18 @@ is suitable for both development and production environments. .. _Tutor: https://docs.tutor.edly.io/ +Related Decisions +***************** + +The following related decisions modify or enhance this OEP, but have not yet been fully incorporated as updates to this OEP: + +.. toctree:: + :caption: OEP-10 Decisions + :maxdepth: 1 + :glob: + + oep-0010/decisions/* + Change History ************** diff --git a/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst b/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst new file mode 100644 index 000000000..7a3b22672 --- /dev/null +++ b/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst @@ -0,0 +1,64 @@ +.. _Frontend Dependency Freeze: + +0001. Frontend Dependency Freeze +################################ + +Status +****** + +**Accepted** + +Context +******* + +:ref:`OEP-65 ` was written in an attempt to identify and mitigate some of the issues stemming from the siloed development of frontend apps. Many of these issues are caused by apps using multiple versions of the same dependencies, resulting in reduced consistency, maintainability, user experience (UX) and developer experience (DX). While the frontend-base project creates a mechanism that can be used to standardize and deduplicate these dependencies, it does not force developers to do so. We must decide on a pattern that establishes how dependency upgrades happen, in such a way that maximizes consistency, maintainability, UX, and DX. + +Decision +******** + +A new release development milestone is hereby established, dubbed the "Frontend Dependency Freeze". It is fixed at eight weeks prior to cutoff milestone, at which point a decision is published by the `Frontend Working Group`_ regarding what feature level of the following fundamental libraries, as represented by either a specific major or specific minor `semantic version`_ of the corresponding NPM packages, will be used by all frontend repositories that are part of the subsequent Open edX release: + +- Node.js +- Webpack +- React +- React Router +- React Query +- Paragon +- Frontend Base +- Frontend Build, Platform, and Plugin Framework (for apps not yet built on Frontend Base) + +(This list may be modified in the future to reflect changes in the technology stack, such as those stemming from changes to :ref:`OEP-67 ` or the introduction or removal of an Open edX library.) + +The decision will be posted in the appropriate public channels, so that by the time of the cutoff, all aforementioned repositories' main branches must be using the corresponding versions. + +.. _Frontend Working Group: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3090056949/Frontend+Working+Group +.. _semantic version: https://docs.npmjs.com/about-semantic-versioning + +Consequences +************ + +Once the Dependency Freeze is announced, frontend maintainers must abide by it for the duration of a given release cycle. Speficically, this means that on all main branches, corresponding dependencies should not be bumped beyond the defined versions from the moment of the announcement until immediately after the cutoff. And on release branches, the same applies for the life of the branch. This constraint will not only give developers, testers, and ultimately, users, a firmer base to work off from, but also a more consistent one both visually and under the hood. + +Patch version updates are not foreseen to be problematic, as in a frontend-base paradigm the dependency versions this ADR concerns itself with will be configured with a ``^`` (caret) prefix as ``peerDependencies`` in all relevant ``package.json`` files. In practice, this means that whenever a new non-major (i.e., non-breaking) version of a library is published, it ends up being used automatically by all apps at build time as a result of NPM's deduplication algorithm. In other words, there's no need to issue a PR to every single ``package.json`` just because a bug was fixed in Paragon. + +However, making explicit minor version bumps in frozen dependencies - even ones that would be pulled in automatically anyway - is still discouraged. For instance, an app adding a feature after the freeze that requires a new Paragon component - one that by definition must also have been added after said freeze - is a clear indication of a failure in the additional planning the new milestone affords. In other words, the right time to coordinate development of new features is *before* the freeze: it's the main reason it's being added in the first place! + +Which brings us to the major foreseen cost associated with this change: an increased need for coordination across repositories during a release's development cycle. Frontend maintainers, as part of the Frontend Working Group, need to not only agree on what versions to target, but also, in the case of first-party codebases such as Paragon and Frontend Base, which features to develop and make available for a particular release. This will need to happen continuously, as the eight weeks before cutoff are intended to be used to bring stragglers up to speed, rather than encompass full development cycles. In other words, development of new frontend applications targeting a particular release should not wait to start until after the Dependency Freeze; the team should consult with the Frontend Working Group as to which versions are expected to be frozen, and based development on those. + +Rejected Alternatives +********************* + +The major rejected alternative is the complete absence of a stable set of major frontend dependencies for upcoming releases, which is what we have prior to acceptance of this ADR, with all the cons established in the Context section above. + +Otherwise, we reject a smaller set of frozen dependencies. The proposed list is considered to be the smallest one that still achieves the goals of consistency, maintainability, UX, and DX. Notably, not freezing Paragon can lead to significant UX consistency issues, and the freezing of Frontend Base is a fundamental technical requirement for all apps built on it - not to mention the benefits we get from de-duplication. The latter, in turn, necessitates the freezing of the other dependencies such as React itself, which doesn't support having multiple versions running on the same web page. + +We also reject a larger, more prescriptive set of dependencies. While more may eventually be added to the list, developers are, in principle, free to add other requirements to individual package.json files, even if different apps end up using different versions of the same dependency. + +Change History +************** + +2025-11-20 +########## + +* Document created +* `Pull request #753 `_ From 6da649e32e2691f0b8408b76626298d0138c4ce6 Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Wed, 21 Jan 2026 12:13:46 -0300 Subject: [PATCH 2/2] fixup! docs: Add Frontend Dependency Freeze ADR --- .../0001-frontend-dependency-freeze.rst | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst b/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst index 7a3b22672..6fee3a33b 100644 --- a/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst +++ b/oeps/processes/oep-0010/decisions/0001-frontend-dependency-freeze.rst @@ -11,35 +11,59 @@ Status Context ******* -:ref:`OEP-65 ` was written in an attempt to identify and mitigate some of the issues stemming from the siloed development of frontend apps. Many of these issues are caused by apps using multiple versions of the same dependencies, resulting in reduced consistency, maintainability, user experience (UX) and developer experience (DX). While the frontend-base project creates a mechanism that can be used to standardize and deduplicate these dependencies, it does not force developers to do so. We must decide on a pattern that establishes how dependency upgrades happen, in such a way that maximizes consistency, maintainability, UX, and DX. +:ref:`OEP-65 ` was written in an attempt to identify and mitigate some of the issues stemming from the siloed development of frontend apps. Many of these issues are caused by apps using multiple versions of the same dependencies, resulting in reduced consistency, maintainability, user experience (UX) and developer experience (DX). While frontend-base provides a technical framework to deduplicate these dependencies, it does not make it impossible to configure a site with some duplicate dependencies. We must decide on a pattern that establishes how dependency upgrades happen, in such a way that maximizes consistency, maintainability, UX, and DX. Decision ******** A new release development milestone is hereby established, dubbed the "Frontend Dependency Freeze". It is fixed at eight weeks prior to cutoff milestone, at which point a decision is published by the `Frontend Working Group`_ regarding what feature level of the following fundamental libraries, as represented by either a specific major or specific minor `semantic version`_ of the corresponding NPM packages, will be used by all frontend repositories that are part of the subsequent Open edX release: -- Node.js -- Webpack -- React -- React Router -- React Query -- Paragon -- Frontend Base -- Frontend Build, Platform, and Plugin Framework (for apps not yet built on Frontend Base) +.. _Frontend Working Group: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3090056949/Frontend+Working+Group +.. _semantic version: https://docs.npmjs.com/about-semantic-versioning + +- `Node.js`_ (through `.nvmrc`_) +- `Webpack`_ +- `React`_ +- `React Router`_ +- `React Query`_ +- `Paragon`_ +- `Frontend Base`_ +- `Frontend Build`_, `Frontend Platform`_, and `Frontend Plugin Framework`_ (for apps not yet built on Frontend Base) + +.. _Node.js: https://nodejs.org/en/download +.. _.nvmrc: https://github.com/nvm-sh/nvm +.. _Webpack: https://www.npmjs.com/package/webpack +.. _React: https://www.npmjs.com/package/react +.. _React Router: https://www.npmjs.com/package/react-router +.. _React Query: https://www.npmjs.com/package/@tanstack/react-query +.. _Paragon: https://github.com/openedx/paragon +.. _Frontend Base: https://github.com/openedx/frontend-base +.. _Frontend Build: https://github.com/openedx/frontend-build +.. _Frontend Platform: https://github.com/openedx/frontend-platform +.. _Frontend Plugin Framework: https://github.com/openedx/frontend-plugin-framework (This list may be modified in the future to reflect changes in the technology stack, such as those stemming from changes to :ref:`OEP-67 ` or the introduction or removal of an Open edX library.) -The decision will be posted in the appropriate public channels, so that by the time of the cutoff, all aforementioned repositories' main branches must be using the corresponding versions. +The decision will be posted in the appropriate public channels, including creating corresponding issues in all repositories that need to be in sync, so that by the time of the cutoff all aforementioned repositories' main branches must be using the corresponding versions. -.. _Frontend Working Group: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3090056949/Frontend+Working+Group -.. _semantic version: https://docs.npmjs.com/about-semantic-versioning +The dependency versions this ADR concerns itself with will be configured with a ``^`` (caret) prefix as ``peerDependencies`` in all relevant ``package.json`` files. Only a major version needs to be specified. For example:: + + ... + "peerDependencies": { + "@openedx/frontend-base": "^1", + "@openedx/paragon": "^23", + "@tanstack/react-query": "^5", + "@types/react": "^18", + "react": "^18", + "react-router": "^6", + } Consequences ************ Once the Dependency Freeze is announced, frontend maintainers must abide by it for the duration of a given release cycle. Speficically, this means that on all main branches, corresponding dependencies should not be bumped beyond the defined versions from the moment of the announcement until immediately after the cutoff. And on release branches, the same applies for the life of the branch. This constraint will not only give developers, testers, and ultimately, users, a firmer base to work off from, but also a more consistent one both visually and under the hood. -Patch version updates are not foreseen to be problematic, as in a frontend-base paradigm the dependency versions this ADR concerns itself with will be configured with a ``^`` (caret) prefix as ``peerDependencies`` in all relevant ``package.json`` files. In practice, this means that whenever a new non-major (i.e., non-breaking) version of a library is published, it ends up being used automatically by all apps at build time as a result of NPM's deduplication algorithm. In other words, there's no need to issue a PR to every single ``package.json`` just because a bug was fixed in Paragon. +Minor and patch version updates are not foreseen to be problematic, as dependency versions will be configured with a caret prefix. This means that whenever a new compatible version of a library is published, it ends up being used automatically by all apps at build time as a result of NPM's deduplication algorithm. In other words, there's no need to issue a PR to every single ``package.json`` just because a bug was fixed in Paragon. However, making explicit minor version bumps in frozen dependencies - even ones that would be pulled in automatically anyway - is still discouraged. For instance, an app adding a feature after the freeze that requires a new Paragon component - one that by definition must also have been added after said freeze - is a clear indication of a failure in the additional planning the new milestone affords. In other words, the right time to coordinate development of new features is *before* the freeze: it's the main reason it's being added in the first place!