Can't get vnflcm subsc's filter attribute when upgrade oslo.db to v15.0.0

Bug #2055431 reported by Ayumu Ueha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Undecided
Ayumu Ueha

Bug Description

The gate job failure by like the following error.

=================================================================
tacker.tests.functional.sol.vnflcm.test_vnf_instance_with_user_data.VnfLcmWithUserDataTest.test_inst_chgextconn_term
--------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/zuul/src/opendev.org/openstack/tacker/tacker/tests/functional/sol/vnflcm/test_vnf_instance_with_user_data.py", line 2497, in test_inst_chgextconn_term
    self.assert_subscription_show(resp, body)

      File "/home/zuul/src/opendev.org/openstack/tacker/tacker/tests/functional/sol/vnflcm/base.py", line 1490, in assert_subscription_show
    self.assertIsNotNone(_filter)

      File "/home/zuul/src/opendev.org/openstack/tacker/.tox/dsvm-functional-sol/lib/python3.10/site-packages/testtools/testcase.py", line 419, in assertIsNotNone
    self.assertThat(observed, matcher, message)

      File "/home/zuul/src/opendev.org/openstack/tacker/.tox/dsvm-functional-sol/lib/python3.10/site-packages/testtools/testcase.py", line 482, in assertThat
    raise mismatch_error

    testtools.matchers._impl.MismatchError: None matches Is(None)
=================================================================

In my investigation, this error occurred because can't get vnflcm subsc's filter attribute after upgrade oslo.db to v15.0.0 [1].

[oslo.db v14.1.0]
stack@openstack:~/work$ openstack vnflcm subsc show a4dcacf1-b050-443e-8de7-7fe8d3ff3e25 -f json
{
  "Callback URI": "http://127.0.0.1:9990/notification/callbackuri/test",
  "Filter": {
    "operationTypes": [
      "INSTANTIATE",
      "SCALE",
      "TERMINATE",
      "HEAL",
      "MODIFY_INFO",
      "CHANGE_EXT_CONN"
    ],
    ... omit ...
  },
  "ID": "c6ee98ea-d376-4924-8f39-64dd3c5b0a64",
  "Links": {
    "self": {
      "href": "http://localhost:9890/vnflcm/v1/subscriptions/c6ee98ea-d376-4924-8f39-64dd3c5b0a64"
    }
  }
}

[oslo.db v15.0.0]
stack@openstack:~/work$ openstack vnflcm subsc show a4dcacf1-b050-443e-8de7-7fe8d3ff3e25 -f json
{
  "Callback URI": "http://127.0.0.1:9990/notification/callbackuri/test",
  "Filter": "", ** can't get filter value **
  "ID": "c6ee98ea-d376-4924-8f39-64dd3c5b0a64",
  "Links": {
    "self": {
      "href": "http://localhost:9890/vnflcm/v1/subscriptions/c6ee98ea-d376-4924-8f39-64dd3c5b0a64"
    }
  }
}

[1] https://review.opendev.org/c/openstack/requirements/+/909930

Ayumu Ueha (ueha)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/910720

Changed in tacker:
status: New → In Progress
Ayumu Ueha (ueha)
Changed in tacker:
assignee: nobody → Ayumu Ueha (ueha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/910720
Committed: https://opendev.org/openstack/tacker/commit/b885f93d6459f56457b649724dd0e868ade353cd
Submitter: "Zuul (22348)"
Branch: master

commit b885f93d6459f56457b649724dd0e868ade353cd
Author: Ayumu Ueha <email address hidden>
Date: Fri Mar 1 10:55:40 2024 +0000

    Fix broken gate jobs caused by oslo.db upgrades

    This patch fixes an issue where the filter attribute of vnflcm
    subscription (v1 API) could not be retrieved because oslo.db version
    was updated to 15.0.0 [1].
    The reason of the issue was that obj's data type, which was obtained
    when oslo.db was 14.1.0 and 15.0.0, was different as below:

    * oslo.db==14.1.0: sqlalchemy.engine.row.LegacyRow
    * oslo.db==15.0.0: sqlalchemy.engine.row.Row

    This patch changes the existence validation of the filter key for
    `vnf_lcm_subscription` in the `sqlalchemy.engine.row.Row` case.

    [1] https://review.opendev.org/c/openstack/requirements/+/909930
    [2] https://pydoc.dev/sqlalchemy/latest/sqlalchemy.engine.row.Row.html

    Closes-Bug: #2055431
    Change-Id: I8c1543bb724b6f2c4f3f4f7edecdfef063d3d9a4

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 11.0.0.0rc1

This issue was fixed in the openstack/tacker 11.0.0.0rc1 release candidate.

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.