Support parallel step insertion and parallelism breakup in Bitbucket pipelines#1051
Conversation
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1051 will not alter performanceComparing Summary
|
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…e docstrings from register functions Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…insert Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
…tion Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for adding steps in parallel and breaking up existing parallelism in Bitbucket pipelines to complete integration with the pipeweld solver. The changes enable the system to handle complex dependency scenarios by converting single steps to parallel blocks, extending existing parallel blocks, and extracting steps from parallel blocks when needed to satisfy dependencies.
- Adds handling for
InsertParallelinstructions to create or extend parallel step blocks - Implements step extraction from parallel blocks to break up existing parallelism when dependencies require it
- Refactors instruction application to support both new step insertion and existing step rearrangement
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/usethis/_integrations/ci/bitbucket/pipeweld.py |
Core implementation of parallel step insertion and extraction logic with new helper functions and exception handling |
src/usethis/_integrations/ci/bitbucket/steps.py |
Updated parameter name from new_step to step_to_insert for consistency |
src/usethis/_integrations/ci/bitbucket/errors.py |
Added MissingStepError exception for handling missing steps in pipelines |
tests/usethis/_integrations/ci/bitbucket/test_pipeweld.py |
Comprehensive test coverage for parallel insertion and parallelism breakup scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Support adding steps in parallel in Bitbucket pipelines
Summary:
This PR implements support for adding steps in parallel and breaking up existing parallelism in Bitbucket pipelines, completing the integration with the pipeweld solver.
Features Implemented:
InsertParallel instruction handling
Breaking up existing parallelism
Changes:
apply_pipeweld_instruction_via_docto handle both new step insertion and existing step movement_insert_parallel_stepsingledispatch for parallel block creation/extension_extract_step_from_itemsand_extract_step_from_itemfor step extractionRecent updates:
new_step.namein import pipeline error message for better error reportingtest_extract_step_from_paralleltestMissingStepErrorexception with try-except instead of None checking for more Pythonic and efficient code_apply_instruction_to_itemshelper function to remove noqa commentnew_stepparameter tostep_to_insertthroughout the module for consistencyOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.