Skip to content

Conversation

frostebite
Copy link
Member

  • Create provider-loader.ts with function-based dynamic import functionality
  • Update CloudRunner.setupSelectedBuildPlatform to use dynamic loader for unknown providers
  • Add comprehensive error handling for missing packages and interface validation
  • Include test coverage for successful loading and error scenarios
  • Maintain backward compatibility with existing built-in providers
  • Add ProviderLoader class wrapper for backward compatibility
  • Support both built-in providers (via switch) and external providers (via dynamic import)

Changes

  • ...

Related Issues

  • ...

Related PRs

  • ...

Successful Workflow Run Link

PRs don't have access to secrets so you will need to provide a link to a successful run of the workflows from your own
repo.

  • ...

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make a PR
    in the documentation repo)
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

- Create provider-loader.ts with function-based dynamic import functionality
- Update CloudRunner.setupSelectedBuildPlatform to use dynamic loader for unknown providers
- Add comprehensive error handling for missing packages and interface validation
- Include test coverage for successful loading and error scenarios
- Maintain backward compatibility with existing built-in providers
- Add ProviderLoader class wrapper for backward compatibility
- Support both built-in providers (via switch) and external providers (via dynamic import)
Copy link

coderabbitai bot commented Sep 10, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/provider-loader-dynamic-imports

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.

Copy link

Cat Gif

- Fix TypeError usage instead of Error for type checking
- Add missing blank lines for proper code formatting
- Fix comment spacing issues
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 50.46729% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.33%. Comparing base (d6cc453) to head (e6686e4).
⚠️ Report is 1 commits behind head on cloud-runner-develop.

Files with missing lines Patch % Lines
...del/cloud-runner/providers/provider-git-manager.ts 9.90% 81 Missing and 10 partials ⚠️
src/model/cloud-runner/cloud-runner.ts 30.00% 7 Missing ⚠️
...rc/model/cloud-runner/providers/provider-loader.ts 86.53% 7 Missing ⚠️
...odel/cloud-runner/providers/provider-url-parser.ts 97.87% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                    @@
##           cloud-runner-develop     #734      +/-   ##
========================================================
+ Coverage                 36.58%   37.33%   +0.75%     
========================================================
  Files                        79       83       +4     
  Lines                      3488     3699     +211     
  Branches                    767      808      +41     
========================================================
+ Hits                       1276     1381     +105     
- Misses                     2048     2144      +96     
- Partials                    164      174      +10     
Files with missing lines Coverage Δ
...d-runner/services/core/shared-workspace-locking.ts 4.52% <ø> (ø)
...el/cloud-runner/tests/fixtures/invalid-provider.ts 100.00% <100.00%> (ø)
src/model/index.ts 100.00% <100.00%> (ø)
...odel/cloud-runner/providers/provider-url-parser.ts 97.87% <97.87%> (ø)
src/model/cloud-runner/cloud-runner.ts 36.00% <30.00%> (-2.14%) ⬇️
...rc/model/cloud-runner/providers/provider-loader.ts 86.53% <86.53%> (ø)
...del/cloud-runner/providers/provider-git-manager.ts 9.90% <9.90%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Update AWS job to depend on both k8s and localstack jobs
- Remove duplicate localstack tests from k8s job (now only runs k8s tests)
- Remove unused cloud-runner-localstack job from main integrity check
- Fix AWS SDK warnings by using Uint8Array(0) instead of empty string for S3 PutObject
- Rename localstack-and-k8s job to k8s job for clarity
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
- Fixed provider-loader test failures (constructor validation, module imports)
- Fixed provider-url-parser to return consistent base URLs for GitHub sources
- Updated error handling to use TypeError consistently
- All provider-loader and provider-url-parser tests now pass
- Fixed prettier and eslint formatting issues
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
@frostebite frostebite merged commit 464a9d1 into cloud-runner-develop Sep 12, 2025
70 of 72 checks passed
@frostebite frostebite deleted the feature/provider-loader-dynamic-imports branch September 12, 2025 23:54
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