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

Fix chart with deleted builds #123

Closed
wants to merge 2 commits into from
Closed

Conversation

il--ya
Copy link

@il--ya il--ya commented Aug 16, 2019

When builds are deleted, there are gaps in build numbers, and chart doesn't show anything before deleted build. This causes JENKINS-52711.
I haven't tested this fix, as I am stuck at the moment with out-of-date Jenkins version, but I think it should work.

When builds are deleted, there *are* gaps in build numbers, and chart doesn't show anything before deleted build. Major pain.
I haven't tested this fix, but I think it should work..
@il--ya
Copy link
Author

il--ya commented Aug 21, 2019

ping @jglick @dwnusbaum

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? Likely possible to write a test for this using RunLoadCounter.

@il--ya
Copy link
Author

il--ya commented Aug 21, 2019

I don't think tests update is necessary for such a simple bug fix. And I don't have capacity to do that anyway. @jglick do you see any particular reason for concern with this change?

@zbynek
Copy link
Contributor

zbynek commented Aug 21, 2019

@il--ya are you sure this won't load additional builds? Like if loaded builds contains 1 and 999, this may load builds 998, 997, ...

Even though I'm not sure how realistic that scenario is, it may be safer to put loaded builds to a TreeSet and get the previous build as loadedBuildsTreeSet == null ? current - 1 : loadedBuildsTreeSet.lower(current)

@jglick
Copy link
Member

jglick commented Aug 21, 2019

do you see any particular reason for concern with this change?

Having written the condition being patched, yes I do. It is not obvious to me that this is right, especially if you say you have not tested it interactively either. This is a very widely used plugin, so any regression would likely be worse than the reported limitation. Would need to spend some time refamiliarizing myself with this.

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

Successfully merging this pull request may close these issues.

3 participants