Handling of existing PRs and 2.5.x updates #14698
Replies: 21 comments
-
Maybe a suitable way forward to reduce the maintenance work to a single branch would indeed be a two step approach: Keep this repo as 2.5.x work only, so that none of the existing PRs break and existing users can benefit from the work. |
Beta Was this translation helpful? Give feedback.
-
I think the two step approach makes a lot of sense. The same approach can be done for the zwave/zigbee repos. If we have a good enough migration script it can be applied on those repos and we might also get some working add-ons to test with OH3. :-) We might want to reconsider if we really want 3.0.0 on the master branch for those repos. Contributors might be tempted to submit PRs to them. I have multiple production systems and as soon as OH3 can run DSMR with MQTT I'd run it on my RPi3. |
Beta Was this translation helpful? Give feedback.
-
For me it all comes down with what breaking changes do we expect that will break backward compatibility of OH3 with OH2 relate to addons? There were some between 2.4 and 2.5 but those were not world changing I believe. And I don't mean about the namespace change, because while completely breaks usage I believe it can be very easily scripted. Because if we leave out any breaking changes we can simply develop for 3.0 on master and (semi-) auto git reset/renamespace back to a 2.5 branch or the other way around develop for 2.5.x an (semi-) auto git reset/renamespace to 3.0 branch until 3.0 is released. |
Beta Was this translation helpful? Give feedback.
-
I have one openhab1 addon left (fritzboxtr064) which prevents moving to OH3. I‘m currently developing a next generation binding for that and will probably move after that is at least in a usable state. I think there are some JDK11 enhancements (for optionals e.g.) that are quite useful but not available on JDK8. As soon as we start using them, it‘ll not be possible to run these bundles on OH2, so this would be breaking. Another thing is: we discussed moving some bundles from core to addons (e.g. transport bundles like MQTT). If we do that, this will be breaking, too. I would very much appreciate a decision here, because that needs some serious work. |
Beta Was this translation helpful? Give feedback.
-
With the two step approach we won't be doing any specific add-on changes until 2020Q3. So there will be no active OH3 branch on which we commit. But we could have a OH3 add-ons build that uses the same OH2 branch, applies the migration script and uploads the compiled add-ons to the Maven repo. That way there is a single (OH2) branch and no way to commit OH3 specific changes. When we have an active OH3 branch the contributors can use the same migration script to adapt their PRs from OH2 to OH3. |
Beta Was this translation helpful? Give feedback.
-
Currently I do not plan to move my prod environment to 3.X. I am using one 1.X Action, and three 1.X bindings - fritzboxtr064 is one of them. But I have kind of backup environment which runs on snapshot version all the time and is responsible for some minor tasks in my home. I do not use any 1.x bundle over there. |
Beta Was this translation helpful? Give feedback.
-
I'd definitely want to finish my work on the persistence service migration and those will end up in openhab-addons master.
Imho master should stay 3.0.0 as this way we can keep all normal snapshot/milestone/release build setup as is. |
Beta Was this translation helpful? Give feedback.
-
I think and hope everybody agrees that we want to avoid a situation were people will create some pr's against 3.0 and some against 2.5.x So either we should merge everything on 3.0 or on 2.5.x and provide a synchronization between those branches related to the namespace change. I would not prefer to start a new repo for 3.0. If we want a new repo make it one for 2.5.x for bindings that are not compatible with 3.0.x. We keep the 2.5 branch auto reverse-migrated on the current repo with addons reverse-migrated not being compatible with 3.0 being removed and those addons should be on the 2.5.x repo. And also try to avoid breaking changes in the addons api that would impact all addons. So that doesn't includeapi changes because of completely new functionality for a specific group of api's, like the persistence api would be. Those could be excluded from the reversed-migration to 2.5 and if any current persistence changes would be required they can be made in the separate 2.5.x repo. |
Beta Was this translation helpful? Give feedback.
-
No, sorry, I do not agree. If it weren't possible to merge PRs against two different branches, there is no need for those branches at all.
I would actually claim that we do not need (nor should have) this at all on source code level. Imho, the master branch can start with what is 3.x specific and not have any bindings for the start. If we have a script that can convert 2.5.x code, we could directly apply it in the build and provide "preliminary" 3.x compatible add-ons through this approach. |
Beta Was this translation helpful? Give feedback.
-
As an example, #6678 seems to be a candidate which has to go to the master branch and which won't be needed on 2.5.x (and isn't compatible with it). |
Beta Was this translation helpful? Give feedback.
-
Ok, now that openhab/openhab-core#1294 is merged, I guess we should remove the existing add-ons from master and make the 2.5.x branch the default one for PRs. |
Beta Was this translation helpful? Give feedback.
-
It's probably the best of both worlds where we can still make some progress regarding 3.0 while preventing a lot of porting PRs. It would also be helpful if we inform our contributors about what PRs go to which branch using a sticky issue/forum post/README.md. The Eclipse IDE config may also need an update when most PRs should go to the 2.5.x branch. Maybe we can also use a bot to label PRs that don't go to the default branch? |
Beta Was this translation helpful? Give feedback.
-
Absolutely! As mentioned in https://community.openhab.org/t/openhab-2-5-has-been-released/87716/45, I planned to do so - but I first wanted to come to an agreement on what we should communicate.
Good idea, we might want to change the checked out branch for the moment.
What exactly do you have in mind here? |
Beta Was this translation helpful? Give feedback.
-
AFAIK the GitHub PR list doesn't show the base branch of PRs (unlike GitLab). So maybe we can improve that by using something like pr-branch-labeler to automatically add a "oh3" label to PRs that go to the master? There may be better labelers but I haven't looked into them all. Ideally I'd also like to have a bot to add a comment when someone tries to merge all add-ons into the master. That might happen a lot. But I haven't found one so I guess I'll just create a saved reply for that. 😐 |
Beta Was this translation helpful? Give feedback.
-
Ok, such "oh3" labels could make sense. If anybody wants to look into it, feel free :-) I am not so concerned about seeing too many accidential PRs against master - I have now set the default branch to 2.5.x, so PRs are automatically created against this one and I doubt that many people will manually change that. |
Beta Was this translation helpful? Give feedback.
-
I have created the pinned issue #6702 - if you think this is ok, I will also post it on the forum, once we are back with a 3.0.0 snapshot build. |
Beta Was this translation helpful? Give feedback.
-
It looks OK to me and I also see you synched the missing commits to 2.5.x! 👍 We might also want to go through existing PRs and update the base branch to 2.5.x. |
Beta Was this translation helpful? Give feedback.
-
Yes, might be better than explaining how to do this to every single contributor... |
Beta Was this translation helpful? Give feedback.
-
Changing the base results in a lot of commits :-/ |
Beta Was this translation helpful? Give feedback.
-
That's why I mentioned that an additional rebase is necessary as well. |
Beta Was this translation helpful? Give feedback.
-
FTR: I just updated the branch protection rules for 2.5.x to prevent users from merging (#6850). |
Beta Was this translation helpful? Give feedback.
-
As a follow-up on https://github.com/orgs/openhab/teams/maintainers/discussions/2:
I commented here:
When switching from 1.x to 2.x development, we supported 1.x add-ons for 5 further years (up until now). We cannot say that we switch to 3.x now and completely leave 2.x behind. At least certain updates will have to be provided until 3.x is a full replacement and has a migration path.
We could also think of creating a new repo openhab3-addons and leave this one here in place as openhab2-addons - just as we have a openhab1-addons repo. Then it is up to the contributors to decide, where to contribute updates & fixes to. And it would allow every maintainer to decide, which repo he wants to help on the maintenance.
Beta Was this translation helpful? Give feedback.
All reactions