Opened 15 months ago
Closed 14 months ago
#2981 closed task (fixed)
Weblate grass project not updating
Reported by: | robe | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Sysadmin Contract 2023-I |
Component: | SysAdmin | Keywords: | |
Cc: | neteler |
Description
It seems even though Grass project is set to use Github Pull Request, it is not doing it.
On closer inspection, looking at https://weblate.osgeo.org/projects/grass-gis/grasslibs/#repository
I see a notice:
On branch main Your branch and 'origin/main' have diverged, and have 11 and 4 different commits each, respectively. (use "git pull" to merge the remote branch into yours) nothing to commit, working tree clean
and
0 pending changes This will commit any pending changes present in Weblate and not in the repository. 11 outgoing commits This will push changes and create a GitHub pull request. 4 missing commits This will update the Weblate repository with the upstream changes.
So the issue is that the local weblate repo and grass repo have diverged for some reason.
Attachments (1)
Change History (28)
follow-up: 4 comment:1 by , 15 months ago
comment:2 by , 15 months ago
I am bummed the author is still showing weblate. Might be I have a mistake or because it had those already committed to it's local git repo, it couldn't change the committer. I'm hoping the latter.
comment:3 by , 15 months ago
the osgeoweblate fork looks updated now - https://github.com/osgeoweblate/grass/tree/weblate-grass-gis-grasslibs
comment:4 by , 15 months ago
Replying to robe:
Now I see this pull request. It might have gotten out of sync because the pull request was done a while ago and hadn't been accepted yet.
https://github.com/OSGeo/grass/pull/3065
@neteler, if this looks okay to you, can you go ahead and accept, and that might just fix it moving forward.
Yeah - seems we didn't know that keeping it open for collecting more translations generates troubles at this end.
I think the way weblate works, it can have only one outstanding pull request and just keeps adding to that one, and may freeze submission if it feels it's original is getting too out of sync.
I see - good to know. I have triggered the CI in the PR 3065 so that it passes for merging. I'll keep an eye on it.
comment:5 by , 15 months ago
Milestone: | Sysadmin Contract 2023-II → Sysadmin Contract 2023-I |
---|---|
Resolution: | → fixed |
Status: | new → closed |
okay will close this out. Feel free to open if you find it's still an issue.
comment:6 by , 15 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
There seems to be a new issue:
Now, updating its repo fails with
Rebasing (1/11) error: could not apply 96fa6b652... Translated using Weblate (Russian) Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue". You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply 96fa6b652... Translated using Weblate (Russian) Auto-merging locale/po/grasslibs_ru.po CONFLICT (content): Merge conflict in locale/po/grasslibs_ru.po (1)
Reported in: https://github.com/OSGeo/grass/pull/3065#issuecomment-1715057905
follow-up: 11 comment:8 by , 15 months ago
Okay setting up the hook as discussed in pull request and you did is the first step. For the remaining issue I went here:
https://weblate.osgeo.org/projects/grass-gis/#repository
and chose "Update with merge without fast-forward". Was the only one I could choose short of getting into the weblate git repo and trying to guess how to merge.
So that created another pull request here - https://github.com/OSGeo/grass/pull/3151
follow-up: 10 comment:9 by , 15 months ago
@robe Thanks! I think that worked. You said "pushes happen on every commit to your repo" in https://github.com/OSGeo/grass/pull/3065#issuecomment-1716446226. Does it mean pushes from GitHub to Weblate, not the other way around?
comment:10 by , 15 months ago
Replying to hcho:
@robe Thanks! I think that worked. You said "pushes happen on every commit to your repo" in https://github.com/OSGeo/grass/pull/3065#issuecomment-1716446226. Does it mean pushes from GitHub to Weblate, not the other way around?
Yes when you make a commit on github, it calls the webhook on weblate which triggers a refresh of weblate's git copy of your repo.
As far as pushing back, I think there is a setting in weblate for that and defaults to something like 24 hrs, though you can tweak that setting. I think that just prevents pushes happening constantly while someone is editing on weblate. It's probably less of a concern when in pull request mode.
I think something might still be wrong, cause I'm seeing missing commit in weblate again, but not sure if that's just cause you haven't merged.
comment:11 by , 15 months ago
Replying to robe:
Okay setting up the hook as discussed in pull request and you did is the first step. For the remaining issue I went here:
https://weblate.osgeo.org/projects/grass-gis/#repository
and chose "Update with merge without fast-forward".
There is still an issue (maybe the third file?). What I see is this:
@robe I am not sure where to find the button or menu entry you mention...
comment:13 by , 15 months ago
I tried rebase push again and it generated another pull request
https://github.com/OSGeo/grass/pull/3154/
Not quite sure what's going on here. The changes do look different but just puzzled why so many changes are stuck
comment:14 by , 15 months ago
I now managed to find the "Update" stuff in Weblate.
This just generated a new PR but it is with 15 commits but empty:
https://github.com/OSGeo/grass/pull/3156/files
Confusing...
comment:15 by , 15 months ago
When I look at the individual files, it shows a diffs though
https://github.com/OSGeo/grass/pull/3156/commits/96fa6b65269767cd9110460f754bc03c68ffdfc0
. So not sure why it's showing 0 for files.
I propose that after this pull request, if this cycle continues, we hit it with a hammer using one of the red buttons
Reset all changes in the Weblate repository Resetting removes all changes in Weblate so that the repository matches upstream. Use when you want to discard changes in Weblate and bring it in sync with upstream repository.
comment:16 by , 14 months ago
Again, all the components of GRASS GIS are blocked.
This repository is not up to date: https://github.com/osgeoweblate/grass/tree/weblate-grass-gis-grasslibs
7 commits behind of https://github.com/OSGeo/grass/
The main problem is conflicts within the Russian translation. Will follow this instructions:
Typical workflow for fixing merge conflicts
Commit all pending changes in Weblate and lock the translation component. (already locked)
wlc commit; wlc lock
Add Weblate exported repository as a remote.
git remote add weblate https://weblate.osgeo.org/git/grass-gis/grasslibs/ git remote update weblate
Merge Weblate changes and resolve any conflicts.
git merge weblate/
Rebase Weblate changes on top of upstream and resolve any conflicts.
git rebase origin/
Push changes into upstream repository.
git push origin
Weblate should now be able to see updated repository and you can unlock it. (can be unlocked in the weblate site)
wlc pull ; wlc unlock
comment:17 by , 14 months ago
mayority of conflicts happen on the header of the po file
<<<<<<< HEAD "PO-Revision-Date: 2023-08-23 07:08+0000\n" ======= "PO-Revision-Date: 2023-06-28 19:08+0000\n" >>>>>>> eeff31d386 (Translated using Weblate (German))
comment:18 by , 14 months ago
While doing the rebase:
git rebase --continue dropping 988f5950a66be361cf941d0e1e51a84125542f4a Translated using Weblate (Russian) -- patch contents already upstream dropping 73a260d053c068002acabaee212dcb71f30bccc8 Translated using Weblate (German) -- patch contents already upstream dropping c679724f004d10b86ab3883f492e633b0adfb884 Translated using Weblate (German) -- patch contents already upstream dropping 9c70f73ac03fb1957b56d96255de6ee851f69be2 Translated using Weblate (German) -- patch contents already upstream
comment:19 by , 14 months ago
The list of instructions I made
git clone https://github.com/OSGeo/grass 2056 git clone --branch main https://github.com/OSGeo/grass 2057 cd grass/ 2058 git remote add weblate https://weblate.osgeo.org/git/grass-gis/grasslibs/ 2059 git remote update weblate 2060 git merge weblate/main 2061 git diff weblate/main 2062 git rebase origin/main # a conflict happened here 2063 git status 2064 vi locale/po/grasslibs_ru.po 2065 git add locale/po/grasslibs_ru.po 2066 git rebase --continue 2067 git status 2068 vi locale/po/grasswxpy_ru.po 2070 git add locale/po/grasswxpy_ru.po 2071 git rebase --continue 2072 git status 2073 vi locale/po/grassmods_ru.po 2074 git add locale/po/grassmods_ru.po 2075 git rebase --continue 2076 git status 2077 vi locale/po/grassmods_ru.po 2078 git add locale/po/grassmods_ru.po 2079 git rebase --continue 2080 git status 2081 vi locale/po/grasslibs_de.po 2082 git add locale/po/grasslibs_de.po 2083 git rebase --continue 2084 git status 2085 vi locale/po/grassmods_de.po 2086 git add locale/po/grassmods_de.po 2087 git rebase --continue 2088 git diff origin/main locale/po/ 2089 git diff origin/main locale/ 2090 git status # could not push, so created a branch for the PR 2093 git push 2094 git switch -c changes-done-trac-2981 2095 git push 2096 git push --set-upstream origin changes-done-trac-2981
comment:20 by , 14 months ago
btw, https://github.com/pgRouting/pgrouting/pull/2511 As you can see here, I don't merge translations that often Because the majority of the commits are because of changes on the original documentation.
And I have a:
Reminder: Do not squash, do a rebase
When squashing the changes I get this kind of problems
comment:21 by , 14 months ago
There are no changes in the Weblate repo for grasslibs, so I think that repo can be reset to the upstream main (OSGeo/grass main). (I have no idea how a normal Weblate update looks like.)
comment:22 by , 14 months ago
Just reset the Weblate repo and unlocked it. https://github.com/OSGeo/grass/pull/3160
comment:25 by , 14 months ago
The fork at https://github.com/osgeoweblate/grass/tree/weblate-grass-gis-grasslibs
reports:
This branch is 1 commit ahead, 25 commits behind OSGeo:main.
Naive question: is that fine?
comment:26 by , 14 months ago
I think so. When I look at the grass repo in weblate.osgeo.org it shows last commit was 4 days ago and that it's up to date with https://github.com/OSGeo/grass/ and that there are no outstanding commits that it needs to push.
I noticed postgis-workshop shows the same thing that it's behind 4 committs - https://github.com/osgeoweblate/postgis-workshops/tree/weblate-postgis-workshop-index
but I'm pretty sure it's up to date. My guess is it only updates the github fork, just before it does a pull request. So any updates you do after, will show the github fork is out of date.
comment:27 by , 14 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Thanks robe and cvvergara, so I'll close this as fixed.
Okay I clicked the update button in weblate here -
Now I see this pull request. It might have gotten out of sync because the pull request was done a while ago and hadn't been accepted yet.
https://github.com/OSGeo/grass/pull/3065
@neteler, if this looks okay to you, can you go ahead and accept, and that might just fix it moving forward.
I think the way weblate works, it can have only one outstanding pull request and just keeps adding to that one, and may freeze submission if it feels it's original is getting too out of sync.