renovatebot / app-support

Discussion/support issues for the hosted Renovate App
0 stars 0 forks source link

Only the first 100 projects are found when adding projects with gitlab #35

Closed mjrider closed 4 years ago

mjrider commented 5 years ago

What Renovate type are you using? Gitlab

Describe the bug Whwn adding projects with gitlab, only the first 20 are found ( pagination in the api ? )

Did you see anything helpful in debug logs? n/a/

To Reproduce

  1. open dashboard with gitlab login with an account with access to more then 20 projects
  2. click on ⚙️
  3. count the projects, and compare them with the actual list

Expected behavior see more then 20 projects

Screenshots image

Additional context Add any other context about the problem here.

mjrider commented 5 years ago

maybe relevant headers from the list projects request

X-Next-Page: 2
X-Page: 1
X-Per-Page: 20
X-Prev-Page: 
X-Total: 39
X-Total-Pages: 2
rarkins commented 5 years ago

Thanks. I've added per_page=100 to the URL so that might alleviate your problem for now. Full solution requires paginating the responses.

mjrider commented 5 years ago

i don't see anything different atm, is it already live ?

mjrider commented 5 years ago

addendum: you added the per_page=100 on the wrong place around line 451 in $('#install-more').click(function() { you need the per_page and not around line 389 in $('#installModalBody').on('change', '.switch', async function() {

rarkins commented 5 years ago

Thanks. can you try again now?

mjrider commented 5 years ago

Works like a charm

bartlangelaan commented 5 years ago

We have ~70 active projects, and ~150 archived projects. Because the list isn't filtered based on archived status, all archived projects still show up which made the list longer as 100 projects. The projects I wanted to enable didn't show up.

By adding &archived=false to the GitLab project API url, only unarchived projects are listed. Archived projects won't work with Renovate anyway. Maybe you can add that to the fetch url as well when you're working on this issue? 😄

rarkins commented 5 years ago

@bartlangelaan archived projects should now be filtered out in that query

Raimmaster commented 4 years ago

Any news regarding this issue? Given that #65 also had this. Or perhaps any current workaround to get the projects we're looking for to use Renovate?

alecgerona commented 4 years ago

@Raimmaster as mentioned by @rarkins in #60, you can just add Renovate bot as a developer/collaborator for your project and it will still work. The only caveat is its execution time which happens hourly rather than relying on a hook.

Raimmaster commented 4 years ago

I've added @renovate-bot to the repo, 21 hrs ago, but no integration MR has been received so far. Any reasons why this may be happening? Note: it does have Developer access.

alecgerona commented 4 years ago

I believe I waited a bit more for mine. YMMV. If it still doesn't appear then something may be wrong.

rarkins commented 4 years ago

@Raimmaster what's the GitLab group or username this is under? I'll check if I can find any newly discovered repos in our DB

Raimmaster commented 4 years ago

The organization/group it's under is leadiq, @rarkins.

rarkins commented 4 years ago

@Raimmaster only one repo is detected (the web app). It syncs hourly, and is not seeing any others. Developer level should be enough for it to be detected though.

Raimmaster commented 4 years ago

Yes, that's the repo where it was added, but no MRs have been received so far.

rarkins commented 4 years ago

A job was in the queue, should be through now

Raimmaster commented 4 years ago

So it's been over 48 hours now, but there's no integration MR. Is the job still in the queue, @rarkins?

rarkins commented 4 years ago

@Raimmaster if you log into the dashboard, can you view the logs? There is an error that I think is caused by your branch naming restrictions

Raimmaster commented 4 years ago

If I log into the dashboard there's nothing there, this is a screenshot of it, even after I checked the repos cog to look for the project (which again, doesn't load because it loads exactly 100 projects and not the one I added @renovate-bot to).

Dashboard

Raimmaster commented 4 years ago

Is it possible you can share the error without disclosing any private details or anything else regarding this, @rarkins?

rarkins commented 4 years ago

If I had to guess, I think your branch naming restrictions don't allow the "renovate/*" prefix.

Please don't continue following up in this issue though as it's not related to the original topic. Open a new issue if you need.

rarkins commented 4 years ago

Pagination should now be working for GitLab when you select the install option. Please comment here once you can test it to confirm it's fixed or reopen the issue