Changelog

  • IMP: PR descriptions are now markdown-rendered in the dashboard

    Previously the raw text was displayed. The main advantage of rendering, aside
    from not splatting huge links in the middle of the thing, is that we can
    autolink odoo tasks if they're of a pattern we recognize. Some support has
    also been added for github's references to mirror GFM rendering.

    This would be a lot less useful (and in fact pretty much useless) if we could
    use github's built-in references to external resources
    sadly that seems to not be available on our plan.

2023-12

  • ADD: projects now know how to prioritise new PRs over splits

    While this likely has relatively low utility, we'll look at how it performs
    during periods of high throughput.

  • ADD: stagings can now be disabled on a per-project basis

    Currently stopping stagings requires stopping the staging cron(s), which causes
    several issues:

    • the staging cron runs very often, so it can be difficult to find a window to
      deactivate it (as the cron runner acquires an exclusive lock on the cron)
    • the staging cron is global, so it does not disable staging only on the
      problematic project (to say nothing of branch) but on all of them

    The latter is not currently a huge issue as only one of the mergebot-tracked
    projects is ultra active (spreadsheet activity is on the order of a few
    single-PR stagings a day), but the former is really annoying when trying to
    stop runaway broken stagings.

  • CHG: complete rework of the commands system

    fun is dead: strict commands parsing

    Historically the bots would apply whatever looked like a command and ignore the
    rest. This led to people sending novels to the bot, then being surprised the bot
    found a command in the mess.

    The bots now ignore all lines which contain any non-command. Example:

    @robodoo r+ when green darling

    Previously, the bot would apply the r+ and ignore the rest. Now the bot will
    ignore everything and reply with

    unknown command "when"

    fwbot is dead

    The mergebot (@robodoo) is now responsible for the old fwbot commands:

    • close, ignore, up to, ... work as they ever did, just with robodoo
    • robodoo r+ now approves the parents if the current PR a forward port
    • a specific PR can be approved even in forward ports by providing its number
      e.g. robodoo r=45328 will approve just PR 45328, if that is the PR the
      comment is being posted on or one of its parents
    • the approval of forward ports won't skip over un-approvable PRs anymore
    • the rights of the original author have been restricted slightly: they can
      only approve the direct descendents of merged PRs, so if one of the parents
      has been modified and is not merged yet, the original author can't approve,
      nor can they approve the modified PR, or a conflicting PR which has to get
      fixed (?)

    no more p=

    The old priorities command was a tangle of multiple concerns, not all of which
    were always desired or applicable. These tangles have been split along their
    various axis.

    listing

    The new commands are:

    • default, sets the staging priority back to the default
    • priority, sets the staging priority to elevated, on staging these PRs are
      staged first, then the normal PRs are added
    • alone, sets the staging priority to high, these PRs are staged before
      considering splits, and only alone PRs are staged together even if the batch
      is not full
    • fw=default, processes forward ports normally
    • fw=skipci, once the current PR has been merged creates all the forward ports
      without waiting for each to have valid statuses
    • fw=skipmerge, immediately create all forward ports even if the base pull
      request has not even been merged yet
    • skipchecks, makes the entire batch (target PR and any linked PR) immediately
      ready, bypassing statuses and reviews
    • cancel, cancels the staging on the target branch, if any

2023-10

  • IMP: allow setting forward-port limits after the source pull request has been merged

    Should now be possible to both extend and retract the forward port limit
    afterwards, though obviously no shorter than the current tip of the forward
    port sequence. One limitation is that forward ports being created can't be
    stopped so there might be some windows where trying to set the limit to the
    current tip will fail (because it's in the process of being forward-ported to
    the next branch).

2023-08

  • ADD: stagings reverse index (from commits)

    Finding out the commits from a staging is not great but it's easy enough, the
    reverse was difficult and very inefficient. Splat out the "heads" JSON field
    into two join tables, and provide both ORM methods and a JSON endpoint to
    lookup stagings based on their commits.

  • IMP: added quick jump from staging to PR in the backend

    In the backend, going through the batches to reach a PR is really not
    convenient, directly displaying both github URL and frontend URL for each PR
    makes jumping around much easier.

  • IMP: optimize home page

    An unnecessary deopt and a few opportunities were found and fixed in the home
    page / main dashboard, a few improvements have been implemented which should
    significantly lower the number of SQL queries and the time needed to generate
    the page.

  • IMP: outstandings page

    • increased time-before-outstanding from 3 to 7 days, as 3~4 days is common in
      normal operations, especially when merging from very low branches were
      forward-porting may take a while
    • improved performances by optimising fetching & filtering
    • added counts to the main listing for clarity (instead of hiding them in a
      popover)
    • added the original authors for the outstanding forward ports
    • added ability to filter by team, if such are configured

2022-10

  • ADD: enable "squash" merge mode for multi-commit PRs

    After 4 years, the world is apparently ready. Squashing tries to preserve
    authorship, depending on the number of authors (and committers) on the PR.
    Squashing does not preserve any part of existing commit messages.

  • FIX: creation of forward-port PRs for new (freeze) branches in edge cases

  • FIX: lock in statuses at the end of a staging

    The statuses of a staging are computed dynamically. Because github associates
    statuses with commits, rebuilding a staging (partially or completely) or using
    one of its commits for a branch could lead to the statuses becoming inconsistent
    with the staging e.g. all-green statuses while the staging had failed.

    By locking in the status at the end of the staging, the dashboard is less
    confusing and more consistent, and post-mortem analysis (e.g. of staging
    failures) easier.

  • FIX: stop pinging the forwardbot on forward-port PRs

    Also ping the reviewer of the original PR.

  • IMP: make timestamps and batch labels selectable

    In the list of stagings for a branch, the timestamps and batch labels were not
    selectable, which was inconvenent for cross-referencing and copy/pasting. They
    should now be selectable.

  • REV: don't automatically close PRs when their branch is disabled

    Turns out that breaks FW chains and makes existing forward ports harder to
    manage, so revert that bit. Do keep sending a message on the PR tho.

2022-06

  • ADD: automated provisioning of accounts from odoo.com

  • FIX: correctly handle PR empty PR descriptions

    Github's webhook for this case are weird, and weren't handled correctly,
    updating a PR's description to or from empty might be mishandled.

  • FIX: properly unstage pull requests when they're retargeted (base branch is changed)

  • IMP: automatically close PRs when their target branch is deactivated

    Leave a message on the PRs to explain, such PRs should also be reopen-able if
    the users wants to retarget them.

  • IMP: flag detached PRs in their dashboard

  • IMP: notifications when reopening a closed forward-port (e.g. indicate that they're detached)

  • IMP: review pinging (@-notification) of users by the mergebot and forwardbot

    The bots should more consistently ping users when they need some sort of action to proceed.

  • IMP: show current alerts (disabled crons) on the PR pages

  • IMP: use the diff3 conflict style, should make forward port conflicts clearer and easier to fix

  • IMP: various UI items

    • more clearly differentiate between "pending" and "unknown" statuses on stagings
    • fix "outstanding forward ports" count
    • add date of staging last modification (= success / failure instant)
    • correctly retrieve and include fast-forward and unstaging reasons
    • show the warnings banner (e.g. staging disabled) on the PR pages, as not all
      users routinely visit the main dashboard

2021-10

  • ADD: a changelog feature you can now see here

  • ADD: squash-mode, currently only for single-commit PRs to make it easier to edit commit messages when they're incorrectly formatted

  • CHG: reject reviewers without an email configured, the fallback to @users.noreply.github.com turns out to be confusing

  • FIX: allow delegate reviewers on forward ports to approve the followups, it worked fine for delegates on the original pull request but a delegation on a forward port would only work for that specific PR (note: only works if the followups don't already exist)

  • FIX: correctly display the error message when a PR is in error

  • FIX: don't rewrite commit titles, this can lead to odd effects when it's incorrectly formatted and interpreted as a pseudo-header

  • FIX: don't trigger an error message when using fw-bot r+ and some of the PRs were already approved

  • FIX: ensure the merge message matches the up-to-date PR descriptions, the two could desync if we'd missed an update

  • FIX: rare condition where updating a forwardport would then require all followups to be individually approved

  • IMP: add reviewer and direct link to backend in PR pages

  • IMP: allow delegate reviewers to set merge methods

  • IMP: layout and features of the "outstanding forward port" page, show the oldest-merged PRs first and allow filtering by reviewer

2021-09

  • ADD: better localisation of conflicts in multi-PR commits, list all the commits in the comment and add an arrow pointing to the one which broke

  • ADD: list of outstanding forward-ports

  • ADD: mergebot should not accept merging draft PR anymore

  • ADD: refuse merging commits without an email set, this is mostly to be used by the forwardport-bot

  • ADD: when integrating a PR via rebasing, tag all the commits with the source PR so they're easier to find

  • FIX: loss of authorship on conflicts in multi-commit PRs, such conflicts now generate a commit with no authorship information, which can not be merged

  • FIX: some feedback messages didn't correctly ping the person being replied to

  • FIX: the deduplication of authorship in case of conflicts in multi-commit PRs

  • FIX: two PRs with the same label in different projects should not be considered linked anymore

  • FIX: when a PR fails at staging, link the correct status in the message posted on the PR

  • FIX: when fetching an unknown PR and it's closed, don't lose that information

  • IMP: add the forward-port remote to the repository view, so it can be set via the UI

  • IMP: cleanup timestamp displays, always show the tzoffset, UTC on hover in the main page (easier to relate to logs), local in the per-branch listing

  • IMP: error messages when trying to @fw-bot r+ on pull requests not under its purview

  • IMP: keep showing linked PRs after a PR has been merged

  • IMP: properly notify the user when an update to a pull request causes a conflict when impacted on the followup

  • REM: creation of forward ports in draft mode