CI, Repo, and Versioning change proposal for 2024 and beyond #65
Replies: 9 comments 27 replies
-
Re: bots. New bot. 100%. The stuff I've written is very limited in functionality. It's designed to do exactly one thing, so adding release stuff to it would get messy. This is probably a rabbit hole of it's own, but honestly we need either one bot that does everything, or an army of small purpose built bots. I personally lean towards the small purpose built bots, because I think the monolith bot makes everything far more complicated than it needs to be and stifles new features. If we do go the monolith route, imo it needs to be in a language more people actually want to work on. |
Beta Was this translation helpful? Give feedback.
-
I really love the ideas expressed here. For awhile now I have thought that the concept of the fabled “v11” release has (mentally?) held us back in some ways and our current major release cycles drag on forever.
They absolutely can. We already have some actions running on a cron schedule (unstable sdk updates for example). We will have to figure out some of the areas in our releases where dependencies between builds exist (we need the server to build to have an updated openapi spec to build an updated sdk to bundle in web), but I think this is manageable. |
Beta Was this translation helpful? Give feedback.
-
The proposed changes to the release process/API rewrite process is where I have the most thoughts. I'm strongly against the plan for the API rewrite to be a separate repository. As we've seen multiple times before, This is partially unrelated, but there's been some discussions on EF Core in relation to the new API, and I have a few How the API rewrite can happenUltimately, the reason the API rewrite hasn't happened is, in my opinion, because of these two restrictions:
If one of those restrictions are lifted, I think the API rewrite is perfectly doable, in one of two ways: Rewrite the API in partsIf we can break the API in parts, either by treating 10.x as semver 0.x, or releasing consecutive major versions, Once 10.9 is released, immediately start the 11.0 release cycle.The 10.8 release cycle has lasted for over 2 years. I think it's completely possible to do the API rewrite in a |
Beta Was this translation helpful? Give feedback.
-
I have always thought of v11 as the release when we remove the old API. I think that (smaller) performance regressions while both APIs need to coexist is an acceptable tradeoff. I don't think we should break the old API until we're ready to throw it out. This way we can implement the new API piece by piece, field by field, while also not breaking clients with every minor release. Release semver v11 is the release when the old API is disabled. No more, no less. That is the only deciding factor of what constitutes the v11.0.0 release. I'm strongly against switching away from semver, as it is important to signal when things are likely to break (in a big way) for dependents – in our case that is mainly the client API spec, but we should also think of plugins in the future, tho those are more likely to break even with patch releases currently. There is nothing preventing us from following the proposed release cadence with the current semver versioning, except for just deciding to do it. We're, as I see it, currently held back by "this and this and this feature needs to get included in the release – oh, and this one too!". We need to become better at simply "if it ain't good enough for inclusion withing this timeframe, it goes in next release." Handling what is a major vs minor vs patch release is easily done with PR tags, then the version becomes whatever the version needs to be. Here, releasedrafter decided that the version needed to be 1.0.0, due to the python min version bump being tagged with I think the packaging change would be fine, even for people using docker for dev, as they'd just clone the packaging repo (with submodules) and build it that way – we should keep this usecase in mind. With a central packaging repo, we could set up CI to push release whenever we merge a specific PR, or when a release draft is promoted to full release status. TLDR; I think we're over-thinking the versioning, and just holding off on bumping minor for too long, we can do the proposed cadence of every couple of months with the current semver version schema, we just won't bump major version only because most of the earth launched some gunpowder into the air. |
Beta Was this translation helpful? Give feedback.
-
If we are being honest though we have had breaking api changes in every minor and even some patch releases… so we already aren’t complying with semver really |
Beta Was this translation helpful? Give feedback.
-
I like the packaging changes but do have some concerns regarding the proposed move away from semver and release branches. |
Beta Was this translation helpful? Give feedback.
-
I strongly disagree that the packages can't be splitted. In my opinion, every repo should have a The schema on top of my head is: CI builds on every repo Docker and deb images and dispatches another job in the metapackages repo when it's finished. That other jub simply pulls the pushed Docker image (or workflow artifact) and builds the metapackage. In fact, workflows recently improved support for shared artifacts between workflows Back in the day I remember the major blocker was all the NuGet publishing stuff, which I couldn't figure out properly. This time, I'm going to try going more piece by piece, so when all user-packages are in CI I can move the rest with the help of server people. As a side note, I had planned to work on Christmas again in CI, but found out I'm not an owner of sandbox. Can I get those perms given so I can do a PoC without restrictions @joshuaboniface? |
Beta Was this translation helpful? Give feedback.
-
There are a couple additional points that have been on my mind on this topic:
|
Beta Was this translation helpful? Give feedback.
-
OK this is my first main official update. Thank you everyone for the feedback, I have taken as much as possible into account. First, the things that is definitely off the table: non-Semver. That's fine. For everything, else, I've been a busy bee over the last week and a bit building the new CI infrastructure. Sorry @ferferga I just sort of started from scratch :-) The actual building part, including all the combined package builds and GitHub Actions CI is all under here: https://github.com/jellyfin-sandbox/jellyfin-packaging and the README explains most (I'm sure I forgot a few...) of the design decisions I made and a quick "why". I've also created a fresh new repository master VM to send these to, both to avoid messing up the other one and to give a clean slate for the new CI. The next step is a bot I have planned for this, to automate the remaining release drudgery. In short the bot will handle changelog generation, release tagging on the server and web repos, triggering the build CI, and publishing a release blog/forum/reddit(maybe) post and links to Matrix, Discord, and anywhere else we may want. Thus a release will be as simple as I plan to promote/transfer that repo to the main system and shut down the existing server/web CI in a couple weeks (after I complete the bot), and then we can immediately activate the new CI pushing to the new repo server and update everything else to push there as well. This will require some coordination PRs to update CI in various other repos with a planed archive layout that I'm still formulating, but will post here when I do. Part of this will also be the move as I originally proposed to a "weekly" unstable model. "Every-PR" and even, I think, "daily", just moves far too fast for users to keep up with, while weekly provides a great balance between keeping it moving, but also being stable (in a changing sense) enough for people to actually reasonably test with it and report bugs. There's one thing I want to figure out about this (getting the build ID in the UI somehow for bug reporting purposes) but otherwise, this is on track. Once that's all in place, I'll put out a blog post detailing all the changes in prep for 10.9.0 and basically make that the call to start testing with the nightlies for 10.9.0's actual release. I'm planning on us using these "weeklies" as the beta/RCs for 10.9.0. Basically we do a roughly month-long (3-6 "weeklies") feature freeze where it's just bugfixing + translations, and once it seems good, we tag the release. Trying to do "pre-release" tagged versions over-complicates everything, so I don't want to do it; the goal with the weeklies is to be as close as possible to valid "betas" and then just go from there. That is currently the plan I've laid out, so it's what I plan to proceed with. If there are any major objections not covered below, I would like to hear them, but know that most of this is already on-track and not just theoretical. In terms of the implementation of all of this, both @nielsvanvelzen and @thornbill have brought up interesting complications regarding the SDKs they build from server. Bill's is especially cumbersome since it introduces a catch-22 cross dependency between server and web builds. Our proposed solution is building only the weekly "unstable" versions of the Typescript SDK, and once we tag the release, the version it's using is the version for the stable release. ZERO API CHANGES in server for point releases going forward; if we need an API change after that point, it becomes a new major (i.e. 10.10) full stop. I think we're both on board with this; @nielsvanvelzen would something like that work for the other SDK(s)? This whole thing will also enable significantly faster release speed which I know everyone wants. The weeklies will be acting as rolling testing, our triage team is hot on top of the issues, so from that point on, it's really just a matter of "how good does master look? good enough to cut a release? go." for future "major" versions. I think that makes something like quarterly releases totally doable, and maybe even more frequently as time goes on. Over time minor versions will become reserved pretty much only for the most serious bugs or security vulnerabilities that wouldn't justify a major release. That about wraps it up. I'll update my progress on the Bot, the repo switchover, and everything else over the next couple weeks. |
Beta Was this translation helpful? Give feedback.
-
As we draw towards 10.9.0 I do want to resume our CI planning.
While I'm currently seeing no lingering major issues with the current CI (most if not all of the bugs have been worked out), it's still a convoluted mess, so I still see benefits in switching it all over to GH Actions.
First, I want to see if we can recap everything that @ferferga (and K3rnelPanic, but he left the org) did in repo, what works and what doesn't work. I don't know if we ever got the cross-repo stuff working, did we?
Next I want to get a few "realities" out there.
I don't think decoupling server and web versions is going to happen, ever. They're just too dependent on each other. It was a nice idea that's been floated many times, and this was part of why some of the CI works how it does, but really I don't think it's going to happen or be valuable anytime soon and thus my ideas below ignore and in some ways prevent that from happening.
A massive API rewrite isn't really happening. I know everyone wants it, but I just don't see it happening anytime soon at our current pace of development. And if it did, it would really have to be a separate
jellyfin-next
repo that can move at its own pace until its ready.Our current CI continues to "work". Though it's cumbersome, if the consensus is indeed that no one wants to change anything, I think that's still viable. The benefits of an updated system however are that we could speed up releases dramatically.
I don't think Semver is really serving us. Too much stuff takes too long to land in a full release, and our bugfixes break things anyways. So really, why bother much longer?
From those, I've had some showerthoughts about ways to simplify the packaging, but I want to get the dev community's feedback on the proposed changes because some of them majorly affect how testing Jellyfin will work.
Separate all packaging into a single repo. First I don't think there's much benefit to having separate repos for Debian, Fedora, Docker, etc. aside from added confusion. This repo can then use submodules to track release code, which I think is a relatively good solution to keeping everything coordinated and providing the code there.
This is the one that's going to likely be the most controversial. IF we do this, there should be nothing in the main repos that does actual building - they'd be
dotnet publish
/npm build
only to get artifacts. But I think this would simplify the CI/packaging a lot. For instance these repos would not need to track tags or branches the same way as the main repos, they could be a lot more dynamic, and you just tell them to build a version of the code and it does. See below for a more detailed idea of how this particular item would work.Remove "unstable" builds and move towards a nightly or, ideally, weekly unstable build. This will reduce a lot of CI burden and complexity as these can just be timed. The question is if GH Actions can do time-based builds, but we can see.
Moving away from semver "early" (i.e. before 11). At this point I've personally accepted that a massive API rewrite is not going to happen anytime soon (see above). We might be waiting for 11 for another 5 years. I'd like to propose then a move away from semver sooner rather than later; maybe not with 10.9.0 but definitely the next major release. My main reason for wanting this is the massive complexity of how we handle release branches now, and the fact that I don't believe there are any good solutions to this beyond simply ditching semver and making master the only release branch. This will let us move faster and get features, translations, etc. in much quicker while still giving us room for quick bugfix releases if desired.
I don't know for sure what versioning structure we'd use for this necessarily, but coupled with the next point something date-based wouldn't be bad. I do like HomeAssistant's
<Year>.<Month>.<Point>
non-semver versioning scheme personally.With 2 and 3, move towards a "promotion" model for stable releases. By that I mean, we build our weekly unstables. Then, if we find a particular weekly (maybe one every month or two months) is good for general release, we simply "promote" it to a tagged version and rebuild it as a stable release. This gives us both more extensive testing of releases (as anyone using the unstable will have tested it) but also lets us keep moving fast on both features, bugfixes, and translations. If big bugs come up, we just release point versions after that, which would indeed include features as well, but they'd also be promotions after at least a week of testing.
More automation for releases using @mcarlton00's, @sparky8251's, or a new bot, to automate the promotion and release creation stuff.
More details about how #1 will work in my vision:
jellyfin
andjellyfin-web
.jellyfin-packaging
.jellyfin
andjellyfin-web
added as submodules tojellyfin-packaging
.prepare
script injellyfin-packaging
takes a desired version/tag, commit ref, etc. for both repos and automatically checks out the proper versions.jellyfin-packaging
repo has Debian, Fedora, Docker, and standalone (archive) build elements designed to build in the submodules and collect the resulting artifacts together into a single package, without the intervening "combining" aspects we currently do. So a build injellyfin-packaging
for Debian would simply create all of thejellyfin-server
,jellyfin-web
,jellyfin-vue
(eventually), etc. packages in one shot..Anyways feedback definitely requested as this will shape how this moves forward.
Beta Was this translation helpful? Give feedback.
All reactions