All of lore.kernel.org
 help / color / mirror / Atom feed
* DRY RUN [Review Request] 4299 "recipes: View detailed information about a recipe"
@ 2014-01-12  6:35 Reyna, David
  2014-01-12 17:55 ` Lerner, Dave
  0 siblings, 1 reply; 24+ messages in thread
From: Reyna, David @ 2014-01-12  6:35 UTC (permalink / raw)
  To: Damian, Alexandru (alexandru.damian@intel.com),
	belen.barros.pena@intel.com,
	Ravi Chintakunta (ravi.chintakunta@timesys.com), Lerner, Dave,
	Eggleton, Paul (paul.eggleton@intel.com)
  Cc: toaster@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 6129 bytes --]

Hi all,

I believe that I have completed the Recipe Details page, as per Belen's requirements. 

I unfortunately do not have my commit credentials setup as I am moving to a more SSH-friendly host. I hope to have that in place Monday. In the meantime I would like to do an informal review request, with the following content.

1) The diffs for the model and view are attached, plus "recipes.html" and "recipe.html" as normal files since they are new files. (FYI, "recipes.html" _plural_ is a fixed version of the previous template "recipe.html" _singular_).

2) Below is a proposed formal example "review request" with "Development notes" and "Test Instructions". As per our discussion, this is based on Wind River's review request process. The test instructions in particular are intended to (a) demonstrate what I as a developer did to confirm that it is working, (b) provide an easy way to compare the scope of testing verses the original design document, and (c) provide simple and complete instructions for a Tester who most likely will not be as familiar with the feature as the developers. Hopefully, such instructions can be then later be incorporated into a regression test.

3) This is my first review for Toaster. I will certainly be very interested in any Yocto standards that I may not have addressed.

4) My next steps are to get my host SSH set up, start looking at Ravi's code, plus try to understand why the URL links in the tables do not have normal URL coloring.

Thanks,
David

+++++++++++++++++++++++++++++++++++++++++
[Review Request] 4299 "recipes: View detailed information about a recipe"

Development Notes
=================

The implementation of the recipe "outcome" highlighting is done using a helper method in the "Task" class, which returns the CSS color style for the respective "outcome" value.

While it is not ideal to mix HTML fragments in class definitions, this choice was made because Django templates do not really support using conditionals to set local variables, and we want to avoid duplication of the table code for each case. The possible alternate implementations include custom filters, custom tags, or Javascript, each with their own tradeoffs.


Test Instructions
=================

1) Create a default Yocto project (qemux86), and start the Toaster.

  $ source poky/oe-init-build-env
  $ source toaster start
  $ bitbake core-image-minimal
  $ xdg-open http://localhost:8000/

2) Select the "core-image-minimal" build link

3) Select the "Recipes" link in the left sidebar

Observe that the recipes are listed in a table, and that each recipe name is a live URL link.

4) Click on the "busybox" recipe name link

Observe:
  a) The "breadcrumbs" at the top include is in this form form, and that all but the last entry are live links.
  
	     All builds > core-image-sato atom-pc (<time>) > Recipes > busybox_1.21.1-r0
	 
  b) The informational sidebar on the right contains information pertinent to the "busybox" recipe, 
  
  c) Some 14 task entries, starting with "do_patch" and ending with "do_build" If you hover over a recipe name, you will see a question-mark icon appear, and if you hover over that a tooltip will appear for that task.
  
  d) Any task outcome of "Succeeded" should be in normal black. Any outcome of "Failed" (not likely) would be red, and all other tasks should be in grey.
  
  e) The layer description will indicate the layer "meta", and the recipe will point to "busybox_1.21.1.bb".

  f) The right-hand sidebar about busybox is still present.
  
5) Observe that "Packages" link. It should have an appended value like "(4)". Now click on this link.

Observe:
  a) The number of packages matches the previous number in parenthesis.
  
  b) Each package has a version and a size. The size may be zero.
  
  c) Note that if you hover on a package name, it will reveal a URL of the following form. This link should take you to the corresponding package detail page once you have the fix for 4328 pulled.
  
	localhost:8000/gui/build/<number>/package/<number>  

6) Observe that "Build Dependencies" link. It should have an appended value like "(0)". Now click on this link.

Observe:
  a) No dependencies appear, and you get a message of the form:
  
  "$RECIPE_NAME_VERSION has no build dependencies."
 
7) Observe that "Reverse build dependencies" link. It should have an appended value like "(1)". Now click on this link.

Observe:
  a) The number of packages matches the previous number in parenthesis.
  
  b) The recipe dependency should be "packagegroup-core-boot", 
  
  c) There should be a respective version displayed, for example "1.0-r11"
 
  d) If you hover on the recipe name, it will reveal a URL of the following form. This link should take you to the corresponding recipe detail page.
  
	localhost:8000/gui/build/<number>/recipe/<number>

8) Click the breadcrumb "Recipes" at the top, locate the "gdbm" recipe, and select it.

9) Observe that "Packages" link. It should have an appended value like "(0)". Now click on this link.

Observe:
  a) No packages appear, and you get a message of the form:
  
  "$PACKAGE_NAME_VERSION does not build any packages."
 
10) Observe that "Build dependencies" link. It should have an appended value like "(2)". Now click on this link.

Observe:
  a) The number of build dependencies matches the previous number in parenthesis.
  
  b) The recipe dependency should have values like "gettext-native" and "libtool-cross". 
  
  c) There should be a respective versions displayed for each dependency.
 
  d) If you hover on a recipe name, it will reveal a URL of the following form. This link should take you to the corresponding recipe detail page.
  
	localhost:8000/gui/build/<number>/recipe/<number>

11) Observe that "Reverse build dependencies" link. It should have an appended value like "(0)". Now click on this link.

Observe:
  a) No reverse dependencies appear, and you get a message of the form:
  
  "$RECIPE_NAME_VERSION does not build any packages."
 
- David


[-- Attachment #2: models.py.diff --]
[-- Type: application/octet-stream, Size: 668 bytes --]

diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index b45ca82..dd11808 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -123,6 +123,15 @@ class Task(models.Model):
     message = models.CharField(max_length=240)
     logfile = models.FilePathField(max_length=255, blank=True)
 
+    def outcome_highlight(self):
+        if   self.outcome==Task.OUTCOME_EXISTING:
+            ret=''
+        elif self.outcome==Task.OUTCOME_FAILED:
+            ret='class=error'
+        else:
+            ret='class=muted'
+        return ret
+
     class Meta:
         ordering = ('order', 'recipe' ,)
 

[-- Attachment #3: views.py.diff --]
[-- Type: application/octet-stream, Size: 1564 bytes --]

diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index a918c25..d5f9c68 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -281,9 +281,20 @@ def recipe(request, build_id, recipe_id):
     template = "recipe.html"
     if Recipe.objects.filter(pk=recipe_id).count() == 0 :
         return redirect(builds)
+        
+    object = Recipe.objects.filter(pk=recipe_id)[0]
+    layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0]
+    layer  = Layer.objects.filter(pk=layer_version.layer_id)[0]
+    tasks  = Task.objects.filter(recipe_id = recipe_id).filter(build_id = build_id)
+    packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id)
+
     context = {
-            'build' : Build.objects.filter(pk=build_id)[0],
-            'object' : Recipe.objects.filter(pk=recipe_id)[0],
+            'build'   : Build.objects.filter(pk=build_id)[0],
+            'object'  : object,
+            'layer_version' : layer_version,
+            'layer'   : layer,
+            'tasks'   : tasks,
+            'packages': packages,
     }
     return render(request, template, context)
 
@@ -344,7 +355,7 @@ def tasks(request, build_id):
     return render(request, template, context)
 
 def recipes(request, build_id):
-    template = 'recipe.html'
+    template = 'recipes.html'
     mandatory_parameters = { 'count': 100,  'page' : 1};
     retval = _verify_parameters( request.GET, mandatory_parameters )
     if retval:

[-- Attachment #4: recipes.html --]
[-- Type: text/html, Size: 1507 bytes --]

[-- Attachment #5: recipe.html --]
[-- Type: text/html, Size: 9964 bytes --]

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-01-15 18:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-12  6:35 DRY RUN [Review Request] 4299 "recipes: View detailed information about a recipe" Reyna, David
2014-01-12 17:55 ` Lerner, Dave
2014-01-12 18:49   ` Reyna, David
2014-01-13 12:42     ` Damian, Alexandru
2014-01-13 13:42       ` Damian, Alexandru
2014-01-13 14:33         ` Reyna, David
2014-01-13 14:40           ` Damian, Alexandru
2014-01-13 14:46           ` Damian, Alexandru
2014-01-13 14:53             ` Barros Pena, Belen
2014-01-13 14:57             ` Reyna, David
2014-01-13 15:04               ` Damian, Alexandru
2014-01-13 15:07                 ` Reyna, David
2014-01-15  6:34         ` Reyna, David
2014-01-15 12:09           ` Ravi Chintakunta
2014-01-15 15:19             ` Reyna, David
2014-01-15 17:21               ` Paul Eggleton
2014-01-15 17:21               ` Ravi Chintakunta
2014-01-15 18:01                 ` Barros Pena, Belen
     [not found]           ` <5E53D14CE4667A45B9A06760DE5D13D055D7A5A8@ALA-MBB.corp.ad.wrs.com>
     [not found]             ` <CAJ2CSBvYkLMde7hu0Zhxk7qwBoNdTCTECQv6SxpBXQ1BVx9m1Q@mail.gmail.com>
     [not found]               ` <5E53D14CE4667A45B9A06760DE5D13D055D7B5BE@ALA-MBB.corp.ad.wrs.com>
2014-01-15 15:36                 ` FW: " Reyna, David
2014-01-13 15:01       ` Lerner, Dave
2014-01-13 15:10         ` Damian, Alexandru
2014-01-13 15:23           ` Barros Pena, Belen
2014-01-13 15:44             ` Lerner, Dave
2014-01-13 16:36               ` Barros Pena, Belen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.