For general contribution information, see here.
The Katello bug triage process is designed to address Redmine issues that have been opened by the community and developers in order to target the releases that these issues will be included in. This should be done on a weekly basis and in a top down order of items to be addressed:
The runner is the person in charge of following the procedures here and generally conducting the meeting.
We follow a rotation with respect to who runs the triage session. You can see the rotation here. Feel free to sign up if you want to run triage some time!
Triage is done once a week for an hour. As long as a week is not skipped, this has been enough time to get through every issue and leave 5-15 minutes extra. When a release is pending, or a new release has been sent out the volume does spike.
There are a few important states that issues can be in that are worth knowing about before going into the process:
There are a few important states the issue can be in with respect to the ‘Release’ field within Redmine. These release states have an impact not only a release itself but the triage process as a whole. A quick definition of each that will make more sense in the process section:
The triage runner starts the meeting by going through the issues in descending order. This is so that if time were to run out, the most critical categories of issues are triaged. The runner is in charge of ensuring the flow of the meeting and updating issues or ensuring that someone on the call takes responsibility for updating an issue. This latter part sometimes occurs if a duplicate needs to be looked up, or another developer on the call can explain/ask the user for more information more clearly than the runner.
The general flow is to open an issue and the runner to examine the issue, typically reading the issue number and general idea aloud. This allows for any developers with knowledge to chime in with any relevant info. The runner attempts to answer the following questions:
If requested information is provided, set the state to New and triage as normal. If there has been no reponse for two weeks, set the target version to Recycle Bin, with the following comment:
Please reopen this issue with the requested information, and we will be happy to take a look.
Running the tests in Katello can take quite a while, especially the ruby ones. This guide will help in trying to speed up your testing workflow by giving you some tips.
An important part of testing is knowing which tests to run and when. This can save you a lot of time.
Very rarely should you run the entire test suite locally. Instead, just let Jenkins run it for you after you open a PR. Locally, run new tests you write along with any tests you think might be affected.
To run an individual file:
rake test:katello TEST=../katello/test/models/content_view_test.rb
To run an individual test:
# testunit style
rake test:katello TEST=../katello/test/models/content_view_test.rb TESTOPTS="-ntest_create"
# spec style
rake test:katello TEST=../katello/test/actions/katello/environment_test.rb TESTOPTS="-n/plans/"
Another simple way to speed up tests is by skipping some of the loading and pre-test tasks by running Ruby directly. This script will speed up your load time by as much as 30-60 seconds. Simply copy the code below into a script file in your PATH (e.g. ~/.bin/ktest).
#!/usr/bin/env sh
KATELLO_PATH=/path/to/your/katello/project
if [[ -n $1 ]]
then
RAKE_PATH=`bundle show rake`
ruby -I"lib:test:${KATELLO_PATH}/test:${KATELLO_PATH}/spec" -I"${RAKE_PATH}/lib" $@
else
bundle exec rake test:katello
fi
Then you can run a test file like so:
ktest ../katello/test/models/content_view_test.rb
Or run an individual test:
ktest ../katello/test/models/content_view_test.rb -ntest_create
You can even record your glue tests:
mode=all ktest ../katello/test/models/glue/repository_test.rb
One thing to note is that while the normal rake test command will migrate the database, ktest will not (in the interest of saving time). To do this, simply run this in your foreman directory:
RAILS_ENV=test bundle exec rake db:drop && RAILS_ENV=test bundle exec rake db:create && RAILS_ENV=test bundle exec rake db:test:prepare && RAILS_ENV=test bundle exec rake db:migrate
Or if you’re a CLI ninja, you can alias it:
alias testdb='RAILS_ENV=test bundle exec rake db:drop && RAILS_ENV=test bundle exec rake db:create && RAILS_ENV=test bundle exec rake db:test:prepare && RAILS_ENV=test bundle exec rake db:migrate'
We use both AngularJS and React in our UI and they have different ways of running tests.
For testing AngularJS code, you can visit the bastion_katello README page for testing instructions
For testing React code, you can run the following in the Katello root directory:
npm test # Run the test suite
npm run lint # Run linting
npm run lint:fix # Automatically fix linting issues
npm run lint:test # Run both linting and testing
This guide covers how to peform a community release of Katello. The guide will reference the term ‘X.Y’ which reprsents the major and minor version that you are releasing. Throughout the guide we will use 2.0 and 2.1 as examples to represent the currently released community version (2.0) and the version that you are working on releasing (2.1).
The Katello release process has two distinct roles that work together to get a release out.
Role: releaser owner
Pick a release code name based on a style of beer previously unused. Examples from previous releases are Oktoberfest and Winter Warmer.
Role: releaser owner
The first step to any release is warning the community of impending branching prior to the branch date to give them time to push on any pull requests that are pending. The notification should be sent no less than 2 weeks prior to the intended branch date and ideally when Foreman sends their branching announcement.
Role: releaser owner
Create a 2.1 release configuration in tool_belt at configs/katello/2.1.yaml
. You may copy the config from the previous release and update accordingly. Once configured, run setup:
./tools.rb setup-environment --github-username <username> configs/katello/2.1.yaml
You will find the repositories checked out to the versions specified in the release config in repos/katello/2.1.0/
.
The tool_belt
repository contains templated procedures that can be generated and then posted to Discourse for tracking of all release activities. To generate:
./tools.rb procedure branch katello 2.1
./tools.rb procedure release katello 2.1
Copy the output to a Discourse post in the release section titled ‘Katello 2.1 Release Process’
From here on out the Release Owner and Release Packager should work to close out each of the respective item lists.
The following steps are guidelines for testing and submitting a new build of Candlepin to Koji with the intent of including it in a nightly build and ultimately tagging it for inclusion in a Katello release. Candlepin is a vital component of Katello. Here’s how to make sure the process goes according to plan.
foreman-maintain service stop --only tomcat
sudo yum install <url1> <url2>
) (For noarch RPMs, install the candlepin-selinux RPM first, then the Candlepin RPM)If there are schema changes in the build you’ll need to run /usr/share/candlepin/cpdb --update
to migrate the database.
At this point you can bring Tomcat back: foreman-maintain service start --only tomcat
Validate the new version. A thorough test of Candlepin integration includes the following:
record=true mode=all ktest ~/katello/test/scenarios/scenario_test.rb
(save some time by doing other testing concurrently)hammer ping
or your preferred method of calling the APIIf you’re aware of a particularly impactful change in the new Candlepin version, be sure to test it explicitly.
If everything checked out - great! If not - fix those broken tests and open a PR.
koji build katello-thirdparty-candlepin-rhel7 /path/to/srpm
koji build katello-candlepin-nightly-el8 /path/to/srpm
The new Candlepin will be included in the next nightly build which will subject it to even more testing.
koji tag-pkg katello-3.16-thirdparty-candlepin-rhel7 candlepin-3.1.14-1.el7
koji tag-pkg katello-candlepin-3.16-el8 candlepin-3.1.14-1.el8
Be sure to substitute your own version numbers for the tag name and RPM.
All done!
This document describes how to upgrade to a new version of Pulp. Benchmarks are optional but highly recommended.
This assumes you have a working Katello installation and that you’ve checked out all the necessary repositories including Runcible.
We recommend capturing some benchmarks before upgrading. This is optional though if the change in Pulp versions brings minor changes. See step 6 for a idea of what to benchmark.
Follow the Pulp documentation on how to install the latest version. If
upgrading from a prevous installation, typically a yum update *pulp*
will
suffice. Once you have the latest version installed, make you sure you update
or reset the database. (We recommend keeping track of all packages
installed as part of this upgrade, as it will make package tagging easier in
step 8.)
Upgrade Runcible by running the VCR tests in live mode. Fix any broken tests. Optionally, run some manual commands from a Ruby console to test Pulp’s functionality. Once you’re finished making changes, merge them into master (going through the Pull Request process).
If Runcible changes were needed, release a new version of Runcible but do NOT build new rpms in koji.
Upgrade Katello to your new version of Runcible. Run the Katello VCR tests in live mode. Fix any failures.
Fix any failures from step 6.
katello-repos
RPM and Forklift katello_repositories
role with the new versionForeman 3.12.1 has been released! Follow the quick start to install it.
Foreman 3.11.5 has been released! Follow the quick start to install it.