Skip to content

[PATCH] Make sure to fetch all pages #15

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

Merged
merged 1 commit into from
Mar 3, 2022
Merged

[PATCH] Make sure to fetch all pages #15

merged 1 commit into from
Mar 3, 2022

Conversation

darkdragon-001
Copy link
Contributor

By default, Gitlab pagination only fetches the first 20 results. If the submodule diff is not part of the first 20 files, it won't be detected. The Gitlab python client has a nice feature to handle this automatically and only when needed when you use the generator call. See documentation.

@ValentinFrancois ValentinFrancois changed the title Make sure to fetch all pages [PATCH] Make sure to fetch all pages Mar 3, 2022
@ValentinFrancois
Copy link
Owner

Ah thanks, didn't know about the pagination limit but glad to see that we can handle it in python-gitlab so easily!

Looks like this could be the reason of https://github.com/ValentinFrancois/python-gitlab-submodule/blob/main/gitlab_submodule/submodule_commit.py#L76 ? I don't remember exactly on which project I observed that, will try to reproduce it and see if this PR solves it. If it does then I can get rid of the get_latest_commit_possible_if_not_found argument.

Btw I took the liberty to put '[PATCH]' in front of your PR title (since your last contribution I set up the CI to get the new package version from the title, see https://github.com/ValentinFrancois/python-gitlab-submodule#contributing).

@ValentinFrancois ValentinFrancois merged commit 0ec012d into ValentinFrancois:main Mar 3, 2022
@ValentinFrancois
Copy link
Owner

Ok I found back the private projects where I had observed the issue and indeed pagination was the reason, so your fix makes the argument get_latest_commit_possible_if_not_found unnecessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants