Ignore nonexistent include in database_global.json#1041
Ignore nonexistent include in database_global.json#1041qiluo-msft merged 11 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
hi @liuh-80 , is anybody investigating the test failure in PerformancetimerTest.basic? |
|
/azp run |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
||
| /// Rust wrapper around `swss::SonicDBConfig::initializeGlobalConfig`. | ||
| pub fn sonic_db_config_initialize_global(path: &str) -> Result<(), Exception> { | ||
| pub fn sonic_db_config_initialize_global(path: &str, ignore_nonexistent: bool) -> Result<(), Exception> { |
There was a problem hiding this comment.
This will break existing Rust application using this function. Since Rust does not support default parameter value like Python/C++, does not support function overloading. There are 2 options:
- keep original function unchanged, and add anotehr function like sonic_db_config_initialize_global_ignore_nonexistent usiing more parameters.
- treat it as breaking change, and update all the Rust applications.
There was a problem hiding this comment.
hi @qiluo-msft, I plan to commit the change in dash-ha at the same time. When we update sonic-buildimage, it needs to go in at the same time as this. Are there other rust applications using this function? If there is and hard to coordinate, I can implement 1 to break the dependency.
There was a problem hiding this comment.
As far as I know, only dash-ha is using it.
There was a problem hiding this comment.
As far as I know, only dash-ha is using it.
Hi @qiluo-msft , I'm using this rest API as well in the swss.
sonic-net/sonic-swss#3796
There was a problem hiding this comment.
@Pterosaur , is it in the committed code that needs to be updated at the same time?
|
Cherry-pick PR to msft-202506: Azure/sonic-swss-common.msft#53 |
|
Cherry-pick PR to msft-202412: Azure/sonic-swss-common.msft#64 |
why
SonicDBConfig::initializeGlobalConfig aborts parsing global config if it encounters an include of a database config that doesn't exist. The global config file includes all possible includes in the switch. However, not all includes are relevant to a client. For example, in smartswitch, dash-ha container only cares NPU databases and databases of the DPU managed by the container. The current behavior requires a dash-ha container mounting all the DPU database instances.
what this PR does