Skip to content

fix(azure_postgresql_flexible_server): skip configurations hydrate when server is Stopping/Stopped/Updating - #1015

Open
hakuno wants to merge 1 commit into
turbot:mainfrom
hakuno:fix/postgresql-flexible-server-stopped-state
Open

fix(azure_postgresql_flexible_server): skip configurations hydrate when server is Stopping/Stopped/Updating#1015
hakuno wants to merge 1 commit into
turbot:mainfrom
hakuno:fix/postgresql-flexible-server-stopped-state

Conversation

@hakuno

@hakuno hakuno commented Aug 20, 2026

Copy link
Copy Markdown

Problem

azure_postgresql_flexible_server's flexible_server_configurations column hydrates via listPostgreSQLFlexibleServersConfigurations, which calls the ConfigurationsClient.NewListByServerPager API unconditionally. When the flexible server is in a Stopped (or Stopping/Updating) state, Azure rejects this call with a 400 ServerStoppedError, which aborts the entire table scan instead of just that row/column.

azure_mysql_flexible_server's equivalent hydrate (listMySQLFlexibleServersConfigurations) already guards against this for MySQL (Azure returns 409 ServerUnavailableForOperation there) by skipping the API call when server.Properties.State is Stopping, Stopped, or Updating. This PR applies the same guard to the PostgreSQL flexible server table.

Change

  • Add slices import.
  • In listPostgreSQLFlexibleServersConfigurations, return nil, nil early when server.Properties.State is one of Stopping, Stopped, Updating, before calling the Configurations API - mirroring the existing MySQL pattern.

Notes

…tions hydrate when server is Stopping/Stopped/Updating

Mirrors the existing guard in listMySQLFlexibleServersConfigurations.
Azure rejects GET .../configurations with 400 ServerStoppedError while
the flexible server is not Ready, aborting the whole table scan instead
of just the row.
@hakuno hakuno changed the title test fix(azure_postgresql_flexible_server): skip configurations hydrate when server is Stopping/Stopped/Updating Aug 20, 2026
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