You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "raboof (via GitHub)" <gi...@apache.org> on 2024/02/22 08:37:17 UTC

[I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

raboof opened a new issue, #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110

   It seems the Material theme hits the GitHub API pretty hard, fetching all repo's under the org, presumably to show the "X starts, Y forks" statistic in the top-right column. It seems to be cached, but still, is that really worth it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1959039867

   > This is about the client-side javascript, not the build process
   
   Oh I see, nvm then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
samueleresca commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1967376412

   > The js code look for the `data-source-md="github"` elements to trigger the github API call. I think removing that attribute from: https://github.com/apache/incubator-pekko-site/blob/3b7e6c3bbb49a411de04577bc06e7ad52121dfc7/content/lib/paradox-material-theme/partials/source.st#L26 should do the job
   
   Note that this won't remove the calling code from the sources, It will just prevent to make the call


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
samueleresca commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1967374595

   The js code look for the `data-source-md="github"` elements to trigger the github API call. I think removing that attribute from: https://github.com/apache/incubator-pekko-site/blob/3b7e6c3bbb49a411de04577bc06e7ad52121dfc7/content/lib/paradox-material-theme/partials/source.st#L26 should do the job


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1967361385

   This is a pretty high priority. We need to stop making these calls altogether as it against ASF policy policy to make calls to 3rd party sites like this.
   
   https://lists.apache.org/thread/29ft4ypt6vps30n877q69pj11kzx73c8
   
   https://privacy.apache.org/policies/privacy-policy-public.html
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1958999636

   I think we can prevent this by propagating the `GITHUB_TOKEN` (which is provided to the github CI runners) to the REST calls


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1967385309

   > > The js code look for the `data-source-md="github"` elements to trigger the github API call. I think removing that attribute from: https://github.com/apache/incubator-pekko-site/blob/3b7e6c3bbb49a411de04577bc06e7ad52121dfc7/content/lib/paradox-material-theme/partials/source.st#L26 should do the job
   > 
   > Note that this won't remove the calling code from the sources, It will not trigger the call to the 3rd party API.
   > 
   > @pjfanning I should be able to take a look at this tomorow
   
   Thanks @samueleresca - much appreciated. I had to allow the api.github.com calls in our Content-Security-Policy header (see the .htaccess in incubator-pekko-site). Ideally, we should be able to remove that put we may not be able to remove that immediately. If we can get your change working, we can come back again with a bigger change to remove the source that can call api.github.com altogether.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1958978582

   It ends up with GitHub blocking the calls due to rate limits (because they are not authenticated)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "samueleresca (via GitHub)" <gi...@apache.org>.
samueleresca commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1969117669

   https://github.com/apache/incubator-pekko-sbt-paradox/pull/121 Fixed this I think at least in the short term. The code calling the API is still there, but not executed. For a complete solution we should look at removing the calling code entirely.
   
   Note that the fix should be also compatible with the new `mkdocs-material`  v9.x (see: https://github.com/sbt/sbt-paradox-material-theme/pull/75)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [I] Avoid hitting the GitHub API [incubator-pekko-sbt-paradox]

Posted by "raboof (via GitHub)" <gi...@apache.org>.
raboof commented on issue #110:
URL: https://github.com/apache/incubator-pekko-sbt-paradox/issues/110#issuecomment-1959003019

   This is about the client-side javascript, not the build process


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org