altinn-studio
altinn-studio copied to clipboard
Update Gitea and LibGit2Sharp
Description
Gitea is now out in version 1.17.1, we are currently on 1.16.9. The new version introduces quite a lot of breaking changes that needs to be verified.
LibGit2Sharp is our library for talking to Gitea from Studio Designer. We are currently on version 0.27.0-preview-0034 while the latest is 0.27.0-preview-0182. Not a big jump if you look at the numbers, but in terms of time we are years behind.
Both of these will require extensive testing before we deploy to production, hence these are pulled out of the normal patching routine.
@alt-how @altinnadmin @tjololo @nkylstad it would be good with some extra eyes on the list of breaking changes to see if there anyone we should be aware of.
Additional Information
The current version of LibGit2Sharp also introduces bugs when running locally on Mac machines forcing Mac developers to upgrade locally.
Tasks
- [ ] Patch Gitea
- [ ] Patch LibGit2Sharp
- [ ] Test
Acceptance Criterias
- [ ] Breaking changes mitigated
- [ ] Stuff works as before ie. no regressions
First thing I think we need to be aware of in the gitea update is this: https://blog.gitea.io/2022/07/gitea-1.17.0-is-released/#-main-as-default-branch-19354httpsgithubcomgo-giteagiteapull19354 I suspect we have some code that assumes master and not main, but I might be mistaken.
Agree. In addition, Changed handling of custom logo might mean we can drop (or should modify) some of our custom templates.
There was a larger long discussion in https://github.com/Altinn/altinn-studio/issues/5406 about to replace LibGit2Sharp with something else. Have you reached a conclusion?
In addition #6874 also discusses LibGit2Sharp and may be influnced by the decision.
@tjololo @RonnyB71 Based on the breaking changes we've identified in Gitea, I'm not very worried, and I would suggest that we should go forward with the Gitea upgrade without "bundling" it with LibGit2Sharp. Otherwise this could become a long-lived issue. Agree? :)
For upgrading LibGit2Sharp I guess we should go though the changes and try to identify things that might cause trouble. This will need a lot of testing, last time we (@acn-sbuad) tried upgrading there were issues, and we had to roll back. We have an existing issue #6874 for this upgrade.
As far as I know we have only identified Dogged as a possible replacement for LibGit2Sharp. It's a thin wrapper around the latest libgit2, making it easy to stay in sync with the underlying native library. @SandGrainOne had a look a while ago, and according to him this is not a trivial rewrite. But I think we need to bite the bullet, the question is when...
Dogged have limited functions for interacting with remote. Primary concern is related to user identity. I wasn't able to find a mechanism where I could provide user information. This was for Pull or Push.
Dogged have limited functions for interacting with remote. Primary concern is related to user identity.
@SandGrainOne Since Dogged is just a thin wrapper around libgit2, and LibGit2Sharp is a not-so-thin wrapper for the same native lib, I find it hard to believe that this should not be possible to solve.
I assume the native libgit2 does not have any «fundamental» limitations.
https://libgit2.org/docs/guides/authentication/
Never claimed it would be impossible, but marshalling isn't something to take lightly. Dogged has done this for a lot of Libgit2, but not all. I might be wrong, but I didn't find the necessary classes when I looked into it.
Both Gitea and LibGit2Sharp has been updated to latest. Closing this issue.