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.
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.