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

Build fails during development due to Github API rate limits #1637

Open
maxrothman opened this issue Feb 13, 2025 · 2 comments
Open

Build fails during development due to Github API rate limits #1637

maxrothman opened this issue Feb 13, 2025 · 2 comments

Comments

@maxrothman
Copy link
Contributor

If you're working on the guidelines and building somewhat frequently, the build sometimes fails with this error:

[java] Type error in expression in xsl:variable/@select on line 542 column 129 of functions.xsl:
     [java]   XTTE0570  An empty sequence is not allowed as the value of variable $login
     [java] In function tools:getContributors on line 466 column 61 of functions.xsl:
     [java] During lazy evaluation of (xsl:message, ...) on line 388 of file:/Users/maxrothman/repos/music-encoding/utils/guidelines_xslt/odd2html/functions.xsl
     [java] In function tools:generateIndizes on line 387 column 61 of functions.xsl:
     [java]      invoked by function call at file:/Users/maxrothman/repos/music-encoding/utils/guidelines_xslt/odd2html.xsl#218
     [java]   In template rule with match="/" on line 195 of odd2html.xsl
     [java] An empty sequence is not allowed as the value of variable $login

This is being caused by the Github API's rate limit while fetching contributors in this code:

<xsl:variable name="spec.repo.contributors" select="'https://api.github.com/repos/music-encoding/music-encoding/contributors'" as="xs:string"/>
<xsl:variable name="docs.repo.contributors" select="'https://api.github.com/repos/music-encoding/guidelines/contributors'" as="xs:string"/>

This is an annoyance during development: the build already takes more than a minute, so having to wait a while and run it again is doubly annoying. It would be nice to remove these build failures, either by filtering out failed/empty responses, or by caching the results of those API calls locally.

@ahankinson
Copy link
Member

Is there a way to set a development flag so that it only gets built on a “real” run?

@musicEnfanthen
Copy link
Member

See #1471

For now, the only workaround is to wait some more minute, and run the build again. It's a bit annoying for sure, but hey... there are worse build times out there ;)

Saying this, I am still not 100% sure that it is really the API limit that triggers the build failures related to the empty $login, but let's see if something like #1471 improves the situtation.

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

No branches or pull requests

3 participants