Skip to content

eng, Allow preserving designated libraries during SDK sync - #50487

Merged
Weidong Xu (weidongxu-microsoft) merged 3 commits into
mainfrom
feature/optional-openai-typespec-upgrade
Sep 17, 2026
Merged

Weidong Xu (weidongxu-microsoft) merged 3 commits into
mainfrom
feature/optional-openai-typespec-upgrade

Conversation

@weidongxu-microsoft

@weidongxu-microsoft Weidong Xu (weidongxu-microsoft) commented Sep 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Add an UpgradeDesignatedLibraries pipeline boolean, defaulting to true.
  • Pass it to sync_emitter.py as --upgrade-designated-libraries.
  • Cache designated library versions before emitter configuration is regenerated.
  • Restore the cached versions when upgrades are disabled.

By default, behavior is unchanged: libraries sourced from azure-rest-api-specs or npm latest are upgraded. Disabling the option isolates an emitter regeneration from independently versioned designated library updates.

Validation

  • Verified disabled mode restores all cached designated versions without querying specs or npm for them.
  • Verified enabled mode resolves designated versions from their existing configured sources.
  • Parsed the pipeline YAML and compiled the Python script.

For #50481, where sync openai-typespec lib from azure-rest-api-specs caused large diff

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bbb8f8a7-8cb7-4e00-8c51-872dee15fcc9
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

This PR adds an opt-out for upgrading OpenAI TypeSpec during emitter synchronization while preserving the existing default behavior.

Changes:

  • Adds and forwards the UpgradeOpenAITypeSpec pipeline option.
  • Preserves the existing OpenAI TypeSpec pin when disabled.
File summaries
File Description
eng/pipelines/scripts/sync_emitter.py Implements optional OpenAI TypeSpec upgrade behavior.
eng/pipelines/post-publish-emitter.yaml Adds and passes the pipeline parameter.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bbb8f8a7-8cb7-4e00-8c51-872dee15fcc9
@weidongxu-microsoft Weidong Xu (weidongxu-microsoft) changed the title Allow preserving OpenAI TypeSpec during SDK sync Allow preserving designated libraries during SDK sync Sep 16, 2026
@weidongxu-microsoft Weidong Xu (weidongxu-microsoft) changed the title Allow preserving designated libraries during SDK sync eng,Allow preserving designated libraries during SDK sync Sep 16, 2026
@weidongxu-microsoft Weidong Xu (weidongxu-microsoft) changed the title eng,Allow preserving designated libraries during SDK sync eng, Allow preserving designated libraries during SDK sync Sep 16, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@weidongxu-microsoft
Weidong Xu (weidongxu-microsoft) merged commit 6e26c55 into main Sep 17, 2026
29 checks passed
@weidongxu-microsoft
Weidong Xu (weidongxu-microsoft) deleted the feature/optional-openai-typespec-upgrade branch September 17, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants