Skip to content

feat: Improve multi-language scenario support, optimize CNB version detection and startup parameter configuration#2511

Merged
zzzhangqi merged 1 commit intogoodrain:mainfrom
zzzhangqi:v6.6-0228
Feb 28, 2026
Merged

feat: Improve multi-language scenario support, optimize CNB version detection and startup parameter configuration#2511
zzzhangqi merged 1 commit intogoodrain:mainfrom
zzzhangqi:v6.6-0228

Conversation

@zzzhangqi
Copy link
Collaborator

Core Optimizations

  1. Composite Language Recognition - Enhanced GetCNBVersions function to support parsing composite language formats (e.g., "dockerfile,Node.js") by checking each language component
  2. Multi-language Scene Handling - Optimized language detection logic in SourceCodeParse:
    • Improved static/dynamic runtime type judgment to support scenarios with multiple language labels
    • Optimized default port configuration logic to ensure correct port settings in multi-language scenarios
    • Adjusted startup parameter judgment conditions to ensure CNB-built images get appropriate startup parameters
  3. New Test Coverage - Added two new test files:
    • cnb_versions_test.go - Tests composite language version detection functionality
    • source_code_args_test.go - Tests startup parameter acquisition logic

Technical Details

  • Previously only supporting single language judgment, now handles multi-language scenarios using strings.Split and strings.TrimSpace
  • Maintains backward compatibility with existing language formats
  • Optimized logic works for projects containing both Dockerfile and Node.js

These changes will significantly enhance Rainbond's build and deployment experience when handling complex multi-language applications.

…etection and startup parameter configuration

Signed-off-by: Qi Zhang <smallqi1@163.com>
@zzzhangqi zzzhangqi merged commit b848708 into goodrain:main Feb 28, 2026
7 checks passed
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