Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kenny/serial number as filename #5

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

kennethdsheridan
Copy link
Collaborator

Pull Request: Use chassis serial number with hw_report suffix for configuration file

Description

Changes the configuration output filename from a static server_config.toml to a dynamic
<chassis_serial_number>_hw_report.toml format. This helps identify which physical server
the configuration belongs to and indicates the file's purpose.

Changes Made

  • Added filename sanitization function to handle invalid characters in serial numbers
  • Changed filename format to include "_hw_report" suffix
  • Fixed typo in sanitize function name
  • Updated user feedback messages to show actual filename being used

Example

Before: server_config.toml
After: ABC123DEF456_hw_report.toml

Testing Done

  • Tested with various chassis serial numbers including:
    • Standard alphanumeric serials
    • Serials with special characters
    • Empty/unknown serial numbers
  • Verified file creation and naming across different systems

Related Issues

Closes Linear ticket: https://linear.app/sfcompute/issue/ENG-920/modify-filename-of-hardware-report-output

Checklist

  • Code follows project style guidelines
  • Comments added for new functions
  • Error handling covers edge cases
  • Documentation updated
  • Tested on multiple systems

Instead of using a static filename, the server configuration is now saved
using the server's chassis serial number. This helps identify which
configuration belongs to which physical server and prevents accidental
overwrites when collecting data from multiple servers.

Changes:
- Added filename sanitization function to handle invalid characters
- Replaced static server_config.toml with dynamic {serial_number}.toml
- Updated user feedback messages to show actual filename being used

Example output: ABC123DEF456.toml instead of server_config.toml
Instead of using a static filename, the server configuration is now saved
using the server's chassis serial number. This helps identify which
configuration belongs to which physical server and prevents accidental
overwrites when collecting data from multiple servers.

Changes:
- Added filename sanitization function to handle invalid characters
- Replaced static server_config.toml with dynamic {serial_number}.toml
- Updated user feedback messages to show actual filename being used

Example output: ABC123DEF456.toml instead of server_config.toml
Instead of using a static filename, the server configuration is now saved
using the server's chassis serial number. This helps identify which
configuration belongs to which physical server and prevents accidental
overwrites when collecting data from multiple servers.

Changes:
- Added filename sanitization function to handle invalid characters
- Replaced static server_config.toml with dynamic {serial_number}.toml
- Updated user feedback messages to show actual filename being used

Example output: ABC123DEF456.toml instead of server_config.toml
@kennethdsheridan kennethdsheridan added the enhancement New feature or request label Nov 18, 2024
@kennethdsheridan kennethdsheridan self-assigned this Nov 18, 2024
@kennethdsheridan kennethdsheridan merged commit badcb1a into main Nov 18, 2024
1 check passed
@kennethdsheridan kennethdsheridan deleted the kenny/serial_number_as_filename branch November 18, 2024 04:09
jeztek pushed a commit that referenced this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant