Skip to content

BUG/MINOR: use int64 format for memory information #117

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jmdelafe
Copy link

@jmdelafe jmdelafe commented Apr 2, 2025

It defaults to int32 when not specified, and that is not enough for modern machines with way more than 2 GB of memory.

jmdelafe added 2 commits April 2, 2025 10:01
It defaults to `int32` when no specified and that is not enough for modern machines with way more than 2 GBs
@mjuraga
Copy link
Collaborator

mjuraga commented May 9, 2025

What is the exact issue, as they are generated as int64 here: https://github.com/haproxytech/client-native/blob/master/models/info.go#L443

@jmdelafe
Copy link
Author

jmdelafe commented May 9, 2025

I found the issue when building a Data Plane API (v3) client for Go. I used https://openapi-generator.tech/ to build it.

# snippet from model_info_system_mem_info.go
// InfoSystemMemInfo struct for InfoSystemMemInfo
type InfoSystemMemInfo struct {
	DataplaneapiMemory *int32 `json:"dataplaneapi_memory,omitempty"`
	FreeMemory *int32 `json:"free_memory,omitempty"`
	TotalMemory *int32 `json:"total_memory,omitempty"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants