Skip to content

Conversation

@rebel-mskim
Copy link

Improve Driver Version Parsing and Production-Ready Dockerfile

Overview

This PR addresses a critical runtime panic issue in driver version parsing

Changes

Fix Driver Version Parsing Logic

  • Problem: Application panicked with range end index 2 out of range for slice of length 1 when driver version format was 2.0.0 instead of expected "semver-revision" format
  • Solution: Replace unsafe array destructuring with safe split_once() method

Copy link

Copilot AI left a 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 fixes a critical runtime panic in driver version parsing when the version format doesn't include a hyphen separator (e.g., "2.0.0" vs expected "semver-revision" format). The solution replaces unsafe array destructuring with safe split_once() method and adds production-ready Docker configuration.

  • Replace unsafe array destructuring with safe split_once() for driver version parsing
  • Update application version from 0.1.1 to v0.1.3 across deployment configurations
  • Add production-ready Dockerfile with Red Hat UBI base, non-root user, and proper labeling

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/rbln.rs Fixes driver version parsing logic to handle versions without hyphens safely
deployments/static/npu-feature-discovery-daemonset.yaml Updates version labels and adds runAsUser security context
Makefile Adds Docker build automation with version validation
LICENSE Adds comprehensive software user license agreement
Dockerfile Migrates to production-ready Red Hat UBI base with security enhancements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rebel-mskim rebel-mskim force-pushed the feat/improve-driver-version-parsing branch from 8138968 to a8c6812 Compare September 9, 2025 04:28
Copy link

@rebel-heesu rebel-heesu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rebel-mskim rebel-mskim force-pushed the feat/improve-driver-version-parsing branch from a8c6812 to 42d3604 Compare September 10, 2025 02:48
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.

2 participants