Skip to content

Add validation to get_sdk_pull_request_link for work item id#12127

Closed
smw-ms wants to merge 0 commit into
Azure:mainfrom
smw-ms:better-failure-pr-sdk
Closed

Add validation to get_sdk_pull_request_link for work item id#12127
smw-ms wants to merge 0 commit into
Azure:mainfrom
smw-ms:better-failure-pr-sdk

Conversation

@smw-ms

@smw-ms smw-ms commented Sep 17, 2025

Copy link
Copy Markdown
Member

#12083

Need a valid work item id for the code to work with or without a buildId

Copilot AI review requested due to automatic review settings September 17, 2025 01:22
@smw-ms smw-ms linked an issue Sep 17, 2025 that may be closed by this pull request

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.

Pull Request Overview

This PR adds validation to ensure a work item ID is provided when retrieving SDK pull request details, removing the option to use a build ID as an alternative parameter.

  • Simplifies parameter validation by requiring only work item ID instead of allowing either build ID or work item ID
  • Updates error message to reflect the new requirement

Comment on lines 332 to 335
if (workItemId == 0)
{
return "Either build ID or release plan work item ID is required to get SDK pull request details.";
return "Release plan work item ID is required to get SDK pull request details.";
}

Copilot AI Sep 17, 2025

Copy link

Choose a reason for hiding this comment

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

This change removes the ability to use build ID as an alternative to work item ID, which is a breaking change. Consider if existing callers rely on the build ID parameter, and ensure this breaking change is intentional and properly communicated.

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 17, 2025

@maririos maririos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand how the work item ID is important for getting the SKD PR from an SDK pipeline.
We want to find the SDK both ways. from the pipeline or from the work item. but they should be independent

}

if (buildId == 0 && workItemId == 0)
if (workItemId == 0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is the workItem ID required if we have the buildId?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not do this change. It will effectively enforce a release plan as mandatory to run SDK generation and we don't want to do that. We need to check why did the tool failed to get SDK details from build ID. WorkItemId is optional.

@smw-ms smw-ms closed this Sep 18, 2025
@smw-ms
smw-ms force-pushed the better-failure-pr-sdk branch from 79c74a3 to cab9a03 Compare September 18, 2025 23:59
@smw-ms
smw-ms deleted the better-failure-pr-sdk branch October 13, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to get pull request details from SDK generation pipeline

5 participants