-
Notifications
You must be signed in to change notification settings - Fork 57
[202405][GCU] Backport #3831 perf refactor + #4118/#4335/#4668 fixes (parts 1-8) #417
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
Open
rimunagala
wants to merge
10
commits into
Azure:202405
Choose a base branch
from
rimunagala:rimunagala/202405-gcu-3831-port
base: 202405
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
13244fd
[202405][GCU perf backport #3831 - part 1/N] Config-threading refacto…
rimunagala 074dc54
[202405][GCU perf backport #3831 - part 2/N] PathAddressing xpath cac…
rimunagala 38991e8
[202405][GCU perf backport #3831 - part 3/N] patch_sorter: JsonMoveGr…
rimunagala a205f2b
[202405][GCU perf backport #3831 - part 4/N] Fix up: dangling caller …
rimunagala 5f928db
[202405][GCU perf backport #3831 - part 5/N] Backport upstream #4118:…
bhouse-nexthop 21f64dc
[202405][GCU perf backport #3831 - part 6/N] Backport upstream #4335:…
bhouse-nexthop ebd9fe5
[202405][GCU perf backport #3831 - part 7/N] Backport upstream #4668:…
bhouse-nexthop feb8a48
[202405][GCU perf backport #3831 - part 8/N] Wire BulkLeafListMoveGen…
rimunagala 1030de2
[gcu] Restore scope argument when invoking field operation validators
rimunagala e830cc9
[gcu] Backport BUFFER_POOL field operation validator test from master
rimunagala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| rules: | ||
| - id: no-direct-libyang-import | ||
| patterns: | ||
| - pattern-either: | ||
| - pattern: import yang | ||
| - pattern: import yang as $X | ||
| - pattern: from yang import $X | ||
| - pattern: from yang import $X as $Y | ||
| - pattern: import libyang | ||
| - pattern: import libyang as $X | ||
| - pattern: from libyang import $X | ||
| - pattern: from libyang import $X as $Y | ||
| message: >- | ||
| Do not import libyang directly. sonic-utilities must go through | ||
| sonic_yang / sonic_yang_ext so that libyang API/ABI changes (libyang1 | ||
| vs libyang2 vs libyang3) are isolated to sonic-yang-mgmt. | ||
| languages: [python] | ||
| severity: ERROR | ||
| paths: | ||
| exclude: | ||
| - tests/ |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Verbatim from master #3831 — the same commit
b5232ccbas the sleep above — and the comment immediately below this line is master's own acknowledgement of the question.It also isn't a behaviour change. On the 202405 base the caller discarded
apply()'s return value:so a failed
_services_validatewas already only logged, never propagated._services_validate()itself is byte-identical across the base branch, this branch and master. The new signature returnsupd_databecause the config is now threaded through the loop instead of being re-read from Redis on every iteration.On "partially-applied patches being treated as successful", to be precise about what is and isn't covered:
generic_updater.pyre-reads ConfigDB and compares it against the target, raising if they differ — byte-identical to the base branch:_upd_data()performs the writes before_services_validate()runs, on both branches.So no regression here, though I agree the propagation is worth improving — that's a master-level design question rather than something to diverge on in this backport.