This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Minimize Snapshot diff for Server Server Capabilities#7187
Merged
ocket8888 merged 4 commits intoapache:masterfrom Nov 18, 2022
Merged
Minimize Snapshot diff for Server Server Capabilities#7187ocket8888 merged 4 commits intoapache:masterfrom
ocket8888 merged 4 commits intoapache:masterfrom
Conversation
rimashah25
reviewed
Nov 16, 2022
rimashah25
approved these changes
Nov 18, 2022
Contributor
There was a problem hiding this comment.
Code changes LGTM. Unit tests are passing on local using karma
Added test server capability to a server and took a snap shot. Diff looks as follows:

Added eas server capability to a server and took a snap shot. Diff looks as follows:

I do see that the index is at 1 instead of 0 seen in master branch. Also change type is seen as add instead of update.
Contributor
|
Can be merged once TP tests pass. |
ocket8888
approved these changes
Nov 18, 2022
| oldItemsNext = oldItemsIterator.next(); | ||
| newItemsNext = newItemsIterator.next(); | ||
| } | ||
| minimalDiffItems.push(...addedItems); |
Contributor
There was a problem hiding this comment.
fyi, there's a builtin for just concatenating two arrays without doing a spread operation into a push: Array.prototype.concat.
4 tasks
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes #7113 by reordering the Server Server Capabilities in the new Snapshot to make Server Server capabilities occurring in both the old and new arrays have the same indices.
This PR also adds unit testing capabilities to Traffic Portal v1.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Build Traffic Portal
Run the Traffic Portal unit tests:
If this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist