ubiquibot / comment-incentives

0 stars 10 forks source link

Rate limited on permit generation #36

Open gentlementlegen opened 1 month ago

gentlementlegen commented 1 month ago

I am creating this ticket here because it is the module that failed, but this would very likely also happen within https://github.com/ubiquibot/conversation-rewards which itself calls https://github.com/ubiquibot/permit-generation where this take should probably be carried out.

During heavy traffic and when a lot of permits are generated, we hit the RPC endpoints quite often and sometimes reach the call limit and get denied. Example of faulty run here.

Problem is that in the end no permit in generated thus no reward gets dispatched to the users, like here. We should instead retry, or switch endpoints until the generation succeeds. As the GitHub Actions can run for hours, it would be okay to slowly hit the endpoint until it works again. Ideally, switching to another available endpoint is the preferred solution.

rndquu commented 3 days ago

Right now for github API requests the kernel uses installation token, right?

gentlementlegen commented 3 days ago

@rndquu Correct. This issue is related to RPC endpoints not the bot itself sorry if it wasn't clear. Basically, the more we hit RPC endpoints the more chances we have to be denied. Maybe our RPC handler solves that issue.