<p>The command <code>helm history</code> prints a list of the past revisions for a release. Is there a limit to the size of this history? i.e. a number <code>n</code> such that if there are <code>n + 1</code> revisions then the first revision is no longer available? I'm aware of the <code>max</code> flag for the <code>helm history</code> command which limits the length of the list returned, so this question could be equivalently asked as: does the <code>max</code> flag have a limit for its value?</p>

<p>This is in the context of wanting to do a <code>helm rollback</code> - that command requires a revision and I want to confirm that there will never be a problem with Helm forgetting old revisions. </p>

<p>Thanks</p>

<p>Yes. It does have a limit, if you look at the <a href="https://github.com/helm/helm/blob/master/cmd/helm/history.go#L61" rel="nofollow noreferrer">source code</a> (also <a href="https://github.com/helm/helm/blob/master/pkg/helm/option.go#L474" rel="nofollow noreferrer">here</a>) you see that it's defined as an <code>int32</code> in Golang.</p>

<p>Then, if you look at the <a href="https://golang.org/pkg/builtin/#int32" rel="nofollow noreferrer"><code>int32</code></a> docs for the builtin-types you see that it's range is <code>-2147483648</code> through <code>2147483647</code>. In theory, you can specify <code>--max</code> on the helm command line as a positive number so <code>2147483647</code> would be your limit. (Surprisingly, I don't see where the absolute value for the int32 gets generated)</p>

<p>The <a href="https://github.com/helm/helm/blob/8be42bae885a04b4acc242cf420911145b32ee1c/cmd/helm/history.go#L34" rel="nofollow noreferrer">releaseInfo</a> structure has a memory footprint, so if you have a lot of releases you will run into a limit depending on how much memory you have on your system.</p>
