I am using gradle and versioning and for this I need a tag like v0.1.
I forgot this for a particular project and the test runs, fails... I realise I need to add the tag. Job runs immediatly again and it succeeds. However the badge still shows an error?
I haven't taken a closer look at the code, but previously we show the compound status of all pipelines, and if that's the case this would be somehow expected.
However even if that's the case, this is still confusing because it's showing as if the latest pipeline. And indeed we changed to be showing latest pipeline in some cases. I am not sure if we're still showing compound status somewhere.
ok, this is definitely confusing and we should change it. The related code was in app/views/projects/commit/_commit_box.html.haml, I'll paste the code on the bottom.
Here in the widget the first icon was showing the status of the compound status, which is failed because one of the pipelines was failed. Therefore we're saying that the "pipeline" failed, which is not the case, because the pipeline actually succeeded.
We should either:
Always show the status for the pipeline, therefore discarding compound status.
Or do the above, and also make compound status clear instead of confusing.
Or remove pipeline status here, and always show the compound status.
(1) would be the easiest, but we would be removing information (which we already did in some places)
(2) would require some UX thoughts.
(3) would also require UX thoughts, and it could confuse the users because the concept was confusing from the beginning, and we also already stopped using it in some places.
Below was the code. We could just change @commit.status to @commit.latest_pipeline.status to do (1)
I am also thinking that perhaps we shouldn't show the latest pipeline in the box, because it's already there on the top of pipeline list. However there's also a "Changes" tab, which is the default, and of course we would want to know the pipeline status on that page.
I think the main issue is that we're not clear what is a compound status yet, and we're also not explaining what it is clearly yet.
I believe it's very simple to fix it, we just need to decide what we want to do.
Compound status still has some value (as you can see that two pipelines are different, and we want to know the summary in some way. Of course, after we have multiple pipelines (#28592 (moved)?), then we probably won't care about compound status anymore, or we could say that would be the new compound status), but we can't confuse the users. Actually this is very similar to #20560 (closed). The difference is that we have much more space for the widget, so we could maybe show both information, if that fits and we care.
Compound status, as currently used, was never a good thing. It's too damn confusing. We have an issue somewhere to treat pipelines with different inputs as distinct pipelines. That lets us stop compounding status, at least at this level. Pipeline status badges might still need a compound status (although at least they can distinguish different refs), and merge requests probably need a compound status to determine merge-ability. But in many cases, we'd be displaying all related, distinct pipelines individually.
Proposal: Until we can treat multiple, distinct pipelines in a first-class way, let's stop half-assing it and just look at the latest pipeline instead. So, option 1 from @godfat's list.
Since we added a pipeline mini graph to commit status page, compound status indeed conflicts with it. I still think that compound status might be important, but we have to resolve this bug first. I suppose that two options that make most sense are reporting only latest pipeline status or showing multiple mini graphs. The latter may be quite complex.
I wonder how this relates to our plan of introducing multi-project pipelines / multiple pipelines and https://gitlab.com/gitlab-org/gitlab-ce/issues/25734 which is scheduled for %9.2. Once we remove compound status, we are not able to report a commit status based on deterministic pipelines group, because compound status is required for that. What do you think @markpundsack?
One solution might be reporting only latest pipeline status for the commit (which seems to be most favored solution here), but to tackle this problem for cross-project pipelines / mutliple pipelines differently, because the right solution might be completely different when cross-projects pipelines are implemented. I wonder if we have any data about how many users / customers depend on a compound status.
Medium term, let's solve it with https://gitlab.com/gitlab-org/gitlab-ce/issues/25734. Ignore multiple pipelines as that's not committed. Cross project pipelines will happen, but may not impact this for a while. First few iterations won't affect status.