发布

  • [OPIK-2175] [SCRIPTS] Add local dev runner script (#3367)

    frostbyte_neo 发布于 2025-09-24 12:54:15 +00:00

    • [OPIK-2175] Add local dev runner script

    • Address GitHub PR comments: improve script robustness and process management

    • Replace hardcoded JAR version with dynamic detection and validation
    • Fix process group signaling for frontend processes
    • Replace unsafe pkill patterns with safer process cleanup
    • Add child process detection and cleanup for better reliability
    • Improve error handling for JAR file detection
    • Improve JAR selection: auto-select highest version when multiple JARs found
    • Replace error exit with smart version-based selection using sort -V
    • Add comprehensive logging for JAR discovery and selection process
    • Show all available JARs when multiple found for better debugging
    • Provide user guidance on how to override selection if needed
    • Maintains backward compatibility for single JAR scenarios
    • Fixed warnings

    • Fix mapfile compatibility: use portable array population method

    • Replace mapfile with while read loop for better Bash version compatibility
    • Use find with -print0 and read -d '' for safe filename handling
    • Maintains all functionality while supporting older Bash versions (macOS compatibility)
    • Preserves proper handling of filenames with spaces and special characters
    • Fix JAR selection: exclude sources and javadoc JARs from execution
    • Add filters to exclude sources and javadoc JAR files from selection
    • Prevents attempting to run non-executable JAR files (sources, documentation)
    • Ensures only the main application JAR is selected for execution
    • Fixes bug where Maven-generated sources.jar could be incorrectly selected
    • Improve restart experience: better handling of stale PID files
    • Change WARNING to INFO for stale PID files (normal condition during restart)
    • Add explanatory message about cleaning up stale PID files
    • Add step-by-step progress logging for restart process (1/5, 2/5, etc.)
    • Provide clearer user feedback during multi-step restart operation
    • Reduces confusion about normal cleanup operations during restart
    • Fix stale PID file handling: actually restart services instead of just cleaning up
    • Remove stale PID files and continue starting services (both FE and BE)
    • Previously would clean up stale PID files but not attempt to restart
    • Now properly handles the common case where processes die but PID files remain
    • Ensures services actually start when expected instead of silently failing
    • Fixes restart workflow when processes were terminated externally
      • Extract JAR file finding logic into find_jar_files() function
    • Add automatic backend build when no JAR file found during start
    • Improve code reusability and reduce duplication
    • Enhance developer experience with seamless workflow
    • Polishings
    下载附件