New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory options for some functions #3924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor comment, lgtm.
src/gcp/cloudfunctionsv2.ts
Outdated
@@ -163,6 +163,40 @@ interface GenerateUploadUrlResponse { | |||
storageSource: StorageSource; | |||
} | |||
|
|||
// AvailableMemory suffixes and their byte count. | |||
type MemoryUnit = "" | "k" | "M" | "G" | "Mi" | "Gi"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we skipping Ki
b/c we don't think it's a popular choice? It looks like Cloud Run supports several more units, and our code will fail if the customer decides to use a unit not in this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the GCF proto, it looks like Ki
is not a supported unit at this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can just extend this to support more than GCF supports pretty easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Fix memory options for some functions * Add additional units for futureproofing
For context, see alpha tester report