Fix 'Context: <blank>' fields in events.yaml and add build-time parsing check to ERROR if Context field not set correctly

Bug #2020381 reported by Agustin Carranza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Agustin Carranza

Bug Description

Brief Description
-----------------
Change all “Context: “ lines to “Context: none” … so they explicitly say they have no context and should not be published by automated docs.
And then change parseEventsYaml.py (a build time parsing checker) to generate an error if:

Context is not present in definition
Or
Context is present but has no value

Severity
--------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
------------------
Add/modify an alarm with Context: <Empty>

Expected Behavior
------------------
Parser check rejects the change and informs Context field can not be empty.

Actual Behavior
----------------
Parser check ends successfully.

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

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

Branch/Pull Time/Commit
-----------------------
master

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer testing

Workaround
----------
N/A

Changed in starlingx:
assignee: nobody → Agustin Carranza (acarranz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fault (master)

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

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fault (master)

Reviewed: https://review.opendev.org/c/starlingx/fault/+/883860
Committed: https://opendev.org/starlingx/fault/commit/6438565a4d9d50f63a0b46e207c5457595abc531
Submitter: "Zuul (22348)"
Branch: master

commit 6438565a4d9d50f63a0b46e207c5457595abc531
Author: Agustin Carranza <email address hidden>
Date: Mon May 22 13:40:34 2023 -0300

    Add parsing check when Context field is empty

    This change adds a parsing check to ERROR if Context field is Empty.
    Until now there had not been a requirement of non empty fields, so in
    case this is needed in the future for other key/values, a collection is
    created.

    Test plan
    PASS: * Add/modify an alarm/log in events.yaml file with Context field
            set to <Empty>.
          * Run the checkEventYaml script and check it fails.
    PASS: * Check that all the events in events.yaml file have the Context
            field set to a non empty value.
          * Run the checkEventYaml script and check it ends successfully.

    Closes-bug: 2020381

    Signed-off-by: Agustin Carranza <email address hidden>
    Change-Id: Ia267886dd49099525751165975fb5d291c0c6f82

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.fault
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.