Skip to content

Bump autorest to ^3.8.0 and fix stderr handling#459

Open
raych1 wants to merge 1 commit intomainfrom
fix/autorest-stderr-handling
Open

Bump autorest to ^3.8.0 and fix stderr handling#459
raych1 wants to merge 1 commit intomainfrom
fix/autorest-stderr-handling

Conversation

@raych1
Copy link
Member

@raych1 raych1 commented Mar 13, 2026

Changes

  • Bump autorest dependency from ^3.6.1\ to ^3.8.0\
  • Fix overly strict stderr handling in \processViaAutoRest: only throw on non-zero exit code, log stderr as warning otherwise
  • autorest 3.8.0 emits deprecation message to stderr with exit code 0, which previously caused a hard failure
  • Bump package version to 0.12.4

- Only throw on non-zero exit code; log stderr as warning otherwise
- autorest 3.8.0 emits deprecation message to stderr with exit code 0
- Bump version to 0.12.4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@raych1 raych1 marked this pull request as ready for review March 13, 2026 20:11
@raych1 raych1 self-assigned this Mar 13, 2026
@raych1 raych1 moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 📆🎇 Mar 13, 2026
maxBuffer: 1024 * 1024 * 64,
env: { ...process.env, NODE_OPTIONS: "--max-old-space-size=8192" }
})
// autorest 3.8.0 emits deprecation message to stderr with exit code 0
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this part of the change is needed at all. If autorest returns nonzero exit, execFile() throws, and we can just let the error bubble up. We don't need to catch and re-throw.

}
if (stderr) {
throw new Error(stderr)
log.error(`AutoRest completed with warnings on stderr: ${stderr}`)
Copy link
Member

Choose a reason for hiding this comment

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

maybe log.debug() would be better than log.error()? autorest writing to stderr isn't really an "error", it's more of a "warning" at best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 Dev in PR

Development

Successfully merging this pull request may close these issues.

2 participants