Skip to content

Large content is not passed to output job #28863

Closed

Description

@JamesNK

I want to write a wiki page. I need to define my own safe output job to do that. However, it has started failing because the content exceeds a limit and I get a message that content is written to a file instead of the content I want. I'm attempting to work around this issue.

What is the best fix?

WIP markdown file:
https://github.com/microsoft/aspire/blob/update-gh-aw-v0.71.0/.github/workflows/milestone-changelog.md?plain=1

Current workaround (not yet verified):

              // Handle case where body exceeded the framework's inline size limit
              // and was saved to a separate file in /tmp/gh-aw/safeoutputs/
              const largeContentPrefix = '[Content too large, saved to file: ';
              if (body.startsWith(largeContentPrefix) && body.endsWith(']')) {
                const filename = body.slice(largeContentPrefix.length, -1);
                const contentFilePath = path.join('/tmp/gh-aw/safeoutputs', filename);
                if (!fs.existsSync(contentFilePath)) {
                  core.setFailed(`Referenced content file not found: ${contentFilePath}`);
                  return;
                }
                body = fs.readFileSync(contentFilePath, 'utf8');
                core.info(`Resolved body from external file (${body.length} bytes)`);
              }

Checking for text Content too large, saved to file feels very brittle.

Activity

  1. locked and limited conversation to collaborators on Apr 28, 2026
  2. unlocked this conversation on Apr 28, 2026
  3. JamesNK commented on Apr 28, 2026

    @JamesNK
    Author

    I think I've fixed this by changing the incoming body to be a file reference.

  4. locked and limited conversation to collaborators on Apr 28, 2026
  5. unlocked this conversation on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions