Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating existing PRs to "main" branch for openHAB 3 #8512

Closed
kaikreuzer opened this issue Sep 20, 2020 · 19 comments
Closed

Migrating existing PRs to "main" branch for openHAB 3 #8512

kaikreuzer opened this issue Sep 20, 2020 · 19 comments

Comments

@kaikreuzer
Copy link
Member

kaikreuzer commented Sep 20, 2020

Dear contributors,

As it has been announced in our community forum, we have now reached the moment where we move all development efforts away from openHAB 2.x towards openHAB 3.x.

What does this mean for you in detail? A few things:

1. Re-submit existing PRs

We ask you to re-create any existing PR to go against the main branch and not against 2.5.x.
Clearly, the code has to compile against openHAB 3 core bundles - @Hilbrand wrote a very good summary of what this means in detail.

The good news is that you do not have to manually change your code. The bulk work can be done fully automatically and we have set up a Jenkins build plan for this purpose, which is triggered for any PR when the "migrate to OH 3" label is added to it. The build result should include your code readily migrated, so you can download it and create a PR against the main branch from it.

2. Create new PRs against the main branch (first)

New PRs are only accepted against the main branch from now on. If you have a fix for 2.5.x this is very welcome, but the PR should only be created once the PR against main is approved and merged, i.e. anything is first addressed for openHAB 3 and can then be backported to openHAB 2.5.x.

3. Set up an openHAB 3 IDE

Afaik, we are lacking a detailed documentation so far, but the most important thing is to install Java 11 on your development machine. Depending on your preferred IDE, most steps of these instructions should still apply.

4. Resubmit your PRs against the previous master for openHAB 3

We followed the new Github naming guideline and renamed the master branch to main. Unfortunately, all PRs against the previous master branch have disappeared/closed 😞 . So in case you had such an PR, please re-open it against the main branch now - thanks!

5. Make sure to use the openhab-addons and not openhab2-addons repo

As we have shrunk the repo, we keep the history in an archive at openhab2-addons, while the latest code is at openhab-addons. If you have an old checkout of openhab2-addons, which was automatically forwarded to openhab-addons when we renamed the repo a year ago, you will now only see the archive repo. Make sure to do a fresh checkout of the openhab-addons repo.

@mhilbush
Copy link
Contributor

We ask you to re-create any existing PR to go against the main branch and not against 2.5.x

How should I handle my 2.5.x PR for which I have a bunch of uncommitted changes? If at all possible, I'd rather not have to redo all those changes against the new 3.0 master.

@kaikreuzer
Copy link
Member Author

@mhilbush Commit them to your branch and re-add the "migrate to OH3" label - this will trigger the code migration and you can take the result and continue working against OH3 from there.

@wborn
Copy link
Member

wborn commented Oct 6, 2020

Please don't unpin our issues @markus7017.

@kgoderis
Copy link
Contributor

@kaikreuzer Are there any constraints to take in mind when doing it this way, e.g. can 3.x jars run against the 2.5.x runtime [as you know, for now I have to play catch-up with wrt 3.x, am not aware of any breaking changes/evolutions]

@wborn
Copy link
Member

wborn commented Oct 14, 2020

All core API packages were renamed from org.eclipse.smarthome to org.openhab.core so you cannot run OH 3.x code on 2.5.x or vice versa (openhab/openhab-core#1290).

If you want to catch up, also have a look at our board: https://github.com/orgs/openhab/projects/3 . Most major issues/PRs can be found on it.

@J-N-K
Copy link
Member

J-N-K commented Dec 4, 2020

Is this still relevant, @kaikreuzer

@kaikreuzer
Copy link
Member Author

There are still some unported PRs, but this issue is still there and readable, even when it is closed - so let's close it.

@SRGDamia1
Copy link

@mhilbush Commit them to your branch and re-add the "migrate to OH3" label - this will trigger the code migration and you can take the result and continue working against OH3 from there.

I'm sorry, but how do I re-add the label as a non-contributor?

@kaikreuzer
Copy link
Member Author

@SRGDamia1 Simple: Become a contributor 😄! I've just sent you an invite to join the group.

@SRGDamia1
Copy link

@kaikreuzer Thank you!

@SRGDamia1
Copy link

Ouch. Jenkins failed right away for me. It's showing ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

https://ci.openhab.org/job/openHAB-Addons-Migration/116/console attempting to migrate from #7260

@SRGDamia1
Copy link

If I want to make the changes by hand, is there a proper way to merge/rebase/cherry pick commits onto the new shrunken repo?

@kaikreuzer
Copy link
Member Author

@SRGDamia1 Better move that discussion to #7260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants