Skip to content

[Pipeline] optimize for batch run in pipeline#40213

Merged
msyyc merged 7 commits intomainfrom
pipeline-batch-run-mode
Apr 11, 2025
Merged

[Pipeline] optimize for batch run in pipeline#40213
msyyc merged 7 commits intomainfrom
pipeline-batch-run-mode

Conversation

@msyyc
Copy link
Copy Markdown
Member

@msyyc msyyc commented Mar 25, 2025

@msyyc msyyc marked this pull request as ready for review March 25, 2025 09:35
Copilot AI review requested due to automatic review settings March 25, 2025 09:35
@msyyc msyyc requested review from mccoyp and scbedd as code owners March 25, 2025 09:35
Copy link
Copy Markdown
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 optimizes the batch run in the pipeline by conditionally updating dependency installation and command flags for the Typespec generation.

  • Modified the gen_typespec function in generate_utils.py to accept a new boolean parameter "run_in_pipeline" and update the command accordingly.
  • Updated sdk_generator.py to extract the runInPipeline flag from the input data and pass it to gen_typespec.

Reviewed Changes

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

File Description
tools/azure-sdk-tools/packaging_tools/generate_utils.py Updated gen_typespec to conditionally install dependencies and append command flags based on run_in_pipeline.
tools/azure-sdk-tools/packaging_tools/sdk_generator.py Added extraction of runInPipeline from input data and passed it to gen_typespec.
Files not reviewed (1)
  • scripts/automation_generate.sh: Language not supported
Comments suppressed due to low confidence (1)

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

  • [nitpick] Consider defining the node_modules path as a constant to improve maintainability and ease future updates if the project structure changes.
if not os.path.exists("node_modules/@azure-tools/typespec-python"):

@msyyc msyyc changed the title [Pipeline] optimize for batch run in pipeline [Pipeline] optimize for batch run in pipeline (DO NOT MERGE) Mar 26, 2025
@msyyc msyyc changed the title [Pipeline] optimize for batch run in pipeline (DO NOT MERGE) [Pipeline] optimize for batch run in pipeline Apr 11, 2025
@msyyc
Copy link
Copy Markdown
Member Author

msyyc commented Apr 11, 2025

/check-enforcer override

@msyyc msyyc merged commit 8125ca3 into main Apr 11, 2025
25 of 30 checks passed
@msyyc msyyc deleted the pipeline-batch-run-mode branch April 11, 2025 06:48
cRui861 pushed a commit that referenced this pull request May 14, 2025
* optimize for batch run

* update

* update

* add log

* fix
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.

Optimization for Python Automation Tool in Batch Runs

3 participants