oam-dev / spec

Open Application Model (OAM).
https://oam.dev
Other
3.03k stars 246 forks source link

Description in memory "in MB" should remove #271

Closed fatkun closed 4 years ago

fatkun commented 4 years ago

Expect

The default unit of memory should be bytes, eg: 1024 is 1024 bytes. The description in memory should remove "in MB"

The minimum amount of memory in MB required for running this container. The value should be a positive integer, greater than zero.

I suggest change to this

The minimum amount of memory required for running this container. The value should be a positive integer or positive integer using one of these suffixes: P, T, G, M, K.

Current

https://github.com/oam-dev/spec/blob/master/3.component_model.md#memory

Memory

Attribute Type Required Default Value Description
required string Y   The minimum amount of memory in MB required for running this container. The value should be a positive integer, greater than zero.

Memory and disk space use the notation for bytes/kilo/mega/giga/tera/peta by just using the major unit:

1024 is 1024 bytes 88K is 88 kilobytes 5M is 5 megabytes 7G is 7 gigabytes 100T is 100 terabytes 9999P is 9999 petabytes

wonderflow commented 4 years ago

Could you describe your scenario and explain why we can't use MB as the default memory unit?

fatkun commented 4 years ago

Could you describe your scenario and explain why we can't use MB as the default memory unit?

Use MB as the default memory unit is OK.

But it's conflict with the Units section.

1024 is 1024 bytes

wonderflow commented 4 years ago

Good Catch! I think this is a bug in the spec. You are welcome to send a PR.