Skip to content
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

[Git Adapter] Possible rate-limites when using github #1599

Closed
1 task done
bigdiff opened this issue May 9, 2024 · 12 comments · Fixed by #1602
Closed
1 task done

[Git Adapter] Possible rate-limites when using github #1599

bigdiff opened this issue May 9, 2024 · 12 comments · Fixed by #1602
Labels
Projects

Comments

@bigdiff
Copy link
Contributor

bigdiff commented May 9, 2024

Which version of floccus are you using?

5.1.0

Sync method

Git

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Brave Version 1.65.126 Chromium: 124.0.6367.118 (Official Build) (64-bit)

Which version of Nextcloud Bookmarks are you using? (if relevant)

N/A

Which version of Nextcloud? (if relevant)

N/A

What kind of WebDAV server are you using? (if relevant)

N/A

Describe the Bug

Github seems to heavily rate-limit the git adapater, I've setup two profile one for bookmarks and one for open tabs, and it seems there is a 15 minute limit between 2~3 requests.

Expected Behavior

I'm not sure if this is a known thing, IMO it is worth mentioning when adding a git adapter profile.

To Reproduce

Setup at least two profile, make some changes in both profile and notice the "Scheduled" appearing on both profiles for 15 minutes and it retries every so often.

2024-05-09 (git) checkout branch main
2024-05-09 Resource is locked, trying again soon

Debug log provided

  • I have provided a debug log file
@bigdiff bigdiff added the bug label May 9, 2024
@github-actions github-actions bot added this to Backlog in Floccus May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Hello 👋

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and I created floccus and have been maintaining it ever since.
I currently work for Nextcloud which leaves me with less time for side projects like this one
than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue
Cheers 💙

@marcelklehr
Copy link
Member

Hhm, yeah, when the resource is locked, floccus retries every minute :S That doesn't go down well with rate limiting I imagine :/

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

Sadly Floccus just gave up and removed all my folders (bookmarks and open tabs from github)

I now have 6 tags for floccus-locks and the repo is empty with just a readme.

the content of the readme is

This repository is used to syncrhonize bookmarks via [floccus](https://floccus.org/).

all commit history is gone also 🙁 the only commit left is for adding the markdown

@marcelklehr
Copy link
Member

I now have 6 tags for floccus-locks and the repo is empty with just a readme.

Wut?!

@marcelklehr
Copy link
Member

Could you send the log of that sync?

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

the thing is they're multiple so I don't know which one triggered this lol

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

I think I know why now, it initialized a new git repo and it did not detect that there is already a git repo

Starting sync process for account bigdiff@github.com:work/ls-toolbar.xbel
onSyncStart: begin
(git) init
(git) fetch from remote
(git) checkout branch main
Resource is locked, trying again soon

@marcelklehr
Copy link
Member

Yeah, it should only ever do that if the branch cannot be found... I'm gonna take that part out I guess. Can't have floccus bulldoze the entire repo.

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

it should only ever do that if the branch cannot be found...

It was main by default in github and the default is main in floccus so I'm not sure what happened there

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

thank you for the prompt replies and the hot fix 🔥

@bigdiff
Copy link
Contributor Author

bigdiff commented May 9, 2024

Could it be due to the rate-limiting that it failed and "bulldozed" 😀 the repo?

we can keep the try catch in #1602 but instead of initializing a new repo we can put the error into the logger, what do you think?

@marcelklehr
Copy link
Member

we can keep the try catch in #1602 but instead of initializing a new repo we can put the error into the logger, what do you think?

The try-catch is only used to set up a new repo, so if we don't want that, the error will be caught higher up and displayed, no need to log it manually.

Floccus automation moved this from Backlog to Done May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants