feat: add per-function memory parameter#643
Conversation
✅ Deploy Preview for open-api ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughSummary by CodeRabbitNew Features
WalkthroughThis PR introduces support for function memory allocation configuration. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
swagger.yml (1)
5558-5561: ⚡ Quick winConsider adding validation constraints for memory allocation.
The
memoryfield has no minimum, maximum, or format constraints. Function memory allocations typically have platform-specific limits and increment requirements. Consider adding validation to prevent invalid values from being accepted by the API.📋 Suggested validation constraints
memory: type: integer + format: int64 + minimum: 128 + maximum: 10240 description: | The function's memory allocation in MB.Note: Adjust the minimum and maximum values based on your platform's actual constraints.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@swagger.yml` around lines 5558 - 5561, The OpenAPI schema’s memory property lacks validation; update the memory field in swagger.yml (the memory schema under the function spec) to include numeric constraints such as minimum (e.g. 128), maximum (e.g. 32768), and an increment rule (use multipleOf for MB granularity like 64) or an enum of allowed values to enforce platform limits and increments; ensure the description is updated to mention these constraints so the API rejects out-of-range or non-granular allocations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@swagger.yml`:
- Around line 5558-5561: The OpenAPI schema’s memory property lacks validation;
update the memory field in swagger.yml (the memory schema under the function
spec) to include numeric constraints such as minimum (e.g. 128), maximum (e.g.
32768), and an increment rule (use multipleOf for MB granularity like 64) or an
enum of allowed values to enforce platform limits and increments; ensure the
description is updated to mention these constraints so the API rejects
out-of-range or non-granular allocations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6e0eb13b-4690-4ef9-a472-b43d9ae78588
📒 Files selected for processing (4)
go/models/function_config.gogo/porcelain/deploy.gogo/porcelain/functions_manifest.goswagger.yml
🤖 I have created a release *beep* *boop* --- ## [2.55.0](v2.54.0...v2.55.0) (2026-05-19) ### Features * add per-function `memory` parameter ([#643](#643)) ([1764a43](1764a43)) * add per-function `vcpu` parameter ([#645](#645)) ([e55927e](e55927e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com>
No description provided.