Repository navigation
feat(azure): summary counts for database encryption, AKS autoscaling and node OS patching - #380
bruceweygandt wants to merge 4 commits into
Conversation
…and node OS patching
…ew fields in the SDK surface test
Controgon
left a comment
There was a problem hiding this comment.
The change is small and additive. The azurekeyvault comparison is safe because model_attr unwraps the SDK enums, and unknown values are counted separately. CI is green. I have a few comments. None of them blocks the merge.
1. One SDK surface row fails on the oldest SDK version that the pin allows
tests/test_azure_sdk_surface.py (the ServerProperties row), requirements.txt:82
Problem. The new row checks azure.mgmt.postgresqlflexibleservers.models.ServerProperties. That class exists in version 3.0.0, which CI installs. It does not exist in 2.0.0, which >=2.0.0,<4 also allows.
Why this is a problem. On a 2.0.0 environment, the test fails with AttributeError, but the fetcher works: in 2.0.0, Server maps data_encryption to properties.dataEncryption. The failure is not real.
Fix. Raise the floor to >=3.0.0, or let the row accept Server.data_encryption when ServerProperties is not present.
2. Wording for the Unmanaged node OS channel
fetchers/azure/aks_cluster_configuration/fetcher.yaml (node_os_auto_upgrade_clusters)
The count is correct for node images. But on Ubuntu nodes, Unmanaged still installs OS security updates every night, without an automatic reboot. A reader may think that Unmanaged clusters get no patches. Please consider a count for each channel, or change the text to "replace node images automatically".
3. Smaller items
autoscaling_agent_pools. A cluster that uses node auto-provisioning scales without the cluster autoscaler on its pools, so it counts as 0. Please mention this in the field description.- KSIs. The
KSI-SVC-SINcomments on the PostgreSQL and MySQL fetchers still mention transport only. Other Azure fetchers use KSI-SVC-SIN for customer-managed key encryption. The autoscaling count has no KSI. Please update the comments or the list. - Follow-up, not for this PR. When the server list cannot be read, the PostgreSQL and MySQL summaries show 0 instead of null. This was already the case on
main. Nowdata_encryption_unknown_servers: 0can look like "no unknown servers". A follow-up could make these summaries null, as the AKS summary already is.
…unt Unmanaged node OS apart, clarify autoscaling and KSIs
|
Thanks. All items are addressed in the latest commit. 1. SDK surface row on postgresqlflexibleservers 2.0.0. Confirmed: 2.0.0 has no 2. Unmanaged wording. Good catch. 3. Smaller items
Tests: the affected suites pass (965 passed, including the contract tests). Ruff is clean on the changed files. |
Controgon
left a comment
There was a problem hiding this comment.
Approve. Everything from the first review is handled.
Fixed
-
- SDK surface row: fixed.
ServerProperties|Serverpasses on 2.0.0 as well as 3.0.0. I ran it on a 2.0.0 environment, where it failed before.
- SDK surface row: fixed.
-
- Unmanaged wording: fixed. The
node_os_auto_upgrade_clustersline now says what it counts. The newnode_os_unmanaged_clusterskeeps Unmanaged out of both "automatic" and "unpatched", and it is tested, including null when the cluster list can't be read.
- Unmanaged wording: fixed. The
- Node auto-provisioning in the
autoscaling_agent_poolsline, the KSI-SVC-SIN comments, and KSI-CNA-OFA for the autoscaler count: fixed. - Null summaries when the server list can't be read: these were already on
mainbefore this PR, and a separate follow-up is the right place for them.
Summary
Adds summary counts to three existing Azure fetchers so Validators can judge three Solution Capabilities that had no count to read. Every addition is additive; existing fields keep their meanings.
azure_postgresql_configurationcustomer_managed_key_servers,data_encryption_unknown_serversazure_mysql_configurationcustomer_managed_key_servers,data_encryption_unknown_serversazure_aks_cluster_configurationautoscaling_agent_pools,node_os_auto_upgrade_clusters,node_os_upgrade_channel_unknown_clustersMinor version bumps, following the 0.4.0 → 0.5.0 precedent for additive AKS output.
How each is read
data_encryption.type(AzureKeyVaultorSystemManaged). A server for which Azure returns no type counts indata_encryption_unknown_servers, never as platform-managed.enable_auto_scalingtrue.node_os_upgrade_channelisSecurityPatchorNodeImage, which patch node images on their own. This is separate from the existingauto_upgrade_clusters, which is about Kubernetes version upgrades. A missing channel is counted apart, never as automatic.summarize(None)derives its keys fromsummarize([]).Testing
tests/test_azure_config_summary_counts.py(5 tests) runs in the core test job without the Azure SDKs: the fetchers read models throughmodel_attr, so plain attribute objects stand in for SDK models and the projection code still runs. It covers the key source, the unknown counts, the AKS counts and the null-when-unread rule.tests/test_azure_sdk_surface.pygains sixREQUIRED_MODEL_FIELDSrows, run by the azure-sdk job, so an SDK that renamed one of these fields fails CI instead of reading every server as unknown. PostgreSQL'sdata_encryptionis pinned onServerProperties, where the TypeSpec SDK declares it before flattening it ontoServer.test_contracts.py,test_category_requires.pyand all Azure and Entra tests pass (6,357). No new dependencies.summarize: 1 cluster with node OS channelNodeImageand 3 of 4 node pools autoscaling.