Another way to push package updates to stable in Fedora Bodhi

This article was originally published on Trishna Guha’s blog,


Bodhi is a web application that facilates the process of publishing package updates of Fedora. Once a package is submitted to Bodhi it goes through various stages: Pending, Testing, Stable, Obsolete. The details can be found here Package States.Fedora Bodhi Update System

There exist two types of policies in Bodhi, using any of them maintainers can publish their package updates (Pushing updates to Stable from Testing). Updates Policy documentation: https://fedoraproject.org/wiki/Updates_Policy

Updates Policy in Bodhi:

  • Manually push to stable based on time :
    • Auto-karma is disabled.
    • Update spends 14 days in testing.
    • Maintainer pushes the update to stable manually.
  • Automatic push  to stable based on karma :
    • Auto-karma is enabled.
    • Stable Karma threshold is reached.
    • The update is pushed to stable automatically.

The policies above are used to update packages, pushing from testing state to stable state. We could also have one more way to push package updates that Bodhi doesn’t have yet. It could be structured like this:

Manually push to stable based on karma:

  • Auto-karma is disabled.
  • Stable Karma-threshold is reached.
  • Maintainer pushes the update to stable manually.

The maintainers have always wanted this policy to be in Bodhi. There are already two tickets for the same, https://github.com/fedora-infra/bodhi/issues/796 and https://github.com/fedora-infra/bodhi/issues/772

I decided to work on the ticket. We had to remove some major lines of code from the model that implemented the already existing policies of Bodhi. I kept my fingers crossed until the test suite runs with success😛 And yes it showed  all the tests ran ok😉. Lmacken helped me with continually reviewing my patch and clearing my doubts. The Commit can be found here https://github.com/fedora-infra/bodhi/commit/45f288ae3992d29f3388c627554cc35286a958fb and The PR here https://github.com/fedora-infra/bodhi/pull/821.

Lmacken has always said, “Deleting huge chunks of code is way better than writing more code”. He has guided to delete that chunks of code:).

I learned it is always good to remove lines of code from your codebase if that doesn’t break any feature. The tweet that always have inspired me:)

The code is already merged. Once Lmacken spins up a new release it will get in to staging for further testing. I hope that Fedora package maintainers will be happy soon:-).

Categories: Development

1 Comment

  1. Thank your implementing this. You wrote that less code is better than more. Then it would be better to just allow maintainers to push a package to stable once it got at least +1 karma. Since the maintainer can choose an arbitrary value for the karma threshold there is no gain for the maintainer to use any other value than 1. If the maintainer wants to wait till there is more karma than just 1, they can just wait. If they set the value to 5 but there is only +4 karma, then they can set the value down to 4 and push then.

Leave a Reply

Your email address will not be published.

*

Copyright © 2017 Fedora Community Blog

Theme by Anders NorenUp ↑

%d bloggers like this: