Highlights of the OBS frontend development sprint - Sprint 22

Here are the results the OBS frontend team has achieved in the last two weeks (2017-08-07 to 2017-08-18).


LDAP support for our 2.8 release

LDAP authentication support has been backported to OBS 2.8. This includes more test coverage and some improvements to the authentication logic in order to be able to officially support LDAP.

Kiwi image editor

We have extended the functionality of the Kiwi image editor. In the repository section, we also support obsrepositories:/ as source path now. At the same time, we fixed several styling issues including for instance flickering elements.

Have a look at the following PR's:

Kiwi Editor screenshots

Kiwi Editor repository selected Kiwi Editor package selected

Make feature switch based on the user

As you might already noticed, we use continuous integration and continuous delivery to keep build.opensuse.org up to date. However, sometimes we want to deploy but some features are not yet ready for production. Instead of keeping them in a seperate branch we introduced a feature toggle to hide these features in production a few months ago. So far, the features were always hidden in production.

This was not good, as also admins or developers were not able to test the feature in a production environment. Therefore we changed the implementation to be based not only on the environment but also on the logged in user. You can see the changes in this pull request.

Remove excluded repositories from rpmlint dropdown

Do you need to review a lot of submit requests? Are you annoyed to go over all repository architecture combinations for the rpmlint result to check that no errors will get introduced?

We did several changes to make this workflow easier for maintainers. First of all we dropped now excluded and the images repositories (e.g. when you build a debian package against openSUSE) from this list as these don't have rpmlint results. Furthermore we changed the ordering of the architectures to reverse to favor the x86_64 architecture. You can read about it in #3183, #3608 and #3622.

Add vertical scrolling to large diff files

When reviewing submit requests with large diff files, it was necessary to scroll to the end to the file for horizontal scrolling. Therefore the openSUSE review team requested to add vertical scrolling to limit the overall size. Have a look at this pull request if you want to know how we implemented it.

Vertical scrolling large diff file

Provide comment API for retrieving comments by author

The openSUSE team makes heavily use of bots to review and comment on requests. Therefore they requested to have an API route to get all comments of a user so that bots can also cleanup and delete old comments. We implemented this API endpoint in this sprint and refactored the comments controller at the same time. Have a look at this pull request or try it our on build.opensuse.org/comments/user

Submit package via webui does not fill the changelog diff

When submitting a package via OSC, the diff between the changes file get automatically added as the description. Unfortunately this was not the case when submitting a package via the webui. Ludwik Nussel requested this feature a while ago, which we happily implemented during this sprint. When you now create a submit request, the description in the popup gets automatically prefilled. Submit request dialog

Drop editing of user accounts for LDAP mode

It will no longer be possible for users nor for admins to edit their user account details (real name and email address) when running in LDAP mode. Those information will be set by the LDAP configuration.


Review datatables improvements

A few months ago, we changed the request datatables to be server side processed by AJAX. While this improved the loading time for these pages tremendously, it wasn't possible to sort or search by all columns anymore (e.g. source or target). Thomas Bechtold reported the sort issue and pointed out that the python maintainers group the reviews via sorting them.

Thanks to following the single responsibilty and open/close principles, it was easy to adapt our implementation to make searching and sorting possible again. You can check out the implementation here and here.

Fix ordering of user requests table

Jimmy Berry reported a very odd bug: The ordering of his request list was correct but the created time did not match the ordering.

Bug request table Jimmy

Thanks to Jimmy's excellent bug report including even the html source code, we found out that it was a caching issue. Lesson learned: Never ever cache relative timestamps! For now we just dropped caching the time, however, in the future we should implement a client side handling of relative timestamps.

ActiveJob is used to interface with the Delayed Job queueing system

We are now uses Rails' new ActiveJob interface to call delayed job. This means that all the jobs are in one place (app/jobs/) and we can easily swap Delayed Job for a different async system like Resque or Sidekiq if we wanted to.


We always wanted to unify the style for the buttons in the dialogs and finally, we did something with those buttons. Take a look at the PR #3615.

Dialog with new buttons

Test suite migration

We continued migrating tests to Rspec:

  • Attrib model is now covered by 100% (PR#3456)
  • UpdatePackageMeta job is now covered by 100% (PR#3564)
  • Event mailer is now covered by 100% (PR#3554)

Beside migrating tests to the new test suite, we also fixed several flickering tests (tests which sometimes report a false negative). Have a look at #3628 and #3626.


Ensure public/assets dir of our packages is in clean state

Some weeks ago we did one of our continuous deployments and ran into a problem. An additional asset manifest file broke our assets and we ended up with OBS pages without CSS. You might have seen us blogging about it.

What we also did was to create a story for one of our next sprints. This sprint we have been working on this and met in a group to discuss what options we have to solve this.

Solutions we came up with were:

  • Compile the assets during the package installation (not package build;-)) in the post section of our rpms
  • Manually precompile the assets after package installation
  • Keep asset precompilation in our package build like it is right now and document in our deployment wiki that we have to ensure there are no additional files in the /public/assets directory

In the end we decided for option 3 and documented what deployers should do to avoid this from breaking things in our wiki.

The reason we didn't decide for one of the other solutions was that this would have made our package installation more complex and would have affected other people that want to host their own OBS too much.

Continuous Deployment

Within the last sprint we deployed more than 8 times our reference installation at build.opensuse.org without having a scheduled downtime.

« Highlights of the OBS frontend development – Sprint 21