Skip to content

Conversation

@msyyc
Copy link
Member

@msyyc msyyc commented Jul 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings July 8, 2025 02:29
@msyyc msyyc requested review from mccoyp and scbedd as code owners July 8, 2025 02:29
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 enhances the SDK generation pipeline to accept a remote spec URL when a local spec folder isn’t provided and defaults specFolder to an empty string if missing.

  • Add .get("specFolder", "") to prevent key errors in sdk_generator.py
  • Conditionally choose between local spec folder and remote URL in generate_utils.py

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/azure-sdk-tools/packaging_tools/sdk_generator.py Use data.get("specFolder", "") to default missing specFolder to an empty string
tools/azure-sdk-tools/packaging_tools/generate_utils.py Wrap local init in if spec_folder and fall back to a remote tspconfig.yaml URL
Comments suppressed due to low confidence (2)

tools/azure-sdk-tools/packaging_tools/sdk_generator.py:225

  • Defaulting specFolder to an empty string may mask missing configuration and lead to unintended behaviors. Consider validating that specFolder is provided or raising an informative error if it’s required.
    spec_folder = data.get("specFolder", "")

tools/azure-sdk-tools/packaging_tools/generate_utils.py:418

  • The variable spec_folder is not defined in this function’s scope, which will raise a NameError. You should pass it as a parameter or use the correctly scoped variable (e.g., the local spec folder argument).
        if spec_folder:

@msyyc
Copy link
Member Author

msyyc commented Jul 8, 2025

/check-enforcer override

@msyyc msyyc merged commit d850231 into main Jul 8, 2025
7 of 12 checks passed
@msyyc msyyc deleted the sdk-generation-pipeline-accept-remote-url branch July 8, 2025 02:34
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