-
Notifications
You must be signed in to change notification settings - Fork 69
Split pipeline utilities into focused modules #1272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split pipeline utilities into focused modules #1272
Conversation
…red it to run multiple executions
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/distributed-demo #1272 +/- ##
============================================================
+ Coverage 92.08% 92.39% +0.30%
============================================================
Files 92 96 +4
Lines 2526 2655 +129
Branches 406 464 +58
============================================================
+ Hits 2326 2453 +127
- Misses 197 199 +2
Partials 3 3
🚀 New features to boost your workflow:
|
There was a problem hiding this 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 refactors the pipeline utilities into three focused modules to improve maintainability and lay the groundwork for concurrent digital twin executions. Key changes include splitting log fetching, core timing, and status checking functionalities into separate modules and updating related tests and UI integrations accordingly.
- Created new modules (logFetching.ts, pipelineCore.ts, statusChecking.ts) in /model/backend/gitlab/execution.
- Refactored existing files to use the new modules and updated corresponding tests.
- Updated polling and status handling functions in the UI integration.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
client/test/unit/model/backend/gitlab/execution/statusChecking.test.ts | Added tests for new status checking functions |
client/test/unit/model/backend/gitlab/execution/pipelineCore.test.ts | Added tests for pipeline core utilities |
client/test/unit/model/backend/gitlab/execution/logFetching.test.ts | Added tests for log fetching functions |
client/test/preview/unit/routes/digitaltwins/execute/PipelineUtils.test.ts | Updated test import for fetchJobLogs |
client/test/preview/unit/routes/digitaltwins/execute/PipelineChecks.test.ts | Updated tests to use functions from pipelineCore |
client/test/preview/integration/route/digitaltwins/execute/PipelineUtils.test.tsx | Updated integration tests to use new fetchJobLogs |
client/test/preview/integration/route/digitaltwins/execute/PipelineChecks.test.tsx | Updated integration tests to use pipelineCore functions |
client/src/preview/route/digitaltwins/execute/pipelineUtils.ts | Refactored to wrap new logFetching module |
client/src/preview/route/digitaltwins/execute/pipelineChecks.ts | Updated status checking and polling using new modules |
client/src/model/backend/gitlab/types/executionHistory.ts | Added and updated types for execution history |
client/src/model/backend/gitlab/execution/statusChecking.ts | Introduced status mapping and checking utilities |
client/src/model/backend/gitlab/execution/pipelineCore.ts | Introduced core pipeline functions for delay, timeout, and polling |
client/src/model/backend/gitlab/execution/logFetching.ts | Extracted log fetching functionality and related helpers |
client/src/model/backend/gitlab/constants.ts | Added a polling interval constant |
client/src/preview/route/digitaltwins/execute/pipelineChecks.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
|
@Microchesst please refer to the comments made in this PR |
Moves the pipeline execution files into the stable codebase and prepares it to run multiple executions --------- Co-authored-by: Microchesst <[email protected]> Co-authored-by: Marcus Jensen <[email protected]> Co-authored-by: Copilot <[email protected]>
merged via PR #1277 |
and INTO-CPS-Association#1277) Moves the pipeline execution files into the stable codebase and prepares it to run multiple executions --------- Co-authored-by: Microchesst <[email protected]> Co-authored-by: Marcus Jensen <[email protected]> Co-authored-by: Copilot <[email protected]>
Title
Refactor: Pipeline modules integration - Modular architecture for concurrent executions connected to #1235
Type of Change
Description
This PR refactors the entire pipeline execution into a modular architecture to improve maintainability and prepare the foundation for concurrent digital twin executions.
Key Changes:
Created 3 new focused modules in
/model/backend/gitlab/execution/
:logFetching.ts
- Log fetching and processing utilitiespipelineCore.ts
- Core pipeline timing and utilitiesstatusChecking.ts
- Status validation and mappingRefactored existing pipeline files to use new modules:
pipelineUtils.ts
- Updated to import from new modules, cleaner UI state managementpipelineChecks.ts
- Now usesstatusChecking.ts
andpipelineCore.ts
functionspipelineHandler.ts
- Updated imports and integration with new architectureLogDialog.tsx
- Updated to work with new module structureUpdated all imports across the codebase to use new module locations
Preserved all utility functions needed for future concurrent executions feature
Maintained clean architecture with business logic in
/model
and UI logic in/preview
What was refactored:
pipelineUtils.ts
,pipelineChecks.ts
,pipelineHandler.ts
/model
, UI logic in/preview
, focused responsibilitiesImpact
Dependencies:
Breaking Changes:
Additional Information
Future Work:
This refactoring prepares for concurrent digital twin executions. The utility functions in
logFetching.ts
(likevalidateLogs
,combineLogs
,countSuccessfulJobs
) are specifically preserved for the concurrent executions feature.Architecture Notes:
/model/backend/gitlab/execution/
/preview/route/digitaltwins/execute/
Checklist