<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16073</bug_id>
          
          <creation_ts>2025-11-20 08:42:26 +0000</creation_ts>
          <short_desc>toaster: Test using broken hard coded value : 7</short_desc>
          <delta_ts>2025-11-25 16:12:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          
          
          <qa_contact name="Toaster default assignee">toaster</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103335</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-11-20 08:42:26 +0000</bug_when>
    <thetext>Some new error that seems to happen frequently. Not sure if its on each build so far. I first added this to the generic AB-INT ticket [1], but I believe a dedicated ticket make sense here.

It might be linked with recent toaster changes.

[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15659

=================================== FAILURES ===================================
____________ TestCreateNewProject.test_create_new_project_kirkstone ____________

self = &lt;toaster.tests.functional.test_create_new_project.TestCreateNewProject testMethod=test_create_new_project_kirkstone&gt;

    def test_create_new_project_kirkstone(self):
        &quot;&quot;&quot; Test create new project using:
          - Project Name: Any string
          - Release: Yocto Project 4.0 &quot;Kirkstone&quot; (option value: 6)
          - Merge Toaster settings: True
        &quot;&quot;&quot;
        release = &apos;7&apos;
        release_title = &apos;Yocto Project 4.0 &quot;Kirkstone&quot;&apos;
        project_name = &apos;projectkirkstone&apos;
&gt;       self.create_new_project(
            project_name,
            release,
            release_title,
            True,
        )

../layers/bitbake/lib/toaster/tests/functional/test_create_new_project.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../layers/bitbake/lib/toaster/tests/functional/functional_helpers.py:175: in create_new_project
    select.select_by_value(release)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;selenium.webdriver.support.select.Select object at 0x7544c5b35df0&gt;
value = &apos;7&apos;

    def select_by_value(self, value: str) -&gt; None:
        &quot;&quot;&quot;Select all options that have a value matching the argument. That is,
        when given &quot;foo&quot; this would select an option like:
    
        &lt;option value=&quot;foo&quot;&gt;Bar&lt;/option&gt;
    
        Args:
            value: The value to match against
    
        Raises:
            NoSuchElementException: If there is no option with specified value in SELECT
        &quot;&quot;&quot;
        css = f&quot;option[value ={self._escape_string(value)}]&quot;
        opts = self._el.find_elements(By.CSS_SELECTOR, css)
        matched = False
        for opt in opts:
            self._set_selected(opt)
            if not self.is_multiple:
                return
            matched = True
        if not matched:
&gt;           raise NoSuchElementException(f&quot;Cannot locate option with value: {value}&quot;)
E           selenium.common.exceptions.NoSuchElementException: Message: Cannot locate option with value: 7; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103338</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-11-20 08:43:55 +0000</bug_when>
    <thetext>toaster ubuntu2404-vk-3 master completed at 2025-11-20 03:12:53+00:00
E           selenium.common.exceptions.NoSuchElementException: Message: Cannot locate option with value: 7; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception
https://autobuilder.yoctoproject.org/valkyrie/#/builders/88/builds/518/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103340</commentid>
    <comment_count>2</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-20 09:01:14 +0000</bug_when>
    <thetext>With the removal of &quot;Styhead&quot;, &quot;Kirkstone&quot; now in drops to the absolute position  &quot;6&quot;. This is the normal size of the &quot;supported&quot; release table. 

This position should be stable for &quot;Kirkstone&quot; until &quot;Kirkstone&quot; is itself removed.

Here is the evidence. Look at the file &quot;/layers/bitbake/lib/toaster/orm/fixtures/poky.xml&quot;:

  &lt;object model=&quot;orm.bitbakeversion&quot; pk=&quot;6&quot;&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;name&quot;&gt;kirkstone&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;giturl&quot;&gt;git://git.openembedded.org/bitbake&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;branch&quot;&gt;2.0&lt;/field&gt;
    &lt;field type=&quot;CharField&quot; name=&quot;dirpath&quot;&gt;&lt;/field&gt;
  &lt;/object&gt;

I recommend that you update the test scripts for this new position.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103341</commentid>
    <comment_count>3</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-20 09:03:12 +0000</bug_when>
    <thetext>If possible, I recommend that the position for &quot;Kirkstone&quot; be programmatically derived from &quot;/layers/bitbake/lib/toaster/orm/fixtures/poky.xml&quot; so that there are no brittle hard coded values.

Hope this helps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103343</commentid>
    <comment_count>4</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-20 09:21:21 +0000</bug_when>
    <thetext>Alternatively, if one goes to the Toaster page &quot;toastergui/newproject/&quot; and examines the ID &quot;projectversion&quot;, they should find:

   &lt;option value=&quot;6&quot;&gt;Yocto Project 4.0 &quot;Kirkstone&quot;&lt;/option&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103369</commentid>
    <comment_count>5</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-11-25 09:37:59 +0000</bug_when>
    <thetext>toaster ubuntu2204-vk-4 master completed at 2025-11-20 08:55:24+00:00
E           selenium.common.exceptions.NoSuchElementException: Message: Cannot locate option with value: 7; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception
https://autobuilder.yoctoproject.org/valkyrie/#/builders/88/builds/519/steps/12/logs/stdio

toaster ubuntu2404-vk-2 master completed at 2025-11-21 03:13:41+00:00
E           selenium.common.exceptions.NoSuchElementException: Message: Cannot locate option with value: 7; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception
https://autobuilder.yoctoproject.org/valkyrie/#/builders/88/builds/520/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103373</commentid>
    <comment_count>6</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-25 11:41:19 +0000</bug_when>
    <thetext>This is a test defect, not a Toaster defect, per my comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103374</commentid>
    <comment_count>7</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-11-25 12:25:45 +0000</bug_when>
    <thetext>David, I&apos;m not sure what was your intent, but this ticket was somehow assigned to myself. Resetting to default owner, please fix it if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103375</commentid>
    <comment_count>8</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-25 16:12:11 +0000</bug_when>
    <thetext>It appears that Richard fixed this issue a few days ago:

[toaster]$ git show 80761fe2062464035033b5a7681709b4fc308198
commit 80761fe2062464035033b5a7681709b4fc308198
Author: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Date:   Fri Nov 21 09:29:41 2025 +0000

    toaster: Fix test after styhead removal

    The styhead removal changed the indexing, update the tests to match. We really
    need to remove these hardcoded values.

    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py
index 66213c736..51c8c1203 100644
--- a/lib/toaster/tests/functional/test_create_new_project.py
+++ b/lib/toaster/tests/functional/test_create_new_project.py
@@ -53,7 +53,7 @@ class TestCreateNewProject(SeleniumFunctionalTestCase):
           - Release: Yocto Project 4.0 &quot;Kirkstone&quot; (option value: 6)
           - Merge Toaster settings: True
         &quot;&quot;&quot;
-        release = &apos;7&apos;
+        release = &apos;6&apos;
         release_title = &apos;Yocto Project 4.0 &quot;Kirkstone&quot;&apos;
         project_name = &apos;projectkirkstone&apos;
         self.create_new_project(
[toaster]$</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>