-
Notifications
You must be signed in to change notification settings - Fork 651
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
Deprecate Collection.Assign()
, refactor CollectionSpec.(LoadAnd)Assign()
#371
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
lmb
reviewed
Aug 11, 2021
ti-mo
changed the title
Deprecate
Deprecate Aug 16, 2021
Collection.Assign()
, unified assignValues()
Collection.Assign()
, refactor CollectionSpec.(LoadAnd)Assign()
ti-mo
force-pushed
the
lna-prog-arrays
branch
2 times, most recently
from
August 17, 2021 20:26
f6e3d52
to
bc48c76
Compare
lmb
reviewed
Aug 23, 2021
close() and finalize() are fairly similar in connotation. Rename .close() to .cleanup() to make it clearer that it's run to back out of the transaction and not really part of the happy path. Signed-off-by: Timo Beckers <timo@isovalent.com>
This doesn't fit in with the new collectionLoader, so the time has come to finally remove it. Signed-off-by: Timo Beckers <timo@isovalent.com>
lmb
approved these changes
Aug 31, 2021
This patch aims to remove a layer of indirection by moving flattenStruct() into its own discrete function ebpfFields, since it extracts type info from struct fields tagged with 'ebpf' annotations. This hopefully makes the code somewhat more understandable, easier to extend and testable. 'valueOf' was renamed to 'getValue'. Its signature was changed and now yields a value of type interface{}. reflect.ValueOf() is then called once in assignValues(), simplifying the closure implementations. Signed-off-by: Timo Beckers <timo@isovalent.com>
…gramArrays Track assigned maps in LoadAndAssign to be able to reject ProgArrays that are loaded into the kernel but are not assigned to the struct. These get closed on the first GC, leading to inconsistent behaviour. Signed-off-by: Timo Beckers <timo@isovalent.com>
Highlight a few specifics of their functionality, previously their docstrings were largely copy-pasted. Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo
force-pushed
the
lna-prog-arrays
branch
from
September 1, 2021 08:10
3495d9a
to
96c9b1b
Compare
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.
Closes #366.
Best reviewed per commit.
tl;dr
flattenStruct()
is now a discrete function in the form ofebpfFields()
assignValues()
now takes a validator function that can be used to reject the transaction before the struct's fields are actuallySet()
interface{}
is now used instead of areflect.Value
for tracking assigned object uniqueness