Skip to content

feat(pipeline-loader, pipeline-server): improve pipeline loading and sourcing#527

Draft
luxass wants to merge 42 commits intomainfrom
fix-loader
Draft

feat(pipeline-loader, pipeline-server): improve pipeline loading and sourcing#527
luxass wants to merge 42 commits intomainfrom
fix-loader

Conversation

@luxass
Copy link
Member

@luxass luxass commented Feb 28, 2026

🔗 Linked issue

📚 Description

This PR fixes the issues with pipeline loading, and in general rewrites the entire system.

We now always bundle via rolldown, this is to ensure that imports and other things work correctly. For remote sources we download the "pipeline" project into the .config/ucd/cache/repos/<source>/<owner>/<repo>/<commit-sha>.

Important

For security purposes, we don't install any dependencies. Dependencies can be installed via the CLI, to ensure that we can bundle the pipeline in the most efficient way. When a user uses the CLI, to run on a remote pipeline source, we download the pipeline, and will ask them to install. If they don't install, we will return a nice error message.

- Introduced `BundleResult` interface to include `dataUrl` in the bundling process.
- Updated `bundle` function to return both `code` and `dataUrl`.
- Refactored `loadPipelineFile` to utilize the new bundling structure.
- Improved error handling and added tests for GitHub and GitLab sources.
- Added utility functions for parsing remote source URLs.
- Removed `parseRepoString` function and replaced it with `parseRemoteSourceUrl` for better clarity and error handling.
- Consolidated remote source addition logic into a single `addRemoteSource` function to reduce code duplication.
- Implemented a new loader function to fetch pipelines from the API.
- Added error handling for failed fetch requests and pipeline errors.
- Updated the HomePage component to display loading and error states.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-loader

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 28, 2026

🌏 Preview Deployments

Application Status Preview URL
API ⏳ In Progress N/A
Store ⏳ In Progress N/A
Website ⏳ In Progress N/A
Documentation ⏳ In Progress N/A

Built from commit: f21a353a8d6f4e5ad06a755c75a4495e50aa279a


🤖 This comment will be updated automatically when you push new commits to this PR.

@luxass luxass deployed to apps-approval February 28, 2026 08:10 — with GitHub Actions Active
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 92.38095% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/pipelines/pipeline-loader/src/utils.ts 86.44% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

luxass added 9 commits March 1, 2026 07:33
- Introduced `pipelineQueryOptions` for fetching pipeline data.
- Created lazy-loaded route for pipeline details, including version selection and error handling.
…query options

Refactor `QuickActionsPanel`, `RecentExecutionsPanel`, and `RecentOutputsPanel` to use new route parameters for `sourceId`, `fileId`, and `pipelineId`. Introduce `executionsQueryOptions` for fetching execution data with improved API structure. Add lazy loading for the new pipeline overview route.
Added lazy loading routes for inspecting and viewing graphs of pipelines under the `$sourceId/$fileId/$pipelineId` path. This enhances the routing capabilities for pipeline details.
…dex router

- Consolidate source routes by removing the `sourcesIndexRouter`.
- Update the `sourcesSourceRouter` to handle additional source details.
- Refactor query options imports for better organization.
- Introduce new components for route details and list display in the UI.
luxass added 4 commits March 1, 2026 12:00
- Introduced `dashboardRouter` to handle dashboard statistics and recent executions.
- Updated existing routes to include the new dashboard functionality.
- Refactored execution data handling to improve clarity and maintainability.
}
};

const handleBack = () => {
luxass added 9 commits March 2, 2026 03:57
…ionality

- Added `./types` export to `package.json` for type definitions.
- Updated `tsdown.config.ts` to include `./src/types.ts` as an entry point.
- Introduced `sourcesOverviewRouter` for aggregated source data retrieval.
- Created `fetch-overview.ts` for fetching overview data with React Query integration.
- Updated various components and schemas to utilize new overview data structure.
…hing

- Consolidated execution-related functions into a single module.
- Introduced new `fetchOverview` and `overviewQueryOptions` functions for fetching overview data.
- Updated imports in `use-execute` to reflect new structure.
- Added `fetchOnMount` parameter to various query options for better control over data fetching.
- Refactored `useExecute` to utilize `useMutation` for executing pipelines.
- Updated `QuickActionsPanel` to handle execution results more effectively.
- Removed unused `useEventView` hook to streamline codebase.
Updated query options across the pipeline UI to accept a `baseUrl` parameter. This change enhances the flexibility of API calls by allowing the base URL to be specified dynamically. Refactored functions for fetching executions, pipelines, and execution details to utilize the new structure, improving code maintainability and readability.
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.

1 participant