dotnet / docker-tools

This is a repo to house some common tools for our various docker repos.
MIT License
122 stars 46 forks source link

dotnet-docker-internal publish result exceeds GitHub issue character limit #1162

Closed lbussell closed 11 months ago

lbussell commented 1 year ago

In a recent internal build (internal link), the issue body for the publish result notification exceeded Github's issue character limit of 65536:

{"message":"Validation Failed","errors":[{"resource":"Issue","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"}],"documentation_url":"[https://docs.github.com/rest/issues/issues#create-an-issue"}](https://docs.github.com/rest/issues/issues#create-an-issue%22})
mthalman commented 1 year ago

This is a reoccurrence of https://github.com/dotnet/docker-tools/issues/1013.

We're just expanding the number of images. For example, we'd added aspnet composite images. So this increases the likelihood of hitting this limit.

The main desire is to have the digests included in the issue content so that we can search by digest and find the issue.

One solution may be to simply list all the digests in the content without any associated repos or tags. Then include an attached txt file that has the same content that we have today with repo grouping and tags associated with each digest. That will allow us to still search by digest but then dive into more detail by opening the attached txt file. Not ideal, but we're limited.

Another option is to store the content as a markdown file in the repo and have the issue link to that. In that case, maybe it makes more sense for it to be a PR that adds the file and we rely on notification via PR rather than issue. Then the PR can be automatically merged.

mthalman commented 1 year ago

[Triage] Another option might be to break up the total content so that it has multiple discussion posts in the issue. For example, each Docker repo could be a separate post that lists the images for that repo.

lbussell commented 1 year ago

I think that it would make sense to keep the existing issue, and post each individual repo's images as a comment on the issue. Each comment has its own character limit of 65536 so I'd be impressed if we grew past that. I will file an issue in Arcade to add comment support to Microsoft.DotNet.Git.IssueManager.

lbussell commented 1 year ago

Submitted and self-assigned https://github.com/dotnet/arcade/issues/14048