feat(web): add AppService 2025-05-01 for FlexConsumption function apps#5503
feat(web): add AppService 2025-05-01 for FlexConsumption function apps#5503andreidorin-oprea wants to merge 6 commits into
Conversation
|
@microsoft-github-policy-service agree |
|
Looks like a little work is needed before we can approve the workflows and do a proper review.
I'm not sure what this means. Skimming the generated types under
Our CI both enforces the presence of samples, and runs a test cycle (using a recording) to ensure they work. We've got some docs on this (see Create a sample) but will be happy to answer any questions you have. Oh, and the /testing-aso-recordings skill may be useful too. We'll also need to add a CRUD test to the
Pulling a later stable release would be preferable, yes. One final note - given we just released ASO v2.20, you'll need to tweak Thanks for the contribution, very much appreciated. |
…e import aliases A type whose name's last word is 'Storage' (e.g. FunctionsDeployment_Storage) yielded a method receiver 'storage', shadowing the storage conversion-package import alias in generated AssignProperties_To_* methods and breaking the build. CreateReceiver already qualifies reserved words and short (<=3 char) names; also qualify names that collide with the fixed conversion-package aliases (arm/storage). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The generator fix qualifies method receivers that collide with the arm/storage conversion-package import aliases. UserOwnedStorage's last word is "Storage", so its receiver changes from "storage" to "ownedStorage". Regenerated repo-wide; this is the only existing type affected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a 2025-05-01 groupModelConfiguration block (coexisting with 2022-03-01) exporting Site, ServerFarm and SitesSourcecontrol at v2.21.0. 2025-05-01 is the latest stable AppService API version and models Site.functionAppConfig (deployment/runtime/scaleAndConcurrency) needed for FlexConsumption. Labels the arm-id properties the generator flags for this version: SiteProperties (ServerFarmId, VirtualNetworkSubnetId, ManagedEnvironmentId), ServerFarmNetworkSettings.VirtualNetworkSubnetId, DefaultIdentity and FunctionsDeploymentStorageAuthentication.UserAssignedIdentityResourceId. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generated via the canonical task controller:generate-crds pipeline against the pinned azure-rest-api-specs submodule. Adds the web/v20250501 package (Site, ServerFarm, SitesSourcecontrol, plus arm/ and storage/ conversion layers, webhooks and deepcopy), repoints the 2022-03-01 storage conversions to the new v20250501 hub, and updates the generated docs/matrix/registration files. Site_Spec now exposes FunctionAppConfig (Deployment.Storage, Runtime, ScaleAndConcurrency) for FlexConsumption. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds samples/web/v20250501/{serverfarm,site,sitessourcecontrol}.yaml (mirroring
the 2022-03-01 samples) to satisfy the per-resource sample requirement, and CRUD
test skeletons copied from the 2022-03-01 tests with versions bumped.
The go-vcr recordings for both the sample suite
(Test_Web_v20250501_CreationAndDeletion) and the CRUD tests must be captured
against a live Azure subscription; they are not included here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37dda77 to
9edad39
Compare
|
CI was failing because the generated index files for the documentation were out of date - as soon as you added samples, our code generator started linking to them from the index files. I took the liberty of updating those files and pushing the change to your branch, hope that's ok. |
What
Add AppService 2025-05-01 to the
webgroup so FlexConsumption function apps can be expressed.The
webgroup is currently pinned at 2022-03-01, which predates FlexConsumption — there is no wayto set
Site.Properties.functionAppConfig(deployment storage + runtime + scale/concurrency).2025-05-01 is the latest stable AppService API version in the pinned specs and models
functionAppConfig.Change
azure-arm/web.yaml: add a 2025-05-01 block (coexisting with 2022-03-01), exportingSite/ServerFarm/SitesSourcecontrolat$supportedFrom: v2.21.0, and labelling the ARM-IDproperties the generator flags for this version:
SiteProperties.ServerFarmId,SiteProperties.VirtualNetworkSubnetId,SiteProperties.ManagedEnvironmentIdServerFarmNetworkSettings.VirtualNetworkSubnetIdDefaultIdentity.UserAssignedIdentityResourceIdFunctionsDeploymentStorageAuthentication.UserAssignedIdentityResourceId2025-05-01 uses the consolidated TypeSpec-generated
openapi.json, so its model names differ fromthe older split-swagger versions (e.g.
SitePropertiesrather thanSite_Properties_Spec).The regenerated
Site_Spec.FunctionAppConfigexposesDeployment.Storage{Authentication,Type,Value}/
Runtime{Name,Version}/ScaleAndConcurrency{AlwaysReady,InstanceMemoryMB,MaximumInstanceCount, Triggers}.How generated
Regenerated with the canonical
task controller:generate-crdspipeline against the pinnedazure-rest-api-specssubmodule (controller-gen v0.19.0, gofumpt v0.10.0). The run is idempotent —re-running produces no diff, and
verify-no-changesis green. Adding the newest version repoints theexisting 2022-03-01 storage conversions to the new 2025-05-01 hub, so those files change (as expected
for a version addition — they are not, and should not be, byte-identical).
Tests (local)
go build ./api/web/...,go vet ./internal/controllers/→ okgo test ./api/web/...(incl. v20250501 + arm + storage conversion round-trips) → okcheck_samples.py→ ok (samples present for the new version)expected because the conversion hub moves to 2025-05-01.
Samples
Added
samples/web/v20250501/{serverfarm,site,sitessourcecontrol}.yaml, mirroring the existing2022-03-01 samples.
Remaining work (needs Azure)
I don't have an Azure subscription to record against, so the following still need to be captured by
someone with cloud access:
Test_Web_v20250501_CreationAndDeletion.yaml(the samples suiteauto-discovers the new folder and needs it in replay).
internal/controllers. I've included compiling skeletons(
web_serverfarm_crud_v20250501_test.go,web_site_crud_v20250501_test.go, copied from the2022-03-01 tests with versions bumped) as a starting point; they need their recordings captured
against Azure.
Happy for a maintainer to record these, or to guide me if there's a way to run them against a test
subscription.