-
Notifications
You must be signed in to change notification settings - Fork 118
Fix databricks labs list to include all projects
#3935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This is currently incomplete because there are more projects now than the default pagination size, and pagination was not taking place. Here we implement support for pagination.
This reduces the number of API calls that we make.
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
pietern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the max result size is 100, then the change could also just set that instead of adding the pagination. It probably works but won't be exercised until we actually have more than 100 repositories under labs.
| return url | ||
| } | ||
| } | ||
| return "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a unit test for this. It feels brittle.
That's fair, and I'm on the fence on this: when the code was originally implemented we were at (I believe) about a third of what we have now. So not supporting it feels like waiting for it to break again. The options I see are:
@pietern: With it laid out like this, what's your opinion? |
Changes
This PR fixes the
databricks labs listcommand so that all projects from Databricks Labs are listed: prior to this PR only the first 30 projects are listed.The root cause of the problem is that the GitHub API being used is paginated, and defaults to only 30 results per page, and pagination was not implemented. This PR resolves the issue by:
Incidental changes include:
Out of scope for now:
Why
The
databricks labs listcommand was returning an incomplete list; projects that could be installed (eg.ucx) were not included in the list.Tests