Commit Graph

13 Commits

Author SHA1 Message Date
Paul Eggleton
50f7c7036a rrs: admin: validate that email address fields are set
If automated emails are enabled, we need to ensure that the other email
fields are populated, so validate that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
5db8759b4f rrs: validate that a layerbranch is only part of one plan
The processing code can't currently handle if a layerbranch is part of
more than one plan, so disallow that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
7606664eeb rrs: link maintenance/upstream history to layerbranch
RecipeUpstreamHistory was not linked to the layer it was produced from,
which meant that it wasn't easy to query for a different maintenance
plan (i.e. a different layer) and thus the maintenance plan selection
on the recipe list didn't really work. Add a link field, populate it in
a migration and then make it required.

We had added a link earlier from RecipeMaintainerHistory to LayerBranch
but it was optional; for the same reasons we now populate it and make it
required.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
baa3f78498 rrs: improve admin for Release/Milestone objects
* Ensure the Release and Milestone names are separated by a space when
  listing Milesones
* Include the maintenance plan name in the name shown for each
  Release/Milestone
* Allow filtering Releases/Milestones by maintenance plan

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
560628c0e5 rrs: duplicate releases from first plan when adding a new plan
It's a pain to have to add all the releases when adding a new
maintenance plan. Since these are likely to be the same (or similar) for
every plan, then duplicate them across from the first plan when you save
a new one.

Also add "default" milestones on the assumption that other layers
probably won't want to use the 4-milestone split per release, but there
do have to be some milestone records, so just create one milestone for
each release.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
34466bac1d rrs: default python2/3 environments for new maintenance plan layer branches
It's a bit of a pain to have to set the two python environment fields on
every record in order to have things set correctly, and it can easily
get forgotten, so try to set them automatically by default (assuming
reasonable naming).

Note that this does introduce an annoying behaviour whereby if you click
"Add another Maintenance plan layer branch" and then decide you don't
want it, the admin form will insist you fill in the fields unless you
clear out the python2/3 environment fields. I'm not sure how to fix
that, so I'm leaving it as-is for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
6a332c5d8f rrs: handle linking maintainership
Provide a mechanism set the maintainer for things like gcc-cross-<arch>
to the same as gcc. (We do have entries in the .inc file for these,
however they aren't useful as they don't match the recipe name when we
parse it, and due to the fact that RecipeMaintainer objects link
directly to Recipe objects, we can't handle entries that don't map to a
real recipe).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
7831eec543 rrs_upgrade_history: use date/commit of last recipe upgrade import
Instead of arbitrarily importing the last 8 days of upgrades, record the
date and commit when we do an import, and then use that information the
next time the script is run.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
1f49943aee rrs: add maintenance plans
The MaintenancePlan will provide some context for the RRS records so we
can effectively enable RRS functionality only on certain layers where we
want it. You can also consider the maintenance of multiple layers
together under a single plan if desired.

Here we add just the MaintenancePlan and the corresponding migration;
a non-null link from the Release requires a separate migration and thus
that will be done in a separate commit.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
73a90437c3 rrs: Add support for Release
Now Recipes and Maintainers page can be access by Release and Milestone,
to support this a url namespace was add also update views/templates
handle new URL's.

rrs/models.py: Add support model for store Release also foregin key in
Milestone.
rrs/admin.py: Add admin site for Release model.
rrs/fixtures/initial_data.json: Add initial data with Release/Milestone
relation.
rrs/{views, urls}.py: Add support for handle Release/Milestone.
templates/rrs: Update to handle new URL's.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
ac485c0cc4 rrs: Add support for Recipe maintainership history
Now can you get maintainers based on Milestones.

Feature changes,

	rrs/models.py: Add RecipeMaintainerHistory to store maintainer updates.
	rrs/admin.py: Add admin site for RecipeMaintainerHistory.

Adapt changes,

Now you need to specify RecipeMaintainerHistory to get RecipeMaintainer,
changes into rrs/view.py.

These set of changes are incompatible with the previous version you need
to do initial setup described in README.rrs.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
2a651efc9a rrs: Add support for store RecipeUpstreamHistory
To provide statistics about RecipeUpstream information based on
Milestones we need to store RecipeUpstreamHistory that contains when the
update script was executed.

rrs/admin.py: Add admin page for RecipeUpstreamHistory.
rrs/models.py: Add model for RecipeUpstreamHistory with helper functions
for get last and last by date range also add migration.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
8e2d772e00 rrs: Add application
Add models for store Milestone, Maintainer and Recipe{Maintainer,
Upgrade, Upstream, Distro}, add initial data for Milestone and
Maintainer, initial migration and admin sites.

Add rrs/context_processors.py for return the site_name and application
for use in templates.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00