Skip to content

az postgres flexible-server server-logs list crashes with AttributeError on CapturedLog #33090

@0x91

Description

@0x91

Describe the bug

az postgres flexible-server server-logs list crashes with an AttributeError when listing log files.

Command

az postgres flexible-server server-logs list \
  --server-name <server> \
  --resource-group <rg>

Error

File ".../azure/cli/command_modules/postgresql/flexible_server_custom_postgres.py", line 1317, in flexible_server_list_log_files_with_filter
    del f.created_time
        ^^^^^^^^^^^^^^
AttributeError: 'CapturedLog' object has no attribute 'created_time'

Environment

  • az version: 2.84.0 (latest via Homebrew on macOS)
  • macOS (Darwin 25.3.0, arm64)
  • Server type: Azure Database for PostgreSQL Flexible Server

Root cause

It appears flexible_server_list_log_files_with_filter at line 1317 tries to del f.created_time on a CapturedLog object that doesn't have a created_time attribute. The SDK model may have changed the attribute name or removed it.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions