Best Practices
Use these patterns to stay aligned with the current product contract.
Runtime Selection
-
Load runtime options from
GET /api/v1/runtimesinstead of hardcoding them in the frontend. -
Treat
supportedas the only valid source for new draft selections. -
Keep
pubspec.yamlenvironment.sdkexplicit and aligned with the selected runtime.
Artifact Handling
-
Upload
main.dart,Dockerfile, andpubspec.yamlbefore deployment. -
Pass explicit artifact sources into the deployment request instead of assuming the function row is enough.
-
Keep the staged storage paths so retries do not require reauthoring the draft.
Identity And Secrets
-
Prefer project-scoped workload identity or OIDC over long-lived cloud keys.
-
Treat provider onboarding as two checks: identity trust and artifact storage access.
-
For GCP, send the strict split-field WIF payload and let the backend normalize the audience internally.
-
Scope service accounts and roles to the minimum storage and deployment permissions needed.
-
For Azure, plan for both management-plane RBAC and Blob data-plane RBAC.
-
For AWS, document role trust and S3 bucket credentials separately until the storage flow is fully OIDC-based.