badges / badges/shields

Unable to access private build status on gitlab

Open
#8,768 7 comments 0 reactions 0 assignees View on GitHub
self-hosting service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

### Are you experiencing an issue with...

My own instance of shields

### 🐞 Description

Hi,

I'm running an instance via Docker on my server which is working perfectly.
But when I want to add a status from a private repo from gitlab I get a inaccessible badge.

Here my setup:
Docker tag: server-2022-12-01
Docker-config service:
`shields:
image: shieldsio/shields:server-2022-12-01
container_name: Shields
environment:
- PORT=80
- GITLAB_ORIGINS=https://gitlab.com
- GITLAB_TOKEN=glpat-sometokenkeyhere`

I checked the token is valid and grant all access (for testing purpose)

At the same time sometimes 8n the logs of Shields docker I got this error:

`Shields | 0103155818 Error: Token pool is exhausted
Shields | at TokenPool._nextBatch (file:///usr/src/app/core/token-pooling/token-pool.js:268:11)
Shields | at TokenPool.next (file:///usr/src/app/core/token-pooling/token-pool.js:305:20)
Shields | at GithubApiProvider.tokenForUrl (file:///usr/src/app/services/github/github-api-provider.js:147:33)
Shields | at GithubApiProvider.fetch (file:///usr/src/app/services/github/github-api-provider.js:160:22)
Shields | at GithubForks._request (file:///usr/src/app/core/base-service/base.js:234:40)
Shields | at GithubForks._requestGraphql (file:///usr/src/app/core/base-service/base-graphql.js:74:35)
Shields | at GithubForks._requestGraphql (file:///usr/src/app/services/github/github-auth-service.js:66:18)
Shields | at GithubForks.handle (file:///usr/src/app/services/github/github-forks.service.js:57:29)
Shields | at Function.invoke (file:///usr/src/app/core/base-service/base.js:407:45)`

I don't know if it's related.

Thanks in advance.

### 🔗 Link to the badge

_No response_

### 💡 Possible Solution

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the private GitLab status badge using the shown Docker configuration and inspect the container logs. Compare the GitLab request path with the reported core/token-pooling/token-pool.js and services/github/github-api-provider.js stack trace. Done means the private GitLab badge returns an accessible status and the cause of the token-pool error is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, gitlab, javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.