sonic-net / DASH

Disaggregated APIs for SONiC Hosts
Apache License 2.0
77 stars 88 forks source link

SAI Challenger tests fail due to outdated dpugen #581

Open marian-pritsak opened 1 month ago

marian-pritsak commented 1 month ago

The dpugen package builds the OB routing entry using eni_id field that was replaced with routing_group_id.

Here's the failure log:

/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai.py:211: in process_commands
    yield from map(self.command_processor.process_command, commands)
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai.py:137: in process_command
    obj = self.sai.create(obj_id, attrs)
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai.py:229: in create
    return self.sai_client.create(obj, attrs, do_assert)
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai_client/sai_thrift_client/sai_thrift_client.py:69: in create
    status, result = self._operate('create', attrs=attrs, obj_type=obj_type, key=key)
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai_client/sai_thrift_client/sai_thrift_client.py:154: in _operate
    object_key = ThriftConverter.convert_key_to_thrift(obj_type_name, key)
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai_client/sai_thrift_client/sai_thrift_utils.py:37: in convert_key_to_thrift
    return { object_type: key_t(**ThriftConverter.convert_key_values_to_thrift(object_type, key)) }
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
object_type = 'outbound_routing_entry'
key = {'destination': '1.128.0.1/9', 'eni_id': 'oid:0x760000000000aa', 'switch_id': 'oid:0x21000000000000'}
    @staticmethod
    def convert_key_values_to_thrift(object_type, key):
        """
        "vip_entry", { "switch_id": "oid:0x0", "vip": "192.186.0.1" } => { "switch_id": 0, "vip": sai_thrift_ip_address_t('192.168.0.1'...) }
        """
        key_spec = getattr(ttypes, f'sai_thrift_{object_type}_t').thrift_spec

        result = {}
        for spec_entry in key_spec[1:]:
            key_attr_name = spec_entry[2]
            key_attr_type = spec_entry[3]
>           result[key_attr_name] = ThriftConverter.convert_value_to_thrift(key[key_attr_name], value_type=ThriftConverter.get_value_type_by_thrift_spec(key_attr_type))
E           KeyError: 'routing_group_id'
/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai_client/sai_thrift_client/sai_thrift_utils.py:148: KeyError
marian-pritsak commented 1 month ago

The change to SAI API is introduced by https://github.com/sonic-net/DASH/pull/546

mgheorghe commented 1 month ago

dpugen 0.2.3 was published

KrisNey-MSFT commented 3 weeks ago

Hash is not matching, build from scratch. When the -get fails, tell docker to move forward. @mgheorghe to update SAI Challenger and in SAI b/c many containers are being pulled. Pinged PLVision maintainer for an update.