manifest_get_default_revision fails if branch contains a '/'

Bug #1959444 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Scott Little

Bug Description

Brief Description
-----------------
The manifest_get_default_revision function fails if the default branch
contains a '/'.

This was encountered while processing the delayed branching of stx-docs git
on the r/stx.6.0 release.

Severity
--------
Minor

Steps to Reproduce
------------------
From r/stx.6.0 branch ...

source $MY_REPO/build-tools/repo-utils.sh
manifest_get_default_revision

Expected Behavior
------------------
function returns r/stx.6.0

Actual Behavior
----------------
function returns r

Reproducibility
---------------
100%

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
branch r/stx.6.0

Last Pass
---------
n/a

Timestamp/Logs
--------------
n/a

Test Activity
-------------
Product release activities

Workaround
----------
Manual branching and manifest update.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to root (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/root/+/826932

Changed in starlingx:
status: New → In Progress
Scott Little (slittle1)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
Ghada Khalil (gkhalil)
tags: added: stx.7.0 stx.build
Changed in starlingx:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/c/starlingx/root/+/826932
Committed: https://opendev.org/starlingx/root/commit/955ec0af14d547523df4998009e87cec1f94e6f9
Submitter: "Zuul (22348)"
Branch: master

commit 955ec0af14d547523df4998009e87cec1f94e6f9
Author: Scott Little <email address hidden>
Date: Fri Jan 28 14:21:52 2022 -0500

    manifest_get_default_revision must deal with / in branch names

    When the manifest default revision is 'r/stx.6.0',
    manifest_get_default_revision was returning 'r'.
    A sed clause intended to catch '/>' was grabbing the wrong
    '/' character.

    Split the sed expression into two seperate expressions.

    Tested with:
       <default revision="r/stx.6.0" remote="stx-staging"/>
       <default revision="stx.6.0" remote="stx-staging"/>
       <default revision="r/stx.6.0"/>
       <default revision="stx.6.0"/>

    Closes-Bug: 1959444
    Change-Id: I3a271f6f89cea94898598c90ed2d2be59ddc60d5
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.