You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This procedure details how to fork a new version of the core EDC and migrate the changes of the previous version to that new version.
This procedure was updated for the last time for the 0.7.2 fork.
Keep in mind that any new EDC version comes with novelties and that this procedure may need adjustments.
Work Breakdown
As a general rule, look at the early diffs of the previous forks to see what was added of removed.
In this procedure, we will work with the following repositories
This will hide all the intermediate commits and show only the one that are key to understand the repo's tree structure: tags, branches with author, date, hash.
This procedure uses templates for the version.
It is advised to replace all the template strings with the version that you want to migrate for more clarity
Identify the versions that you migrate
NEXT is the upstream version that you want to fork from. e.g 0.7.2
N1 is 0
N2 is 7
N3 is 2
PREVIOUS is the version that you will copy the fork changes from. e.g. 0.2.1.4
P1 is 0
P2 is 2
P3 is 1
P4 is 4
Replace the placeholders with the correct numbers
sed --in-place 's/N1/0/g; s/N2/7/g; s/N3/2/g; s/P1/0/g; s/P2/2/g; s/P3/1/g; s/P4/4/g' fork.md
Let's fork!
Set up
Each version that needs forking has its own branch in the sovity fork.
Here we have an old fork that we want to get the features from named vP1.P2.P3.x and a new fork named vN1.N2.N3.x into which we want to port the changes made in vP1.P2.P3.x up to vP1.P2.P3.P4
Note: the branch names here are to be seen as references, so they should really be remotes/....
# ... are comments to describe the situation and no part of the output.
remotes/fork/default # the replacement for upstream/main use in the sovity fork
remotes/fork/main # not used in the fork, deplaced by main
remotes/fork/sovity/O12.O3 # the previous fork branch
remotes/upstream/bugfix/N1.N2.N3 # the branch we want to work
... more # and many other branches
git tag -l
The output will vary based on the version that have already been forked. Here is the output where 0.2.1 exists and 0.7.2 will be forked.
# ... are comments to describe the situation and no part of the output.
v0.2.1 # the upstream previously forked version
v0.2.1.2 # v0.2.1.1 is missing because it was never published correctly and was replaced by 0.2.1.2
v0.2.1.3
v0.2.1.4 # the latest sovity fork version of v0.2.1
v0.7.2 # the version we want to fork
... more
Establish the branches
In the fork, find the tag vN1.N2.N3 of the branch that you want to fork from.
Create a new branch sovity/N1.N2.N3 from that tag.
git checkout -b sovity/N1.N2.N3 vN1.N2.N3
Push this branch to the fork. It will be our new main for this fork version.
git push fork sovity/N1.N2.N3:sovity/N1.N2.N3
Checkout a new branch N1.N2.N3-fork-setup on the same commit as sovity/N1.N2.N3.x.
git checkout sovity/N1.N2.N3
git checkout -b N1.N2.N3-fork-setup
In gradle.properties, set the correct branch version: N1.N2.N3.1.
git remote show fork
* remote fork
Fetch URL: git@github.com:sovity/core-edc.git
Push URL: git@github.com:sovity/core-edc.git
HEAD branch: doesntMatter
Remote branches:
sovity/P1.P2.P3 tracked
sovity/N1.N2.N3 tracked
... more
Local branches configured for 'git pull':
sovity/N1.N2.N3 merges with remote sovity/N1.N2.N3
... more
Local refs configured for 'git push':
sovity/N1.N2.N3 pushes to sovity/N1.N2.N3 (up to date)
... more
Update the project
Before editing the code, check that your IDE has the correct editor settings (imports single classes, indents, ...). There is an editorconfig file in the project.
Run the tests locally and check that they all work. If not:
Try to fix the test if it's relevant for the changes that we want to do in the fork.
Consider adding @Disabled on the tests that we will likely not use or that would be hard to fix.
e.g. outdated certificates would be hard to regenerate and fix and could be disabled as long as our fork doesn't touch the parts of the code that use them.
Add a changelog CHANGELOG.md and the docs docs/developer/fork/* from the previous version P1.P2.P3.P4
Remove the previous releases from the CHANGELOG.md and keep the template.
Add a new doc file docs/developer/fork/vN1.N2.N3.X.md
For each of the former change in the CHANGELOG.md
Evaluate whether the change needs to be ported
Reasons for not porting may include
The code that the fork used no longer exist
The change or an equivalent was implemented upstream in a version before or including N1.N2.N3.
The change is no longer desired
...
Port the change if needed
You may try to git cherry-pick the changes from the previous fork one by one and resolve conflicts.
You may try a diff+apply+merge between the commits of the previous fork may be enough to port the change
git apply <(git diff vP1.P2... vP1.P2...)
Document the change in the CHANGELOG.md.
Detail the change in the current documentation docs/developer/fork/vN1.N2.N3.X.md. Check out the previous fork documentation for how to structure the document.
Implement the new changes that apply to this fork.
Make it work in the CI
Find the correct GitHub action.
The EDC, as of 0.7.x, uses actions that are located in a separate repository. That repository is forked.
Because the EDC used the @main version in its CI, it is certain that the scripts that are the current @main ones were not the ones that were originally used for the Eclipse EDC release you're forking, and it is likely that the current scripts will fail, be renamed, have a different behaviour, ...
In a best-effort attempt to restore the CI, we need to pin the versions that were used and maybe update them to work on the current GitHub.
If we pin down the old version, a lot of updates may be needed.
If we pin down the new version, scripts may be missing.
The strategy here is to pin down the latest from main and fix the missing scripts individually and later update them.
The naming scheme for the tagged and updated actions is fork version _ date at which the action was working _ -version
e.g. N1.N2.N3_2025-06-07_1 for the latest main commit.
e.g. N1.N2.N3_2022.03.04_3 for the commit that was used during releasing, 3rd revision. Here the _3 is related to the actionsfork scripts and is independent of the 4th digit in the core-edcfork.
You will need potentially many revisions as you will need to push the tag each time you make a change to let the CI use that version, then retry if it failed.
This was tested to work quite well in version 0.7.2 and is detail below.
For the cases that can't be covered with the best effort approach, a fork strategy is detailed below,
see Lost action
If you need more than 1 branch for a single date, be creative in the name, either use DATE+TIME or DATE+suffix. In any case, that scenario is unlikely to happen.
Finding LATEST and LASTOK
LATEST is the last commit on the mainupstream branch.
Replace LATEST in this file by the date you find. The date part should be enough.
git show --no-patch --format=%ci upstream/main
sed --in-place 's/LATEST/2025-06-07/g' fork.md
LASTOK is optional and will be defined later.
Pin the action versions
Pin the latest version
Create a branch to track the LATESTmain commit from upstream
git checkout upstream/main
git checkout -b pinned/N1.N2.N3_LATEST
Push the branch to the fork
git push fork
Tag the latest commit in the action set with the label core edc fork branch _ today _ 1
git tag N1.N2.N3_LATEST_1 pinned/N1.N2.N3_LATEST
Push that new tag to the sovity core edc github fork
git push fork tag N1.N2.N3_LATEST_1
Change all the action's @main version for the N1.N2.N3_LATEST_1 version
Change all the eclipse-edc/.github for sovity/core-edc-github
New Fork
This procedure details how to fork a new version of the core EDC and migrate the changes of the previous version to that new version.
This procedure was updated for the last time for the 0.7.2 fork.
Keep in mind that any new EDC version comes with novelties and that this procedure may need adjustments.
Work Breakdown
As a general rule, look at the early diffs of the previous forks to see what was added of removed.
In this procedure, we will work with the following repositories
Steps
Bonus
Helpful git commands.
Find the common ancestor
For instance to know from which commit on the main branch a pinned version comes from.
git merge-base A Bfinds the last common commit between the referencesAandB.gitGraph commit commit id: "merge-base(A,B)" tag: "base" branch foo commit commit tag: "B" commit checkout main commit commit tag: "A" commitShow a colored simplified graph
This will hide all the intermediate commits and show only the one that are key to understand the repo's tree structure: tags, branches with author, date, hash.
git log --graph --simplify-by-decoration --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --allInteractive git
https://jonas.github.io/tig/
Configuration
This procedure uses templates for the version.
It is advised to replace all the template strings with the version that you want to migrate for more clarity
NEXTis theupstreamversion that you want to fork from. e.g 0.7.2N1is0N2is7N3is2PREVIOUSis the version that you will copy the fork changes from. e.g. 0.2.1.4P1is0P2is2P3is1P4is4sed --in-place 's/N1/0/g; s/N2/7/g; s/N3/2/g; s/P1/0/g; s/P2/2/g; s/P3/1/g; s/P4/4/g' fork.mdLet's fork!
Set up
Each version that needs forking has its own branch in the sovity fork.
Here we have an old fork that we want to get the features from named
vP1.P2.P3.xand a new fork namedvN1.N2.N3.xinto which we want to port the changes made invP1.P2.P3.xup tovP1.P2.P3.P4Note: the branch names here are to be seen as references, so they should really be
remotes/....--- title: core-edc --- %%{init: { 'logLevel': 'debug', 'gitGraph': {'mainBranchName': 'upstream/main' }} }%% gitGraph commit tag: "v0.0.1" commit tag: "vP1.P2.0" branch upstream/bugfix/P1.P2.P3 checkout upstream/bugfix/P1.P2.P3 commit commit tag: "vP1.P2.P3" branch fork/sovity/P1.P2.P3 commit commit commit tag: "vP1.P2.P3.P4" checkout upstream/bugfix/P1.P2.P3 checkout upstream/main commit commit commit tag: "vN1.N2.0" branch upstream/bugfix/N1.N2.N3 checkout upstream/bugfix/N1.N2.N3 commit tag: "vN1.N2.1" commit tag: "vN1.N2.2" commit tag: "vN1.N2.N3" id: "to fork" branch fork/sovity/N1.N2.N3 commit id: "new fork" commit tag: "vN1.N2.N3.1" checkout upstream/main commit commitImportant
Note: the upstream branch name may vary:
remotes/upstream/release/0.10.0remotes/upstream/bugfix/0.7.2remotes/upstream/v0.6.5Make it work locally
This section describes the steps to prepare the fork and make it run locally.
Setup a repository
forkcore-edcgit clone --origin fork git@github.com:sovity/core-edc.gitgit remote add upstream git@github.com:eclipse-edc/Connector.gitgit fetch --all --tagsSetup example
Your repository now looks like this:
git remote -vgit branch -a# ...are comments to describe the situation and no part of the output.git tag -lThe output will vary based on the version that have already been forked. Here is the output where 0.2.1 exists and 0.7.2 will be forked.
# ...are comments to describe the situation and no part of the output.Establish the branches
vN1.N2.N3of the branch that you want to fork from.sovity/N1.N2.N3from that tag.git checkout -b sovity/N1.N2.N3 vN1.N2.N3mainfor this fork version.git push fork sovity/N1.N2.N3:sovity/N1.N2.N3N1.N2.N3-fork-setupon the same commit assovity/N1.N2.N3.x.git checkout sovity/N1.N2.N3git checkout -b N1.N2.N3-fork-setupgradle.properties, set the correct branch version:N1.N2.N3.1.git remote show forkUpdate the project
editorconfigfile in the project.@Disabledon the tests that we will likely not use or that would be hard to fix.CHANGELOG.mdand the docsdocs/developer/fork/*from the previous versionP1.P2.P3.P4git checkout P1.P2.P3.P4 -- CHANGELOG.md docs/developer/fork/\*CHANGELOG.mdand keep the template.docs/developer/fork/vN1.N2.N3.X.mdCHANGELOG.mdN1.N2.N3.git cherry-pickthe changes from the previous fork one by one and resolve conflicts.git apply <(git diff vP1.P2... vP1.P2...)CHANGELOG.md.docs/developer/fork/vN1.N2.N3.X.md. Check out the previous fork documentation for how to structure the document.Make it work in the CI
Find the correct GitHub action.
The EDC, as of
0.7.x, uses actions that are located in a separate repository. That repository is forked.Because the EDC used the
@mainversion in its CI, it is certain that the scripts that are the current@mainones were not the ones that were originally used for the Eclipse EDC release you're forking, and it is likely that the current scripts will fail, be renamed, have a different behaviour, ...In a best-effort attempt to restore the CI, we need to pin the versions that were used and maybe update them to work on the current GitHub.
If we pin down the old version, a lot of updates may be needed.
If we pin down the new version, scripts may be missing.
The strategy here is to pin down the latest from main and fix the missing scripts individually and later update them.
Set up a repository
forkactionsrepositorygit clone --origin fork git@github.com:sovity/core-edc-github.gitupstreamactionsrepositorygit remote add upstream git@github.com:eclipse-edc/.github.gitgit fetch --all --tagsResult
git remote -vOverview
Here is the example forking scenario.
--- title: actions --- %%{init: { 'logLevel': 'debug', 'gitGraph': {'mainBranchName': 'upstream/main' }} }%% gitGraph commit id: "obsolete" commit commit id: "core-edc fork tag date" tag: "N1.N2.N3_LASTOK_1" branch fork/pinned/N1.N2.N3_LASTOK commit tag: "N1.N2.N3_LASTOK_2" commit tag: "N1.N2.N3_LASTOK_3" checkout upstream/main commit commit commit commit id: "latest" tag: "N1.N2.N3_LATEST_1" branch fork/pinned/N1.N2.N3_LATEST commit tag: "N1.N2.N3_LATEST_2" commit tag: "N1.N2.N3_LATEST_3"LATESTandLASTOKare iso datesYYYY-MM-DDThe naming scheme for the tagged and updated actions is
fork version_date at which the action was working_-versione.g.
N1.N2.N3_2025-06-07_1for the latest main commit.e.g.
N1.N2.N3_2022.03.04_3for the commit that was used during releasing, 3rd revision. Here the_3is related to theactionsforkscripts and is independent of the 4th digit in thecore-edcfork.You will need potentially many revisions as you will need to push the tag each time you make a change to let the CI use that version, then retry if it failed.
This was tested to work quite well in version 0.7.2 and is detail below.
For the cases that can't be covered with the best effort approach, a fork strategy is detailed below,
see Lost action
If you need more than 1 branch for a single date, be creative in the name, either use DATE+TIME or DATE+suffix. In any case, that scenario is unlikely to happen.
Finding LATEST and LASTOK
LATESTis the last commit on themainupstreambranch.LATESTin this file by the date you find. The date part should be enough.git show --no-patch --format=%ci upstream/mainsed --in-place 's/LATEST/2025-06-07/g' fork.mdLASTOKis optional and will be defined later.Pin the action versions
LATESTmaincommit fromupstreamgit checkout upstream/maingit checkout -b pinned/N1.N2.N3_LATESTgit push forkcore edc fork branch_today_1git tag N1.N2.N3_LATEST_1 pinned/N1.N2.N3_LATESTgit push fork tag N1.N2.N3_LATEST_1@mainversion for theN1.N2.N3_LATEST_1versioneclipse-edc/.githubforsovity/core-edc-githubeclipse-edc/.github/.github/workflows/task.yml@mainsovity/core-edc-github/.github/workflows/task.yml@N1.N2.N3_LATEST_1eclipse-edc/.github/(.*)@mainwithsovity/core-edc-github/$1@N1.N2.N3_LATEST_1From here we have:
Adjust the pinned main
pinned/N1.N2.N3-LATESTbranchN1.N2.N3_LATEST_(N+1)in theactionsrepo@N1.N2.N3_LATEST_NtoN1.N2.N3_LATEST_(N+1)Lost action
This part describes how to find where a missing action was and how to make it work again.
LASTOKwhen thecore-edcversion was released either with:git log --oneline --follow -- '.github/actions/THEACTIONNAME'git show --no-patch --format=%ci vN1.N2.N3in thecore-edcrepo. e.g2022-03-04LASTOKwith the date you found.forkactionrepository the commit on the main branch that happened right before the timethe tagged commit in the core EDC was created.
git log --date=iso -n LINES --before="LASTOK"git log --date=iso -n 2 --before="2022-03-04"LINESto show more than 1 line.pinned/P1.P2.P3_LASTOKfrom this older commitP1.P2.P3_LASTOK_1e.g.P1.P2.P2_2022-03-04_1actionsforkgit push fork tag P1.P2.P3_LASTOK_1core-edcforkfrom the pinned latest to that new version.Publishing
0.7.2.x: publishing and promotinggit checkout sovity/0.7.2 -- .github/workflows/verify.yml build.gradle.kts0.2.1.x: publishinggit checkout sovity/0.2.1 -- .github/workflows/publish.yml build.gradle.ktscore-edc's actions.sovity/must be published on theAzureTestinstance.vmust be published on theAzure(non test) instance.v0.2.1/v0.7.2skip.signing=trueto thegradle.propertiessovity/.core-edcfork on asovity/branch and merge it.release.mdon the default branch.sovity/N1.N2.N3with your desired changes, see the patch procedureFinalization