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

Change GitHub clone URL implementation #5266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nathanthorpe
Copy link
Contributor

We've come across an issue where the 60 requests per hour rate limit causes the workflow to error out. It stems from having to lookup the Clone URL via the API.

I propose that the Clone URL be hardcoded so that we don't need to call the GitHub API.

Alternatively, I could put it under try / catch for the RateLimitExceeded exception

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit cc1c22d
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/66d10330b2201d0008195831

Map response = invokeAndParseResponse( getEndpointUrl() )

def result = response.get('clone_url')
if( !result )
throw new IllegalStateException("Missing clone URL for: $project")

return result
return "${config.server}/${project}.git"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the method invokeAndParseResponse is annotated with @memoized it should be invoked only once.

@Memoized
protected Map invokeAndParseResponse( String request ) {

Not sure why this is happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only happens when there are many concurrent nextflow runs.

It is being performed in AWS Batch, so it doesn't have the opportunity to use the cache.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understand. However I believe this would solve much because in case other API calls will be made to access the config file, cloning the repo, etc.

Is this not happening because the GitHub API token is not specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right ok, didn't realize the config file was read that way.

Cloning the repo luckily doesn't use the rate quota.

I would rather not have users configure GitHub creds, but maybe I can find another solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants