-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[sonic-cfggen] remove lazy_re workaround due to many optimizations done #8226
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy_re had an issue when importing sonic-cfggen in another application that uses re.search(): ``` Traceback (most recent call last): File "/usr/local/bin/spm", line 8, in <module> sys.exit(cli()) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/sonic_package_manager/main.py", line 202, in list click.echo(tabulate.tabulate(table_body, table_header)) File "/usr/local/lib/python3.7/dist-packages/tabulate.py", line 1259, in tabulate has_invisible = re.search(_invisible_codes, plain_text) File "/usr/lib/python3.7/re.py", line 183, in search return _compile(pattern, flags).search(string) File "/usr/lib/python3.7/re.py", line 285, in _compile raise TypeError("first argument must be string or compiled pattern") TypeError: first argument must be string or compiled pattern ``` There is no much imporvement of lazy_re today after many other good optimization work done for sonic-cfggen. It served as a quick temporary solution. Some quick test for fast-reboot and warm-reboot done on top of 201911 branch: Fast-reboot: from ASIC reset to ports in up state: with lazy_re: 18 sec without lazy_re: 18 sec Warm-reboot: LAG restoration time: with lazy_re: 73 sec without lazy_re: 72 sec So, there is no real optimization since the number of sonic-cfggen is grately reduced in latest SONiC. This means it is time to revert this change. Signed-off-by: Stepan Blyschak <[email protected]>
This pull request fixes 1 alert when merging a9d682f into 950c24c - view on LGTM.com fixed alerts:
|
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
tahmed-dev
approved these changes
Jul 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Stepan!
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
…ne (sonic-net#8226) lazy_re had an issue when importing sonic-cfggen in another application that uses re.search(). There is no much improvement of lazy_re today after many other good optimization work done for sonic-cfggen. It served as a quick temporary solution. Some quick test for fast-reboot and warm-reboot done on top of 201911 branch: Fast-reboot: from ASIC reset to ports in up state: with lazy_re: 18 sec without lazy_re: 18 sec Warm-reboot: LAG restoration time: with lazy_re: 73 sec without lazy_re: 72 sec So, there is no real optimization since the number of sonic-cfggen calls is greatly reduced in latest SONiC. This means it is time to revert this change. Signed-off-by: Stepan Blyschak <[email protected]>
Required for 202106 |
judyjoseph
pushed a commit
that referenced
this pull request
Oct 14, 2021
…ne (#8226) lazy_re had an issue when importing sonic-cfggen in another application that uses re.search(). There is no much improvement of lazy_re today after many other good optimization work done for sonic-cfggen. It served as a quick temporary solution. Some quick test for fast-reboot and warm-reboot done on top of 201911 branch: Fast-reboot: from ASIC reset to ports in up state: with lazy_re: 18 sec without lazy_re: 18 sec Warm-reboot: LAG restoration time: with lazy_re: 73 sec without lazy_re: 72 sec So, there is no real optimization since the number of sonic-cfggen calls is greatly reduced in latest SONiC. This means it is time to revert this change. Signed-off-by: Stepan Blyschak <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
lazy_re had an issue when importing sonic-cfggen in another application that
uses re.search():
There is no much imporvement of lazy_re today after many other good optimization work
done for sonic-cfggen. It served as a quick temporary solution.
Some quick test for fast-reboot and warm-reboot done on top of 201911 branch:
Fast-reboot: from ASIC reset to ports in up state:
with lazy_re: 18 sec
without lazy_re: 18 sec
Warm-reboot: LAG restoration time:
with lazy_re: 73 sec
without lazy_re: 72 sec
So, there is no real optimization since the number of sonic-cfggen is grately reduced
in latest SONiC. This means it is time to revert this change.
Signed-off-by: Stepan Blyschak [email protected]
Why I did it
To remove old W/A I introduced, that seems no longer needed nor giving some improvement.
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)