Repository navigation
fix: CI file change detector to handle large PRs - #33092
Merged
Merged
Conversation
9 tasks
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Inefficient CI Check Triggering ▹ view | 🧠 Not in standard |
Files scanned
| File Path | Reviewed |
|---|---|
| scripts/change_detector.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Need a new review? Comment
/korbit-reviewon this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-reviewcommand in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-descriptioncommand in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolvecommand in any comment on your PR.- On any given comment that Korbit raises on your pull request, you can have a discussion with Korbit by replying to the comment.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Feedback and Support
| # NOTE: as noted above, we assume that if 100 files are touched, we should | ||
| # trigger all checks. This is a workaround for the GitHub API limit of 100 | ||
| # files. Using >= 99 because off-by-one errors are not uncommon | ||
| if changed or len(files) >= 99: |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
eschutho
approved these changes
Apr 11, 2025
Member
Author
|
Blocked by errors in master, might try to tackle if no one else is on it already... |
Improve our change detector. The way it works currently, we do a simple call to the github API to fetch the list of files that have changed in the PR, so that we can see if we should trigger cetain jobs. Now it appears that the particular endpoint we use returns a max of 30 results by call, unless we specify the `?per_page=100` argument. Now I'm a bit lazy and didn't want to implement paging, so instead I'm resorting to fetching 100, and if/when we see 100, we assume that we should trigger all checks. Why not paging? - i'm lazy, and we should probably use a proper github client instead of re-implementing paging, and that'd require a bit more time/effort - triggering everything if we have 100 files is fine, maybe super occasionally we'll trigger a bit more work than necessary (large frontend-only refactor, large backend-only refactor, ...) but I think that's fine
mistercrunch
force-pushed
the
fix_change_detector
branch
from
April 11, 2025 16:30
1900aa4 to
59c1384
Compare
sadpandajoe
approved these changes
Apr 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve our change detector. The way it works currently, we do a simple call to the github API to fetch the list of files that have changed in the PR, so that we can see if we should trigger cetain jobs. Now it appears that the particular endpoint we use returns a max of 30 results by call, unless we specify the
?per_page=100argument.Now I'm a bit lazy and didn't want to implement paging, so instead I'm resorting to fetching 100, and if/when we see 100, we assume that we should trigger all checks.
Why not paging?