stx/update zuul broken by sysinv code change

Bug #1983504 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Al Bailey

Bug Description

Brief Description
-----------------
Patching code references sysinv.openstack.common.policy

A method that was being referenced had its method renamed by
https://review.opendev.org/c/starlingx/config/+/849904

patching code needs to be updated to the new method signature otherwise zuul(pylint) as well as any
patching code that exercises that code-path will fail.

Severity
--------
Major

Steps to Reproduce
------------------
Zuul will fail pylint

Expected Behavior
------------------
Patching code submissions that used to pass zuul, should still pass zuul

Actual Behavior
----------------
Zuul fails due to the code change from that external sysinv code change

Reproducibility
---------------
Its a method renaming issue.
It will block all patching code changes from passing zuul until patching code adapts to the new method signature.
It would also impact patching calls that invoke the 'enforce' method.

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

Branch/Pull Time/Commit
-----------------------
Aug 2nd
https://review.opendev.org/c/starlingx/config/+/849904

Last Pass
---------
Aug 1st

Timestamp/Logs
--------------
* Module cgcs_patch.authapi.policy
cgcs_patch/authapi/policy.py:55:21: E1101: Class 'Rules' has no 'load_json' member (no-member)

Test Activity
-------------
Development

Workaround
----------
None. We need to update patching.

Al Bailey (albailey1974)
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to update (master)

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

Changed in starlingx:
status: New → In Progress
Revision history for this message
Al Bailey (albailey1974) wrote :

This issue affects more than just zuul.

2022-08-03T19:26:03: sw-patch-controller-daemon[99922]: patch_controller.py(2470): ERROR: Authorized API failure: Error occurred during request processing
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/patch_controller.py", line 2453, in run
    auth_app.VersionSelectorApplication(),
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/authapi/app.py", line 74, in __init__
    self.v1 = setup_app(pecan_config=pc)
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/authapi/app.py", line 38, in setup_app
    policy.init()
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/authapi/policy.py", line 49, in init
    reload_func=_set_rules)
  File "/usr/lib64/python2.7/site-packages/sysinv/common/utils.py", line 674, in read_cached_file
    reload_func(cache_info['data'])
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/authapi/policy.py", line 54, in _set_rules
    policy.set_rules(policy.Rules.load_json(data, default_rule))
AttributeError: type object 'Rules' has no attribute 'load_json'

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

Reviewed: https://review.opendev.org/c/starlingx/update/+/852046
Committed: https://opendev.org/starlingx/update/commit/0cada3c8ba80353935f17e0cfd4a929a43f1cfc7
Submitter: "Zuul (22348)"
Branch: master

commit 0cada3c8ba80353935f17e0cfd4a929a43f1cfc7
Author: Al Bailey <email address hidden>
Date: Wed Aug 3 19:05:38 2022 +0000

    Fix zuul fail due to sysinv method signature change

    The sysinv method is no longer valid.
    The code needs to be updated to accomodate the new
    signature.

    Test Plan:
     PASS: upload/apply a patch
     PASS: Apply a patch using NFV

    Closes-Bug: #1983504
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: I12a8defabc64155dd085f028b12c2d67bb52d99d

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