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

Fix github issue body size #1257

Merged
merged 8 commits into from
Nov 7, 2023

Conversation

autoantwort
Copy link
Contributor

In the past I sometimes got errors like

➜  vcpkg git:(test-features) ✗   gh issue create -R microsoft/vcpkg --title "[llvm] Build failure" --body-file /Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/vcpkg/issue_body.md

Creating issue in microsoft/vcpkg

GraphQL: Body is too long (maximum is 65536 characters) (createIssue)

With this PR the body size is enforced and dynamically distributed between the logs that are copied into the issue body.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs tests. append_log and append_logs both look unit testable.

src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
@BillyONeal
Copy link
Member

I think this needs tests. append_log and append_logs both look unit testable.

(Note: making testable may require sucking the read_contents out and that's OK!)

@autoantwort autoantwort marked this pull request as draft November 1, 2023 01:20
@autoantwort autoantwort marked this pull request as ready for review November 4, 2023 01:31
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM after the size_t<->int issues are fixed. Thanks for the tests!

src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.build.cpp Outdated Show resolved Hide resolved
@autoantwort autoantwort marked this pull request as draft November 4, 2023 13:02
@autoantwort autoantwort marked this pull request as ready for review November 4, 2023 13:02
@BillyONeal BillyONeal merged commit c9e4be1 into microsoft:main Nov 7, 2023
5 checks passed
@BillyONeal
Copy link
Member

Thanks!

@autoantwort autoantwort deleted the feature/max-issue-size branch November 7, 2023 20:14
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