music-encoding icon indicating copy to clipboard operation
music-encoding copied to clipboard

Build fails during development due to Github API rate limits

Open maxrothman opened this issue 9 months ago • 2 comments

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: https://github.com/music-encoding/music-encoding/blob/a4d4e3ec40beda34e97c24275f1bcb814a0fac72/utils/guidelines_xslt/odd2html/functions.xsl#L467-L468

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.

maxrothman avatar Feb 13 '25 17:02 maxrothman

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

ahankinson avatar Feb 13 '25 18:02 ahankinson

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.

musicEnfanthen avatar Feb 14 '25 09:02 musicEnfanthen

@maxrothman could you please retry and provoke the limitation, since #1471 has been merged?

bwbohl avatar Jul 03 '25 13:07 bwbohl

I successfully ran the build 10 times in a row with no failures, it looks fixed! Thank you!

maxrothman avatar Jul 05 '25 18:07 maxrothman