rfd/0089-merge-webapps.md
@kimlisa, @ravicious, @nklaassenThe version of the web UI and the Teleport are tightly coupled but the repositories were created separate to support both Gravity and Teleport. This introduced complexities when integrating the two projects.
We have to separately clone and build the web UI and commit the webasset changes into the teleport repo whenever we want to represent an update. We also have to maintain multiple build systems and ops procedures for the web UI.
Now that Gravity is no longer a product we develop, moving the web UI repositories into their respective Teleport repo will save us time and confusion.
Both Teleport and Teleport.e repos contain their respective UI counterparts and the build systems correctly build all projects.
The Day to day development experience shouldn't change. The webapps project will continue to be self-contained and only require access to the nodejs and yarn binaries.
To work on the enterprise version of the application the developer will have to check out the enterprise version of Teleport which will bring with it the appropriate UI assets.
Merging these repositories may cause some disruption when multiple developers are working on the same feature across the back and frontend. Using a git worktree to create a worktree of the webapps folder is an elegant way of approaching this issue
To avoid having different processes and build systems depending on the version of teleport, all supported release branches (v10, v11, v12) will have their respective versions of the webapps repository merged.
The Teleport build process will need to be expanded to include nodejs and yarn in order to be able to build the webapp assets and include into the final teleport binaries. We will no longer be committing a compiled version of the webassets into the teleport repository, the UI will need to be compiled from source on the initial build of teleport. A make target will be provided to perform a dockerized build of the webassets for those who don't wish to install node and yarn on their workstation.
At the time of writing, the webapps project sees about 1.5 pull requests per
day into the master branch. The webapps CI jobs take at most 11 minutes to
run. We expect the merging of the two projects to delay the merging of backend
branches by 30m in the event a webapps PR lands while a teleport PR is
running its own CI jobs. This is primarily caused by the length of the CI run
for teleport and as such there are some tasks to improve the performance of
these jobs listed in the Process section below.
The teleport repository now has a merge queue which dramatically reduced the
hand-holding require to sheppard a PR through. The CI tasks have also been
migrated to Github Actions which has reduced the total run time considerably.
Below outlines the process for each repository in the order that the steps need to be taken. All repositories will be prepped for the final archival and merging but the final switch over steps will not be taken until v11 has been released.
The git histories of each branch will be maintained while merging.
install https://github.com/newren/git-filter-repo into path
mkdir teleport-merge
cd teleport-merge
Checkout the v12 branches when doing v12 (v11, etc).
git clone [email protected]:gravitational/teleport.git && \
git clone [email protected]:gravitational/webapps.git && \
git clone [email protected]:gravitational/teleport.e.git && \
git clone [email protected]:gravitational/webapps.e.git
Ensure that you have set your git config user values for all repos.
cd webapps
git filter-repo --to-subdirectory-filter web # --force is required when doing branches
cd ../teleport
git checkout -b <dev>/teleport-merge
git pull ../webapps --no-rebase --allow-unrelated-histories
Create a Pull request into the appropriate Teleport branch and then merge.
cd ../webapps.e
git filter-repo --to-subdirectory-filter web # --force is required when doing branches
cd ../teleport.e
git checkout -b <dev>/teleport-merge
git pull ../webapps.e --no-rebase --allow-unrelated-histories
Create a Pull request into the appropriate Teleport enterprise branch and then merge.
At this point you'll need to make the necessary changes to the repositories build systems to successfully build Teleport.
README.md to indicate that this repository is no longer the
source of truth and instead link to the teleport repo. Due to us needing
to potentially update older releases we are not able to archive the
repository at this time. We can revisit this in 6mo.README.md to indicate that this repository is no longer the
source of truth and instead link to the teleport repo. Due to us needing
topotentially update older releases we are not able to archive the
repository at this time. We can revisit this in 6mo./webassets submodule
packages/webapps.e submodule to point points to
the correct version in the teleport.e/web folder./web path./web path.web projects./web path./web path./web path./web path./web path.web projects./web path./web path.