-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Failed to synchronize tags to release in SyncMirror with error: "pushUpdateAddTag: GetTag: Length must be 40:" #19038
Comments
Yet another issue has come up where the logging from SyncMirrors does not provide enough context. This PR adds more context to these logging events. Related go-gitea#19038 Signed-off-by: Andrew Thornton <art27@cantab.net>
You have to tell us what version of Gitea you're reporting from. Assuming you're using 1.16 - you can add a trace logger for the services/mirror as I have previously explained which will add significant amounts of tracing. How to add trace logging for services/mirrorYou can adjust your ini like this: [log]
MODE=console, traceconsole
...
[log.traceconsole]
MODE=console
LEVEL=trace
EXPRESSION=services/mirror Or you can run You can use a file logger too. Look at This is an interesting case. The error is coming from within: gitea/modules/repository/repo.go Lines 293 to 295 in 2448c5a
The error string indicates that the ID it is trying to look for is actually an empty string but that doesn't make any sense at all. I've created another PR to further improve the logging here, but if you add the tracelogger as above we can find out what is special about the repo that is causing this. |
I'm using 1.16.3. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Ignore these. They are nothing to do with your initial report. They are incorrectly being reported as an error when they're normal. PRs to fix them have already been merged and I recently closed a duplicate issue you opened about these. |
We need to find cases where:
Is reported. Not the check-attr false positive. |
Sorry. Wrong post. |
Yet another issue has come up where the logging from SyncMirrors does not provide enough context. This PR adds more context to these logging events. Related #19038 Signed-off-by: Andrew Thornton <art27@cantab.net>
I got this error on run "Garbage-Collection" cron. I will start it again. |
Backport go-gitea#19045 Yet another issue has come up where the logging from SyncMirrors does not provide enough context. This PR adds more context to these logging events. Related go-gitea#19038 Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath I got this
|
Sorry I missed your response. Let's break down the log message
In repo with ID: So... Does that tag exist in that repository? |
@zeripath I don't know. But the error happens during mirror update cron. My local mirror: GutHub repo: https://github.com/triplea-game/triplea/tags?after=2.0.17751 |
What are the results of: git show-ref --tags | grep 2.0.17694 git show-ref --tags -- 2.0.17694 |
|
This is on the gitea repository on the server right? |
I started new mirror and got this:
|
|
Strangely go-gitea#19038 appears to relate to an issue whereby a tag appears to be listed in `git show-ref --tags` but then does not appear when `git show-ref --tags -- short_name` is called. As a solution though I propose to stop the second call as it is unnecessary and only likely to cause problems. Fix go-gitea#19038 Signed-off-by: Andrew Thornton <art27@cantab.net>
Pull and build #19236 and see if the problem still happens. |
The second line there is not right they are not supposed to be the same it should be However, I don't understand what is happening here. The ref is being listed by I dunno. I've got a patch that tries to avoid the second show-ref so I guess we try that? |
I can't do this on my gite instance. Can you check this on https://try.gitea.io/ ? |
wrong copy & paste
|
If I could replicate your issue I would have done so myself and I wouldn't have asked. "I can't do this on my gitea instance" does not make sense. You have already determined that this is a bug of significant importance to you and your workflow. Running a small patch temporarily in order to test if a bug fix works, resolves or helps to explain your problem further cannot therefore break your instance further. Honestly it's like working blindfolded in the dark and it's deeply infuriating - it unnecessarily delays the resolution of your issues and leads to these months long issue threads where I or others attempt to fix the problems that affect you - often unsuccessfully and if the issue is ever fixed it is because someone else has finally managed to replicate or reported the problem in a different way and has tested a bug fix. Having just managed to successfully migrate https://github.com/triplea-game/triplea locally - I can see a number of potential issues with the code - not least that it is repeatedly calling git commands instead of reusing the open cat-files. This may be a cause of fd exhaustion so I guess I will take a look at reducing that and will continue to work on #19236 as an efficiency improvement. However, if you are unwilling to try patches - I am afraid I don't know what to do. PushAddUpdateTag only runs on tags which have been emitted by |
@zeripath I don't want test unofficial release on my private prod instance. This is the main reason.
Hm ... you are developing software or fixes without testing them? In this case you have to add new mirror and check the log. But it's ok. I will check it on other computer. But not today. I need some infos:
|
Yet another issue has come up where the logging from SyncMirrors does not provide enough context. This PR adds more context to these logging events. Related go-gitea#19038 Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath now I can test your fix on other temp instance. But please answer my questions. Thx. |
As I said - I am unable to replicate your problem on my testing machine. I do not know why but the code works for me.
#19236 is the attempted fix PR backported to v1.16. Its branch name is The github ssh url is therefore If you have the gh pr checkout 19235 if you have a clone of the gitea repo you can either add my fork as a remote or use fetch to get the branch. git fetch git@github.com:zeripath/gitea.git backport-19236-v1.16:backport-19236-v1.16
git checkout backport-19236-v1.16
make vendor
TAGS="bindata sqlite sqlite_unlock_notify" make You will need also need Node.js LTS
It is probably best to just get 1.18 |
hm ... I try this. My system is optimized for Java development. It's possible to compile the code with go in docker?
Or you can attach an gitea-1.16.x-linux-amd64 to the ticket? |
My instance for testing hat at the moment problem with
I updated this
|
|
I've managed to hopefully create a docker image at https://eldritchkitty.com/~andrew/backport-19235-v1.16.tar.gz |
I can't reproduce the problem on my 2nd gitea 1.16.5 instance. Strange.
thx. |
…ag (#19235) Strangely #19038 appears to relate to an issue whereby a tag appears to be listed in `git show-ref --tags` but then does not appear when `git show-ref --tags -- short_name` is called. As a solution though I propose to stop the second call as it is unnecessary and only likely to cause problems. I've also noticed that the tags calls are wildly inefficient and aren't using the common cat-files - so these have been added. I've also noticed that the git commit-graph is not being written on mirroring - so I've also added writing this to the migration which should improve mirror rendering somewhat. Fix #19038 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
…ag (go-gitea#19235) Strangely go-gitea#19038 appears to relate to an issue whereby a tag appears to be listed in `git show-ref --tags` but then does not appear when `git show-ref --tags -- short_name` is called. As a solution though I propose to stop the second call as it is unnecessary and only likely to cause problems. I've also noticed that the tags calls are wildly inefficient and aren't using the common cat-files - so these have been added. I've also noticed that the git commit-graph is not being written on mirroring - so I've also added writing this to the migration which should improve mirror rendering somewhat. Fix go-gitea#19038 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
…ag (#19235) (#19236) * Use full output of git show-ref --tags to get tags for PushUpdateAddTag (#19235) Strangely #19038 appears to relate to an issue whereby a tag appears to be listed in `git show-ref --tags` but then does not appear when `git show-ref --tags -- short_name` is called. As a solution though I propose to stop the second call as it is unnecessary and only likely to cause problems. I've also noticed that the tags calls are wildly inefficient and aren't using the common cat-files - so these have been added. I've also noticed that the git commit-graph is not being written on mirroring - so I've also added writing this to the migration which should improve mirror rendering somewhat. Fix #19038 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> * fix rebase relict Co-authored-by: 6543 <6543@obermui.de>
Feature Description
In gitea.log I see sometimes:
But you can't see:
Screenshots
No response
The text was updated successfully, but these errors were encountered: