HackMD
  • Prime
    Prime  Full-text search on all paid plans
    Search anywhere and reach everything in a Workspace with Prime plan.
    Got it
      • Create new note
      • Create a note from template
    • Prime  Full-text search on all paid plans
      Prime  Full-text search on all paid plans
      Search anywhere and reach everything in a Workspace with Prime plan.
      Got it
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # `homu` rewrite The Rust BORS clone [`homu`](https://github.com/rust-lang/homu) is crucial to the daily development of Rust infrastructure (compiler, miri, clippy etc.). Sadly, the code of `homu` is quite old and messy, it is currently basically unmaintainable and it is very difficult to implement new features for it. It also probably contains a lot of legacy code for CI systems that aren't used anymore (e.g. Travis). It would be nice if we could rewrite `homu` (preferably in Rust), with the following goals: 1. Make the code more maintainable/testable. - Writing it in Rust should by itself improve maintainability and readability vs the current Python code that is *very* dynamically typed. - Prepare/extend the test suite for `homu`. 2. Get rid of legacy systems, tailor the code for the current GitHub CI. - In the process, possibly change some of the workflows to be better integrated with GitHub. 3. Implement new feature requests (once the rewrite is done) that are now stuck ([homu issue list](https://github.com/rust-lang/homu/issues)). ## What does `homu` do? First, it would be nice to document what does `homu` do at its current state: - Web server - `homu` provides a [web server](https://bors.rust-lang.org/). - Displays basic help (which GH commands are available). - Displays current merge [queue](https://bors.rust-lang.org/queue/rust). - Allows creating rollup PRs. - Synchronizes PR state on startup. - GitHub integration - The server also has webhooks for GH events. - Reads commands from GitHub comments on PRs. - Merge queue - Downloads information about PRs and commits, creates merge commits, schedules tests and performs the actual merges. - Handles PR priority and tree closing. - Database - Stores information about current PR states, repositories, closed trees, priorities etc. - Uses SQLite. - Configuration - Configured through a TOML file. ## What do we want to keep/change? - Web server - We need to reimplement the backend, but the frontend can probably stay the same for now. - Database - We can provide an interface that will let us abstract the DB, and then implement backends e.g. for SQLite, DynamoDB or others. ## Alternatives to a full rewrite Use existing tools: - [bors-ng](https://github.com/bors-ng/bors-ng) - A lot of momentum and activity, active development (+). - Written in Elixir (-), probably wouldn't be friendly to `rustc` developers for maintenance. - As any other tool, it's opinionated and doesn't necessarily match the commands used currently by `homu`. Compare: https://bors.tech/documentation/ vs https://bors.rust-lang.org/. Things like `treeclosed` seem to be missing. We could add them, but the tool is used by a lot of users and it's unclear whether we could fit its needs (and get our changes in) for the specific use cases of rustc (clippy, miri, ...) projects. - [bors-rs](https://github.com/bors-rs/bors) - Written in Rust (+). - Seems similar in scope and features to homu (+). - Unmaintained (-). - Implemented as a GitHub App (could be moved to a self-deployed app). - [original bors](https://github.com/graydon/bors) - Unmaintained, written in Python, wouldn't improve the current situation (- - -). If we adapt an existing tool, we would probably either need to fork it to add commands that are currently offered by `homu`, or generalize it enough so that we can add custom commands to it. There seem to be two ways forward: - Use and integrate bors-ng. - Rewrite `homu` in Rust (while potentially taking some code from `bors-rs`). ### More detailed comparison of `homu` vs `bors-ng` commands Note: aliases (like `r+` vs `merge`) are not included, only commands that differ semantically. | `homu` | `bors-ng` | Description |Do we need it?| |--------------|---------------------|:-----------:|:-:| |`r+`|`r+`|Reviewed, merge|x| |`r+ <SHA>`|N/A|Reviewed, merge with SHA guard|| |`r+ p=<prio>`|`r+ p=<prio>`|Set PR priority, merge|x| |`r=<name>`|`r=<list of names>`|Reviewed by `name`(s), merge|x| |`r-`|`r-`|Cancel merge|x| |`p=<prio>`|`p=<prio>`|Set PR priority|x| |`try`|`try`|Try build|x| |N/A (?)|`try-`|Cancel a try build|| |`delegate+`|`delegate+`|Delegate rights to PR author|x| |`delegate=<name>`|`delegate=<list of names>`|Delegate to specific user(s)|| |`delegate-`|N/A|Undelegate PR author|| |`rollup=never`|`single on`|Disable rollup/batching|x| |`rollup=always`|`single off`|Enable/force rollup/batching|x| |`rollup=iffy`|N/A|`iffy` rollup|| |`rollup=maybe`|N/A|`maybe` rollup|| |`rollup-`|N/A|Unmark as rollup|| |`squash`|N/A|Squash before merge|| |`squash-`|N/A|No squash before merge|| |`force`|N/A|Stop all builds, move to next PR|| |`treeclosed=<prio>`|N/A|Close tree for PRs below `<prio>`|| |`treeclosed-`|N/A|Undo tree closure|| |`clean`|N/A|Clean up previous build results|| |`retry`|N/A|Retry build (?)|| |N/A|`retry`|Retry previous command|| There are also some other debug/maintenance commands like `ping`.

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully