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.
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
feature(proctree): Introduce a process tree #3364
feature(proctree): Introduce a process tree #3364
Changes from all commits
e834db7
317bc6c
4d36a79
a8470d3
c18492b
6a6696d
c28f848
66819e2
cc361ba
f07277e
9526cd0
acf2961
82a9087
048e0cd
a034d98
4cc22b6
e7a3894
03971cd
407d580
4e428de
f5eae6d
ba76a0a
2f190af
265ffc3
c100dc4
1524014
562513d
c8a63f2
03093f4
07ca4d0
5321b26
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 like the implementation, looks good and intuitive.
One question - in your implementation you can't set a default value, you get the zero value of your type if you ask about a time before the first item.
There are times that you know that something has a default value.
It is possible to envelope this struct to return the default value in that case, but it will be hard to know if the given value is a default one or a value in the log.
Maybe expose a way to save a default value.
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.
BTW, I'll add credits to you in both, the changelog and the datasource (I'm clearly using things you've done in your PR). FYIO, will add a signed-off by in both commits (you and me).
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.
@geyslan this abstratcion of a changelog and package can be used for policy updates as well, wdyt?
A possible addition to this changelog is the ability to prune old changes made. This can be done, for example, by pruning all changes before some given time (can be given as a parameter to this package)
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.
Sorry for the delay. The initial policies version implementation used a rough circular buffer keyed by timestamps. At that time we decided to key it with a version number. In fact, removing the policies version object should be done for a timeout or even when a buffer round is complete, before replacing the stale policies version.
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.
@geyslan not sure I understand - do you think it can be used for the policy updates or not?
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.
@yanivagman No, as it stands now it cannot be used for versioned policies (u16). The changelog uses logic around timestamps, while policy snapshots are closely tied to the version number.