Skip to content

engSys, redirect autorest deprecation message from stderr to stdout#48267

Merged
XiaofeiCao merged 3 commits intomainfrom
merge_autorest_stderr
Mar 7, 2026
Merged

engSys, redirect autorest deprecation message from stderr to stdout#48267
XiaofeiCao merged 3 commits intomainfrom
merge_autorest_stderr

Conversation

@XiaofeiCao
Copy link
Contributor

@XiaofeiCao XiaofeiCao commented Mar 5, 2026

Description

autorest 3.8.0 will emit deprecation message to stderr with exit code 0, which will break CI that's using it.

This PR redirects stderr to stdout. Alternative be, pinning autorest to previous 3.7.2, as we likely not going to upgrade it.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 5, 2026
@XiaofeiCao XiaofeiCao added AutoRest Runtime and removed Storage Storage Service (Queues, Blobs, Files) labels Mar 5, 2026
@XiaofeiCao XiaofeiCao changed the title [DO NOT MERGE] test autorest 3.8.0 behavior engSys, redirect autorest deprecation message from stderr to stdout Mar 5, 2026
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

We've tried failOnStderr=false in autorest.java repo pipeline (it should be false by default anyway)
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/powershell-v2?view=azure-pipelines

It does not work.

@XiaofeiCao XiaofeiCao marked this pull request as ready for review March 6, 2026 02:38
Copilot AI review requested due to automatic review settings March 6, 2026 02:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the code-generation verification script to avoid CI failures caused by AutoRest 3.8.0 emitting a deprecation message to stderr while still exiting with code 0.

Changes:

  • Redirects the Swagger regeneration script’s error stream (stderr / stream 2) into the success output stream when capturing output.

@XiaofeiCao XiaofeiCao merged commit f3c7502 into main Mar 7, 2026
23 checks passed
@XiaofeiCao XiaofeiCao deleted the merge_autorest_stderr branch March 7, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants