-
Notifications
You must be signed in to change notification settings - Fork 81
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
refactor: populate key-value depending on their content #308
Merged
oliveromahony
merged 1 commit into
main
from
nap-monitoring-violation-context-key-value-population
May 25, 2023
Merged
refactor: populate key-value depending on their content #308
oliveromahony
merged 1 commit into
main
from
nap-monitoring-violation-context-key-value-population
May 25, 2023
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
✅ Deploy Preview for agent-public-docs canceled.
|
76fc4bc
to
35926f2
Compare
35926f2
to
661855e
Compare
sanathkumarbs
approved these changes
May 9, 2023
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.
LGTM, thank you for adding the support to correctly populate the key-value and also for the additional test cases! 🙌
661855e
to
580b10c
Compare
olli-holmala
approved these changes
May 11, 2023
892b224
to
1dedcd5
Compare
1dedcd5
to
542575b
Compare
Dean-Coakley
approved these changes
May 22, 2023
craigell
approved these changes
May 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
chore
Pull requests for routine tasks
dependencies
documentation
Improvements or additions to documentation
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.
Proposed changes
Context:
During the design phase of Violation Context backend APIs, a decision was made to improve the logic of how the violation contexts are populated in the Agent.
Proposed solution:
The UI design for the Violation Context tables contains the violation context key, violation context value and the count. If we look at the actual data for what these will contain, often there may be only the key or only the value (and not both) that are populated. Often in these cases fully understanding the key or value requires also the name of the violation itself. For example:
In this case, our API would return
context_key
= ‘Cookie’ and an emptycontext_value
withcount
= 1. From the user's standpoint they are seeing that a cookie caused some violation, but it’s not directly apparent what was the actual failure - namely that the cookie was repeated. IfVIOL_HEADER_REPEATED
were returned in the response, then it would be fairly easy to understand.Another example:
One way to fix the above is to always shift the key to
context_value
ifcontext_value
is empty and then populatecontext_key
with theviolation_name
. So the Violation Context above would become:Acceptance criteria:
context_key
andcontext_value
are actionable to the user when used together (the user will also have theviolation_context
available).Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)