uselagoon / remote-controller

A group of controllers for handling Lagoon builds and tasks in Kubernetes or Openshift
5 stars 1 forks source link

Use patched library to solve page_size issues #65

Closed shreddedbacon closed 3 years ago

shreddedbacon commented 3 years ago

A customer discovered a problem where they had a number of projects that have a suffix that is the same on a large number of their projects (more than 10). But they had 1 project that was the suffix.

With the default goharbor-client library when trying to GetProjectByName, it does a ListProjects call, and it seems that the core Harbor API does a regex match and returns all 60+ projects in the response in a paginated response. The goharbor-client library only returns data for page_num 1, with a page_size of 10.

This patched version of the library returns a page_size of 100. Will need to raise an issue with the library maintainer to support pagination properly as a long term fix.