NVIDIA / NVIDIA/cloudai

Improve File installation check to handle binary files and content-mismatch errors

Open
#782 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
99
Forks
62
Avg merge
6d 12h
Merged PRs (30d)
17

Description

Description

The current implementation of is_installed_one for File items in both Slurm and Kubernetes installers uses read_text() to compare file contents, which:

  1. Raises UnicodeDecodeError for binary files
  2. Returns misleading error messages when a file exists but contents differ (says 'does not exist')

Proposed Enhancement

  • Use read_bytes() instead of read_text() for binary-safe comparison
  • Distinguish between 'file does not exist' and 'file exists but contents differ' in error messages

References

Affected Files

  • src/cloudai/systems/kubernetes/kubernetes_installer.py
  • src/cloudai/systems/slurm/slurm_installer.py

/cc @amaslenn

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with is_installed_one in src/cloudai/systems/kubernetes/kubernetes_installer.py and src/cloudai/systems/slurm/slurm_installer.py, then review the comparison and error-reporting paths. The work is done when binary files can be checked without decoding errors and the messages distinguish missing files from content mismatches in both installers.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, python
Domain
infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.