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

better solution for STATIC_ROUTE_EXPIRY_TIME check #12824

Merged
merged 1 commit into from
Nov 25, 2022
Merged

better solution for STATIC_ROUTE_EXPIRY_TIME check #12824

merged 1 commit into from
Nov 25, 2022

Conversation

jcaiMR
Copy link
Contributor

@jcaiMR jcaiMR commented Nov 24, 2022

Why I did it

  1. swss-common behavior change between 202012 and master
    sonic-net/sonic-swss-common@e95a466
  2. This behavior change will cause different return value:
    master: key not exist, swss-common api will return None.
    202012: key not exist, swss-common api will return empty string.
  3. Based on 1 and 2, modify the original static route expiry code to make the code safe for different kinds of key/value pair in both master and 202012.

How I did it

Add protection code when swss-common api return None/"".

How to verify it

apply in bgpcfgd, verify different key/value pair.

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

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

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants