-
Notifications
You must be signed in to change notification settings - Fork 0
test: PR with more lines than GH allows for raw diffs #5
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # - Total diff: max 20,000 lines or 1 MB of raw data | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test comment from 422 reproduction script.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test comment from 422 reproduction script.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test comment from 422 reproduction script. |
||
| # - Per-file diff: max 20,000 lines or 500 KB of raw data | ||
| # - Files in diff: max 300 files | ||
| # | ||
| # ┌─────────────┬─────────────────────────┬────────────────────────┬────────────────────────────────────┐ | ||
| # │ Method │ File limit │ Size limit │ On overflow │ | ||
| # ├─────────────┼─────────────────────────┼────────────────────────┼────────────────────────────────────┤ | ||
| # │ Raw diff │ 300 files │ 20k lines / 1 MB total │ HTTP 406 │ | ||
| # ├─────────────┼─────────────────────────┼────────────────────────┼────────────────────────────────────┤ | ||
| # │ get_files() │ 3,000 files (paginated) │ N/A (no total limit) │ patch field missing on large files │ | ||
| # └─────────────┴─────────────────────────┴────────────────────────┴────────────────────────────────────┘ | ||
| # | ||
| # In this case we want to test: | ||
| # - 1 file (very large file) that the patch will be missing from being too large | ||
| # - More lines than raw diff will allow | ||
| # | ||
| # Expected result: raw diff fails with 406 code but get_files() returns all patches except for 1 | ||
|
|
||
| for i in range(300): | ||
| with open(f"z_changed_file_{i}.txt", "w") as fd: | ||
| for j in range(100): | ||
| fd.write(f"added line {j + 1}\n") | ||
|
|
||
| with open("very_large_file.txt", "w") as fd: | ||
| for i in range(2_001): | ||
| fd.write(f"added line {i + 1}\n") | ||
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.
Test comment from 422 reproduction script.