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

Barros Pena, Belen belen.barros.pena at intel.com
Mon Mar 2 01:13:16 PST 2015


Thanks for this, Dave. Some comments inline.

On 27/02/2015 19:07, "Lerner, Dave" <dave.lerner at windriver.com> wrote:

>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]

13 is also fine: we just need to make sure we don't display the whole
thing (it's too long).

>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.

I don't think that code applies: the recipe details page shows information
about finished builds, and the layers page is part of the build
configuration process. I believe they use different tables.

>
>The recipes page shows two columns, branch and commit, but the layers
>page only shows one column, revision.

Very true. The recipes page, which is part of the analysis mode, has
indeed a 'branch' (which might be empty) and a 'commit' column. This is
because when you build a layer in a certain branch, the build will execute
for whichever commit was the head of that branch at the time you executed
the build. We need to tell you which commit was that for each build (it is
useful if you want to reproduce the build). In the case of the layers, you
have only one field, revision, that you use to specify if you want to
build the head of a certain branch, or a specific commit. If you specify a
commit, after your build finishes the recipes page will show an empty
branch, and your commit in the commit column.


> 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

The database is indeed confusing, and I am not familiar enough with the
models to answer the question of which one is the correct field to show in
the revision column of the layers page. Alex is away today, so I am
copying Michael, who might know the answer to the question.


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

The spec is available here

https://bugzilla.yoctoproject.org/attachment.cgi?id=2101

I hope this helps.

Cheers

Belen

>
>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/lay
>>>er
>> >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