-
Notifications
You must be signed in to change notification settings - Fork 73
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
SYN-7653: Migration for invalid it:sec:cpe nodes #3815
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3815 +/- ##
==========================================
- Coverage 96.36% 96.29% -0.07%
==========================================
Files 242 243 +1
Lines 53771 53862 +91
==========================================
+ Hits 51816 51869 +53
- Misses 1955 1993 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -121,7 +121,8 @@ commands: | |||
- run: | |||
name: checkout regression repo | |||
command: | | |||
git clone https://github.com/vertexproject/synapse-regression ~/git/synapse-regression | |||
# FIXME: Remove branch before merging |
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.
🎶 🎶 🎶
Don't you forget about me
Don't, don't, don't, don't
Don't you forget about me
🎶 🎶 🎶
Regression repo here: vertexproject/synapse-regression#23 |
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.
couple nits but this is looking really good
Co-authored-by: mikemoritz <57907149+mikemoritz@users.noreply.github.com>
…ertexproject/synapse into blackout/SYN-7653/it-sec-cpe-migration
@@ -603,6 +604,7 @@ workflows: | |||
branches: | |||
only: | |||
- master | |||
- blackout/SYN-7653/it-sec-cpe-migration |
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.
Don't forget about me either.
fe186ad
to
8daefb7
Compare
Originally from #3815 - credit to @MichaelSquires --------- Co-authored-by: blackout <blackout@vertex.link>
migrate invalid ``it:sec:cpe`` nodes. | ||
|
||
Migration of these nodes will only be successful if one of the CPE2.3 (primary | ||
property) or the CPE2.2 (``:v2_2``) strings are valid CPE. If both CPE |
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.
property) or the CPE2.2 (``:v2_2``) strings are valid CPE. If both CPE | |
property) or the CPE2.2 (``:v2_2``) strings are valid CPEs. If both CPE |
{'name': 'all', 'type': 'boolean', 'default': False, | ||
'desc': 'Remove all instances of item from the list.'}, | ||
), | ||
'returns': {'type': 'null'}}}, |
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.
looks like it returns a bool
if start in text and block is not None: | ||
continue | ||
|
||
if start in text: |
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.
I think you could merge these with the previous blocks to avoid checking for start/stop in the line twice
while $list.has($oldvalu) { | ||
$list.rem($oldvalu) | ||
} | ||
|
||
if (not $list.has($newvalu)) { | ||
$list.append($newvalu) |
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.
Might be getting too far into edge cases here but this will change the order of unsorted array props and could remove multiple but only re-add one instance in non-uniq array props
($verb, $dst) = $edge | ||
$edges.append($edge) | ||
|
||
[ -($verb)> { iden $dst } ] |
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.
[ -($verb)> { iden $dst } ] | |
[ -($verb)> { yield $dst } ] |
|
||
spin | | ||
|
||
iden $iden | |
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.
the yield keyword is more efficient than the iden command
iden $iden | | |
yield $iden | |
($verb, $src) = $edge | ||
$edges.append($edge) | ||
|
||
[ <($verb)- { iden $src } ] |
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.
[ <($verb)- { iden $src } ] | |
[ <($verb)- { yield $src } ] |
|
||
spin | | ||
|
||
iden $oldcpe.iden() | |
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.
iden $oldcpe.iden() | | |
yield $oldcpe.iden() | |
|
||
$removeNode($oldcpe, $view.iden, $view.layers.0.iden) | ||
|
||
iden $oldcpe.iden() | |
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.
iden $oldcpe.iden() | | |
yield $oldcpe.iden() | |
No description provided.