-
Notifications
You must be signed in to change notification settings - Fork 177
Description
It seems to me that we have two goals which are currently at odds with each other:
- Small PRs
- Stable main branch
It is often the case that a change necessitates additional changes for it to be fully stable. For example, adding the Created timestamp to a new Function required that we have Function migrations to support old versions, to refactor Function initialization to allow for tests to work without the old implementation of .Initialized(), and for the inclusion of the required --language argument to be logically consistent. This is a lot of change for one PR! But by breaking it into smaller pieces and merging them one at a time, the main branch is unstable (at least for a short time).
We can either ignore this issue and say that the only version of func which is expected to be stable is the last tagged release, or we can attempt to keep the main branch stable. I lean toward the latter, because if we assume main is unstable, we can not hotfix bugs and request users "update to the latest main to get the fix"... because main may be unstable.
Alternately, we can discard our goal of having PRs be small, targeted changes and instead expect them to include all changes necessary to make the catalyzing change stable. I'd prefer not to do this, however, because I agree that smaller PRs are best, for reasons discussed ad nauseam elsewhere.
Or finally, we can do a hybrid approach where we do assume main is unstable, but streamline the release process such that creating point releases is quite simple. In the event of a bugfix, we would have to of course verify that main is not unstable and then issue a point release. This is perhaps easiest, but it does present the problem that larger PRs (like the initial example) could perhaps need to be reverted in the event of a critical bug where then "stabilizing" PRs are still WIP.
The solution I would propose to these conflicting goals is to institute the concept of an "unstable" branch which includes changes from recent PRs which may not be entirely completed (read: stable). The library-level equivalent to integration testing, this also allows PRs to see if they also function along side any related PRs and PRs from development toward unrelated goals. This is often called the develop branch. PRs are merged to this branch first, and when the branch is proved stable, it is merged to main and tagged with a release version in the same commit. I believe this discussion is apropos considering our release process is currently a topic of discussion.
Of course this solution is not without its challenges. Chief among these is the tendency for the develop branch to grow without ever being merged to main (released). This should be addressed at a process level. Put simply: An issue is not completed until the fix is in main.
I would love to hear what others think about this situation, and especially if there are better ideas about how it can be solved.