You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be feasible to split offending annotation bodies into multiple annotations?
I'm not too familiar with buildkite nor do I have access to that particular error, but maybe something like this?
Splitting the annotation bodies into multiple annotations is an option but you'd then need to consider deleting the annotations when you re-run the step and need to delete / update the annotations.
While it should not be complicated to find and delete the related annotations (assuming there's a naming convention), it would be simpler to truncate the annotation but write the full message to the build log such that the information is still available even if not in the annotation.
The annotation truncation seems to be working, I've included a warning as well.
What's the best way to write to the build log? Thanks
// Check if the annotation exceeds the maximum sizeconstbuffer=Buffer.from(markdown,'utf-8');lettruncatedMarkdown=markdown;if(buffer.length>MAX_SIZE){// Notify user of truncation, leave space for messagetruncatedMarkdown=buffer.toString('utf-8',0,MAX_SIZE-TRUNCATION_WARNING.length)+TRUNCATION_WARNING;// TODO: Log the full annotation to the build log}
The maximum body size of a Buildkite annotation is
1 MiB
as per Buildkite - Creating an annotation.When the body size is greater than
1 MiB
, an error occurs (e.g. backoffice-access Build 1727 Line 2604)The Buildkite.annotate function could possibly truncate the annotation similar to buildkite-plugins/junit-annotate-buildkite-plugin L28-L32 (as suggested by @72636c in Slack) although that may break the annotation anyway or result in an inaccurate annotation.
The text was updated successfully, but these errors were encountered: