Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProfileProvider class to support read profile config from PROFILE_DB. #683

Merged
merged 22 commits into from
Feb 21, 2023

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Sep 9, 2022

Why I did it

Add default value and profile support to swss-swss-common.

How I did it

Add ProfileProvider class to support read profile config from PROFILE_DB.

How to verify it

Add new UT.
Pass all existing UT and E2E test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Add ProfileProvider class to support read profile config from PROFILE_DB.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liuh-80 liuh-80 changed the title Add profile config provider. Add ProfileProvider class to support read profile config from PROFILE_DB. Sep 9, 2022
@liuh-80
Copy link
Contributor Author

liuh-80 commented Sep 9, 2022

This PR depends on another PR to pass UT: #681
The reason is UT need modify redis config to create a new UT, which is part of azure pipeline change.

@liuh-80 liuh-80 marked this pull request as ready for review September 9, 2022 06:38
@liuh-80 liuh-80 requested a review from qiluo-msft September 9, 2022 06:38
common/dbconnector.cpp Outdated Show resolved Hide resolved
@qiluo-msft
Copy link
Contributor

qiluo-msft commented Sep 28, 2022

    "LOGLEVEL_DB" : {

There is a ongoing PR to remove this DB. Possible to use it?


In reply to: 1260486336


In reply to: 1260486336


Refers to: tests/redis_multi_db_ut_config/database_config1.json:25 in 9b60524. [](commit_id = 9b60524, deletion_comment = False)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Sep 28, 2022

    "LOGLEVEL_DB" : {

There is a ongoing PR to remove this DB. Possible to use it?

Refers to: tests/redis_multi_db_ut_config/database_config1.json:25 in 9b60524. [](commit_id = 9b60524, deletion_comment = False)

I check the loglevel PR, seems that PR only move logger table from LOGLEVEL_DB, seems still something left in that DB.
So, before LOGLEVEL_DB been complete clean-up in database_config.json and schema.h and table.cpp, we can't use ID for that DB.

@@ -244,24 +244,7 @@ void ConfigDBConnector_Native::mod_config(const map<string, map<string, map<stri
map<string, map<string, map<string, string>>> ConfigDBConnector_Native::get_config()
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File change in configdb.cpp dbconnector.cpp and dbconnector.h are from another PR:
#692

@liuh-80
Copy link
Contributor Author

liuh-80 commented Sep 29, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

common/database_config.json Outdated Show resolved Hide resolved
qiluo-msft
qiluo-msft previously approved these changes Oct 10, 2022
@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 10, 2022

Will merge after this validation pass: sonic-net/sonic-buildimage#10575

@liuh-80
Copy link
Contributor Author

liuh-80 commented Oct 11, 2022

Will merge this PR after the validation PR passed: sonic-net/sonic-buildimage#10575

@qiluo-msft
Copy link
Contributor

Could you check build failures?

@liuh-80
Copy link
Contributor Author

liuh-80 commented Feb 20, 2023

Could you check build failures?
The build failure caused by code change in sairedis, following PR will fix it:
#747

@liuh-80
Copy link
Contributor Author

liuh-80 commented Feb 20, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 merged commit 43cadec into sonic-net:master Feb 21, 2023
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Feb 22, 2023
Update sonic-swss-common submodule pointer to include the following:
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Feb 23, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 27, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this pull request Mar 7, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

This is a reland of sonic-net#13950, with the debug image build fix.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Mar 8, 2023
Update sonic-swss-common submodule pointer to include the following:
* 06ffb51 Define ACL_TABLE and ACL_RULE table in STATE_DB ([sonic-net#748](sonic-net/sonic-swss-common#748))
* 1b369ab [ci] Fix apt-get install unable locate package issue. ([sonic-net#753](sonic-net/sonic-swss-common#753))
* 619d4ec Improve unit test for go wrapper ([sonic-net#752](sonic-net/sonic-swss-common#752))
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this pull request Mar 10, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants