[Toaster] [review-request] shaid format on layers page: 7191

Lerner, Dave dave.lerner at windriver.com
Fri Feb 27 11:07:45 PST 2015


Hi Belen,

I need the spec for the layers page, aka: All Compatible Layers.  I can't figure out what the right thing to do is by looking at view.py layers(), recipes(), layers.html, recipes.html, the defect description, and the way the database is populated.

"Commits SHAs should be truncated to show only the first 10 [layers and recipes show 13 Dave] characters and display inside a button. The full SHA shows in a Bootstrap popover when you click the button. This is how SHAs are shown across Toaster, for example in the recipe details page (see attached showing-commits.png). ", so I copied that recipe details page code which is also probably broken but since probably not yet examined.  

The recipes page shows two columns, branch and commit, but the layers page only shows one column, revision.  The recipes page only buttonizes commits.  The layers page doesn't show the commit field, only either
	layer_version.branch
or else if above is null
	branch.name from layer_version join branch

The database values seem confusing: 
layers_version.commit is sometimes a tag, not an SHAID
   name = meta-gumstix
dirpath =
 branch = dora
 commit = dora
But there are cases where branch is not null, branch != commit and commit is an SHAID

If you send me the spec for this "Layers" page, I'll propose some solutions.

Thanks,
Dave

> -----Original Message-----
> From: Barros Pena, Belen [mailto:belen.barros.pena at intel.com]
> Sent: Friday, February 27, 2015 4:58 AM
> To: Lerner, Dave; DAMIAN, ALEXANDRU
> Cc: Reyna, David
> Subject: Re: [Toaster] [review-request] shaid format on layers page: 7191
> 
> 
> On 25/02/2015 21:32, "Lerner, Dave" <dave.lerner at windriver.com> wrote:
> 
> >http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/layer
> >s_commitfield_7191
> >
> >This commit fixes 7191 to format an SHAID the layers revision column the
> >same as on the recipes page.
> 
> Something interesting going on. The commit id's do indeed display inside a
> button that you can click to view the full SHA, but so do other branch
> names like dylan or dora, as well as the revisions of all imported layers.
> In a project using the master branch, you can see this happening in the
> meta-gumstix and meta-gumstix-extras layers. You can also see it by
> importing a layer typing 'master' in the revision field.
> 
> The only revisions that should display as a button are commit id's: never
> branch or tag names.
> 
> Cheers
> 
> Belén
> 
> 
> >
> >Testing:
> >cd <parent-of-poky-repo>/_meta-openebmedded_master.toaster_cloned
> >cp -r meta-ruby test-layer
> >cd test-laye
> ># save the following commit id, whatever it is
> >git log -1 --pretty=oneline
> >e862443451908f67b46517b70b1e13932d9aefb2
> ># save the following path whatever it is
> >pwd
> >/home/mywork/git/_meta-openembedded_master.toaster_cloned/test-layer
> >
> >Start managed build, then click New Project
> >name: layers-test-7191
> >click Import Layer
> >  name: testlayer
> >  git repository url:  file:/<path from above>
> >  Revision: <commit id from above>
> >
> >Click All Compatible Layers
> >Search for layers-test-7191
> >Verify 13 character commit id truncation as button label
> >Click commit id button
> >Verify pop-up full shaid appears
> >Click pop-up
> >Verify pop-up full shaid disappears
> >
> >-Dave Lerner
> 



More information about the toaster mailing list