...
- Check the original JBS issue on https://bugs.openjdk.org/
- Carefully check linked issues and whether there are follow-up fixes that need to be brought with the backport. See below how to handle fixes depending on each other.
- If there are relevant issues that prevent a clean backport, consider backporting those first (within reason).
- To avoid others picking up the same issue, you can add a preliminary "Fix request 11u|17u" (see step 6.) comment saying that you work on this. Once you reach step 6.), just edit the comment and add the required information.
- Create the backport commit
- Option 1 - Use the /backport comment command on GitHub:
- Make sure GitHub Actions is enabled for you on the OpenJDK Bots jdk11u-dev repository resp. OpenJDK Bots jdk17u-dev repository.
- Open the link of the original commit in GitHub and issue the /backport command by adding the comment: "
/backport jdk11u-dev" or "/backport jdk17u-dev"
- For a clean backport, the bot will provide you with a branch in his own repository and a link to create a pull request. If the backport needs manual resolving, it will provide you with instructions, similar to option 3.
- Option 2 - Use SKARA CLI tooling:
- Create a branch for your backport, e.g. "
git checkout -b my-backport-branch master
" "git backport --from https://github.com/openjdk/jdk <commit-sha>"
. See the SKARA Wiki for more info.
- If necessary, resolve changes and follow the instructions.
- Create a branch for your backport, e.g. "
- Option 3 - Use plain Git to create the change:
- Create a branch for your backport, e.g. "
git checkout -b my-backport-branch master
" "git fetch --no-tags https://github.com/openjdk/jdk <commit-sha>"
- "
git cherry-pick --no-commit
<commit-sha
>" - If necessary, resolve changes.
- "
git commit -a -m "Backport <commit sha>
"
- Create a branch for your backport, e.g. "
- Option 1 - Use the /backport comment command on GitHub:
- Test the patch
Testing is very important. Your backport is very close to the customer, and there are few safety nets. In comparison, patches for the mainline head release do get a lot more cooking time before seeing broad adoption.
Don't rely on maintainers doing testing should make sure that your new functionality works, but, more important, it must make sure that you do not break anythingfor you! Maintainers are humans too. You should know your patch best and must make sure it works and does not introduce regressions. It should not break other platforms, other GCs etc. Testing of a change with low risk should comprise at least:
- "tier1" tests should be passing pass at all times, use . Use
"make run-test TEST=tier1"
to run. . You should test both debug- and release builds. Don't just test debug, or worse, just release!- If your patch changes platform-dependent code, test your patch on as many of those platforms as you have available. If you cannot test every platform but feel that tests are needed, clearly state so in the PR or in the Fix Request. Maintainers then will strive to fill the testing holes for you.
- "tier2" provides a larger coverage if you have the resources to run it. Use
"make run-test TEST=tier2"
to run - Run tests from the area that the patch affects, use
"make run-test TEST=<path-to-tests>"
to run specific tests - New regression tests that come with the patch should pass
- Enabling GitHub Actions for your personal fork of the jdk11u-dev repository before publishing your branch will provide you with builds and a tier1 test run via GitHub Actions on many platforms. If tests are failing, analyze why they are failing and share this information.
- "tier1" tests should be passing pass at all times, use . Use
- Create a pull request at https://github.com/openjdk/jdk11u-dev | https://github.com/openjdk/jdk17u-dev
- If you have created a backport via Option1, the /backport command, and the backport was clean, you can use the provided link to create a PR
- In all other cases, push the new branch to your fork of https://github.com/openjdk/jdk11u-dev | https://github.com/openjdk/jdk17u-dev
- and open a PR. You can do this in one step via the SKARA command "
git pr create --publish
". If it is a backport, make sure the title of the PR is "Backport <SHA hash of original commit>
" to have the bots correctly recognize your change as a backport.
- If your patch is not a clean backport (labeled as
clean
by the bots), get the change reviewed by some jdk-updates reviewer- Note: the change review is not the approval, which you would get at the next step
- The PR message is automatically posted to the jdk-updates-dev mailing list. You might optionally cc the original mailing list or other OpenJDK mailing lists to get some more attention to your PR by using the
/label
command. In case of a backport state in the PR description what changes were needed and why: the difference against the original patch, motivations for doing things differently, etc... The description is addressed to the reviewers who assess whether the change is correct for the update release.
Code Block title Example PR message collapse true Hi, This is a backport of JDK-8888888: My Hovercraft Is Full Of Eels Original patch does not apply cleanly to 11u, because eels are all different sizes and shapes. Notably, I had to change the com/antioch/holy/Grenade.cpp to avoid API that only exists in 12+. Testing: x86_64 build, affected tests, tier1 Thanks, -Monty
- Request and await approval for the fix (if the issue is not public, go to step 8 first)
...