Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Using GitHub App authentication can lead to expiry #648

Closed
jamietanna opened this issue Nov 3, 2022 · 9 comments
Closed

Using GitHub App authentication can lead to expiry #648

jamietanna opened this issue Nov 3, 2022 · 9 comments

Comments

@jamietanna
Copy link

When using Renovate self-hosted, with a GitHub App, we're hitting credentials errors:

 WARN: Bad credentials - aborting (repository={org}/{repo})

In this case, we're using --autodiscover, on a GitHub organisation with ~2000 repos.

GitHub App Authentication expires after 1 hour (source).

It may also be helpful to handle the authentication in Renovate's Action itself, so in the case an error is detected, we can break out and handle this appropriately before re-starting.

@viceice
Copy link
Member

viceice commented Nov 8, 2022

i think this is out of scope for the action.

@jamietanna
Copy link
Author

jamietanna commented Nov 8, 2022

Could it be something we'd be able to bring into Renovate itself? We already know when it's an App (source, another), and would allow handling longer-lived executions.

Or are there any alternatives recommended by the team for splitting out the executions to fit within a time limit / to better parallelise?

@viceice
Copy link
Member

viceice commented Nov 8, 2022

use mend renovate on-premise

https://github.com/mend/renovate-on-prem

it's like the hosted app, but for self-hosting and it supports GitHub App auth.

@jamietanna
Copy link
Author

Oh interesting, thanks! Nice to see it's a free license key too 👏

So I guess for folks using the GitHub Action when self-hosting, the solution is currently to try to avoid the 1 hour expiry, and if that's becoming too difficult, moving to the On-Premises runner?

@viceice
Copy link
Member

viceice commented Nov 8, 2022

yes, the action is for small usage only. for big orgs you should use the free on-prem.

benefits:

  • GitHub App auth
  • webhooks ( so direct checkbox reaction)
  • has an integrated scheduler so all repos are evenly processed.

@jamietanna
Copy link
Author

Great, thanks! Are there any rough guidelines for the size of infrastructure required for this? I.e. for 100 repos, use 4 vCPUs and 2GB RAM?

@rarkins
Copy link
Contributor

rarkins commented Nov 8, 2022

In the production app we use m3.medium VMs which have 1VCPU and 3.75GB RAM. We use them because they also have a 4GB SSD built-in which I assume makes git operations faster but never tested to verify that assumption.

With repository cache enabled, those machines each process 50-100 repos each per hour, depending on how much work is done. e.g. in weekends when there's less open source releases and less commits in repos, it does higher, while on Monday mornings when people have the highest chance of processing PRs, we see more commits and therefore more work to do so less throughput.

We will continue to focus primarily on repository cache as our primary means for optimization. Would love to get your inputs and/or PRs in this area any time you can think of improvements as it seems you're already thinking along these lines.

@jamietanna
Copy link
Author

jamietanna commented Nov 8, 2022

Thanks very much! And to confirm those numbers are based on the hosted Renovate app (GitHub App, Web App)?

@rarkins
Copy link
Contributor

rarkins commented Nov 8, 2022

Yes. I still hope that we can keep driving down the amount of processing required per repo, and therefore increase throughput. We have improved those figures ~50% in 2022 already

@renovatebot renovatebot locked and limited conversation to collaborators Mar 13, 2023
@viceice viceice converted this issue into discussion #707 Mar 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants