Skip to content

AttributeError: 'AzureStorageJobTaskDetails' object has no attribute 'start_time' when checking Azure Files backup job status #31946

@ninja-shreyash

Description

@ninja-shreyash

Describe the bug

When checking the status of an Azure Files backup job using az backup job show, the command fails with an AttributeError indicating that 'AzureStorageJobTaskDetails' object has no attribute 'start_time'.

Related command

az backup job show

Errors

AttributeError: 'AzureStorageJobTaskDetails' object has no attribute 'start_time'.

Full traceback:
File "/opt/homebrew/Cellar/azure-cli/2.76.0/libexec/lib/python3.12/site-packag
es/azure/cli/command_modules/backup/custom_help.py", line 341, in
replace_min_value_in_subtask
if task.start_time == datetime.min:
^^^^^^^^^^^^^^^
AttributeError: 'AzureStorageJobTaskDetails' object has no attribute
'start_time'

Issue script & Debug output

The error occurs when monitoring Azure Files backup jobs. The replace_min_value_in_subtask function assumes all task objects have start_time attribute, but AzureStorageJobTaskDetails doesn't.

Expected behavior

The command should successfully return the backup job status for Azure Files without AttributeError.

Environment Summary

macOS, azure-cli 2.76.0, Python 3.12 (Homebrew installation)

azure-cli 2.76.0

core 2.76.0
telemetry 1.1.0

Extensions:
dataprotection 1.6.0
k8s-extension 1.6.7

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.76.0/libexec/bin/python'
Config directory '/Users/shreyashvaish/.azure'
Extensions directory '/Users/shreyashvaish/.azure/cliextensions'

Python (Darwin) 3.12.11 (main, Jun 3 2025, 15:41:47) [Clang 17.0.0 (clang-1700.0.13.3)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

The code at line 341 in custom_help.py needs to check if the attribute exists before accessing it: if hasattr(task, 'start_time') and task.start_time == datetime.min:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botRecovery Services Backupaz backupService AttentionThis issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions