Skip to content
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

Large module init causes not all releases to be made #129

Open
sorliem opened this issue Jan 9, 2025 · 3 comments
Open

Large module init causes not all releases to be made #129

sorliem opened this issue Jan 9, 2025 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sorliem
Copy link

sorliem commented Jan 9, 2025

Hello - first, thanks for making this!

When I went to init all my existing 33 modules at v1.0.0, I hit an issue where only 30 Github Releases were created. My PR had 33 files changed to trigger terraform-modules-releaser on each one, but in the "Finding all Terraform modules with corresponding changes" step, it said:

Parsing commit 121524819f8461485f52a0ee9f0e4bace6663c7b: init modules at v1.0.0 (Changed Files = 30)

Looking at the Github api it looks like 30 is the default: https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests-files

This is a bit of an edge case but paging would be helpful here. If I get some time I can take a crack at a fix.

@virgofx
Copy link
Member

virgofx commented Jan 11, 2025

Hey @sorliem - Thank you for catching this and for the kind words about the project!

While I thought I had pagination implemented for most API calls, I clearly missed this one for pull request files.

As a temporary workaround: any subsequent commit should trigger the releaser on the remaining 3 modules that weren't processed in the first run. Could you let me know if this works for your case?

I'll prioritize adding proper pagination for the PR files endpoint to handle repositories with >30 module changes. I'll ping you once I've released a new version with the fix.

Thanks again for bringing this to our attention - these are exactly the kind of edge cases we need to catch to make the tool more robust! 🙌

@sorliem
Copy link
Author

sorliem commented Jan 16, 2025

Hi @virgofx - Yep I created another PR with the remaining three modules and it ran fine.

Thanks again!

@virgofx
Copy link
Member

virgofx commented Jan 17, 2025

Great news! Glad you're all set with the current workaround. This is definitely valid edge case and I'll get this fixed soon time permitting.

@virgofx virgofx self-assigned this Jan 17, 2025
@virgofx virgofx added bug Something isn't working good first issue Good for newcomers labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants