Skip to content

fix(common): undefined log variable in (+2 more) - #92

Closed
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/common-assorted-f5db319e
Closed

fix(common): undefined log variable in (+2 more)#92
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/common-assorted-f5db319e

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

This PR addresses 3 issues in bobber/lib/analysis/common.py.

Fix 1

fix: undefined log variable in fio_command_details error

Fix: Replace:

    if len(commands) < 2:
        raise ValueError(f'FIO command not found in {log} file!')

with:

    if len(commands) < 2:
        raise ValueError('FIO command not found in log contents!')

Fix 2

fix: catch IndexError when system count pattern is missing

Fix: Replace:

    try:
        systems = re.findall(r'systems_\d+_', log)
        systems = re.findall(r'\d+', systems[0])
        return int(systems[0])
    except ValueError:
        return None

with:

    try:
        systems = re.findall(r'systems_\d+_', log)
        systems = re.findall(r'\d+', systems[0])
        return int(systems[0])
    except (IndexError, ValueError):
        return None

Fix 3

fix: handle unrecognized units in _convert_to_bytes

Fix: Replace:

    elif 'k' in value.lower():
        return number * 1e3

with:

    elif 'k' in value.lower():
        return number * 1e3
    raise ValueError(f'Unknown unit in value: {value}')

Files changed

  • bobber/lib/analysis/common.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 28, 2026 00:36
@andrewwhitecdw

Copy link
Copy Markdown
Author

Closing this sweep-generated PR: sole commit is missing a valid Signed-off-by trailer. It does not meet the sweep requirements (single signed-off commit).

@andrewwhitecdw
andrewwhitecdw force-pushed the bugfix/common-assorted-f5db319e branch 3 times, most recently from 96c5e36 to 91b80a3 Compare August 24, 2026 18:16
Signed-off-by: Andrew White <andrewwhitecdw@users.noreply.github.com>
@andrewwhitecdw
andrewwhitecdw force-pushed the bugfix/common-assorted-f5db319e branch from 91b80a3 to b184c39 Compare August 24, 2026 18:18
@andrewwhitecdw

Copy link
Copy Markdown
Author

Closing this upstream PR — it was opened by automation without the required sweep-approved review and therefore does not comply with the sweep policy. A replacement fork-local PR is open at andrewwhitecdw#10 for review.

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.

1 participant