Skip to content

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

Closed

Description

@coderabbitai

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

Activity

  1. removed their assignment
    on Feb 10, 2026
  2. added a commit that references this issue on Oct 6, 2026
    7348c5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions