Skip to content
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

Logging short lived allocations #12

Open
renesnezic opened this issue Nov 26, 2024 · 0 comments
Open

Logging short lived allocations #12

renesnezic opened this issue Nov 26, 2024 · 0 comments

Comments

@renesnezic
Copy link

Hi,

looking at alloc.go, it contains a bit of code that checks if allocation is running:

if allocStub.ClientStatus != "running" {
	app.log.Debug("ignoring alloc since it's not running", "name", allocStub.Name, "status", allocStub.ClientStatus)
	continue
}

Is there a specific reason why this if statement exists?

If removing this statement would not break the code in any way I would like to suggest either putting this if statement under an optional flag (either ommit or keep) or removing it entirely.

The reason for this is that you would still want to log allocations that completed/failed before the alloc fetch/refresh happened. I know the default refresh is 10s but this could be a lot larger number for some. In case you would run a lot of short lived batch jobs (creating different allocations) or jobs failing often after starting and the fetch allocations wouldn't trigger while it was running, you would be missing all of these logs.

Any considerations?

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

No branches or pull requests

1 participant