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 web display of merge trains #178

Merged
merged 17 commits into from
Aug 25, 2022
Merged

Conversation

rudymatela
Copy link

@rudymatela rudymatela commented Aug 24, 2022

Closes: #162
Closes: #163

This PR fixes the web display of merge trains:


Before merge actions (unchanged)

0-before

⬆️ Nothing changes when all PRs are waiting for review.

These PRs were approved in the following order:


Before (repository view)

before-repo

⬆️ note PR #142 (Squidward) is missing and PRs are not listed in order of approval.


After (repository view)

repo-after

⬆️ correct order, no duplicates, icons


Before (global view)

before-global

⬆️ note PR #142 (Squidward) is missing and PRs are not listed in order of approval. There is one PR that is duplicate!


After (global view)

global-after

⬆️ correct order, no duplicates, icons


@rudymatela rudymatela self-assigned this Aug 24, 2022
@rudymatela rudymatela added bug Something isn't working enhancement New feature or request OKR Objectives and Key Results train Involves Merge Trains labels Aug 24, 2022
@rudymatela rudymatela force-pushed the fix/web-display-of-trains branch from d800d1d to d213a8f Compare August 25, 2022 09:49
@rudymatela
Copy link
Author

There were changes on master. Better rebase now than later...

@rudymatela
Copy link
Author

This is ready for review.

@frank-channable or @alex-mckenna can either of you please review? (whoever is free first -- first-come-first-merged)

Copy link

@alex-mckenna alex-mckenna left a comment

Choose a reason for hiding this comment

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

I have no real comments about the code, it all looks pretty clean to me. I do wonder if now that more is displayed it's losing some clarity.

The emoji indicators are cute, but as we have more they become less obvious. The blue diamond for promoted feels odd, but I can't think of a good choice for this. Text only also has problems though, because it becomes a bit more difficult to just scan the page with your eyes... What do you think?

src/WebInterface.hs Show resolved Hide resolved
@rudymatela
Copy link
Author

rudymatela commented Aug 25, 2022

The emoji indicators are cute, but as we have more they become less obvious. The blue diamond for promoted feels odd, but I can't think of a good choice for this. Text only also has problems though, because it becomes a bit more difficult to just scan the page with your eyes... What do you think?

It does feel hard to parse in the case I presented. However in practice we expect to seldom encounter icons other than 🟡 and ❌:

  • ✔️ - this will only appear if the build of the second/third/etc PRs in the train terminates before the build of the first. This does happen in practice if builds are started almost at the same time, but usually the first PR would be about to finish building. So this should only be in place for brief window;
  • ❗ ❗ Since the start of the month, rebase failures have only happened 17 times. That's 0.68 times per day taking into account all 26 projects we track. If we open the global view and scroll to the page, we expect to see one for a few hours once every couple of days.
  • ❗ merge rejections due to wrong target branch have happened only once this month!
  • 🔷 As soon as a PR is promoted, it is deleted from the Hoff state. So I don't expect this to appear in the UI actually. I've put the option there in case we end up displaying it (by accident or by future decision). I've added a comment noting this.

The interface state shown here is a bit of an extreme example illustrating all states:

extreme

In practice we normally see something like:

  • Building
    • ... 🟡
    • ... 🟡
    • ... 🟡
  • Failed
    • ... ❌
    • ... ❌
    • ... ❌
    • ... ❌

Other icons will be more like exceptions:

  • Building
    • ... 🟡
    • ... 🟡
    • ... 🟡
  • Failed
    • ... ❌
    • ... ❌
    • ... ❗ incorrect base branch
    • ... ❌

... or only shown during a brief window:

  • Building
    • ... 🟡
    • ... ✔️
    • ... 🟡
  • Failed
    • ... ❌
    • ... ❌
    • ... ❌
    • ... ❌

PS: here are the two queries:

journalctl -u hoff -S2022-08-01 | grep "Posted.*Failed to rebase"
journalctl -u hoff -S2022-08-01 | grep "Posted.*Merge rejected:"

@alex-mckenna
Copy link

Hmm, okay. That seems reasonable then. Thanks for adding the comment 👍

PS: Good to know, you don't need sudo for those commands by the way

@alex-mckenna alex-mckenna self-requested a review August 25, 2022 13:26
@rudymatela rudymatela removed the request for review from frank-channable August 25, 2022 13:27
@rudymatela
Copy link
Author

@alex-mckenna Thanks for the review. 🎉

@OpsBotPrime merge 🚢 :shipit: 🚀

@OpsBotPrime
Copy link

Pull request approved for merge by @rudymatela, rebasing now.

Approved-by: rudymatela
Auto-deploy: false
@OpsBotPrime
Copy link

Rebased as 00dd4ad, waiting for CI …

@OpsBotPrime
Copy link

CI job 🟡 started.

@OpsBotPrime OpsBotPrime merged commit 00dd4ad into master Aug 25, 2022
@OpsBotPrime OpsBotPrime deleted the fix/web-display-of-trains branch August 25, 2022 13:35
tiesjan added a commit that referenced this pull request Oct 28, 2022
This was already done in #121, but has been reverted in #178 for unknown
reasons. It can still be argued that more recent PRs will be more likely
to be merged first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request OKR Objectives and Key Results train Involves Merge Trains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display speculative rebase failures properly on the web interface Order PRs in the web interface by approval
3 participants