DNS Chaos - Format TargetHostnames String For dns_interceptor Binary#750
Open
aditya3103 wants to merge 16 commits intolitmuschaos:masterfrom
Open
DNS Chaos - Format TargetHostnames String For dns_interceptor Binary#750aditya3103 wants to merge 16 commits intolitmuschaos:masterfrom
aditya3103 wants to merge 16 commits intolitmuschaos:masterfrom
Conversation
aditya3103
commented
Jun 11, 2025
Author
aditya3103
left a comment
There was a problem hiding this comment.
- Moved validation to one level up - from helper binary to experiment binary
- Ensured backward compatibility by checking for JSON string initially
- Fallback method assumes comma separated string with appropriate error mechanism
neelanjan00
approved these changes
Jul 23, 2025
Author
|
@neelanjan00 @ispeakc0de Edit: Any updates @neelanjan00 ? |
ispeakc0de
approved these changes
Aug 7, 2025
Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…y instead of helper Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
Changed as per suggestion Co-authored-by: Neelanjan Manna <neelanjanmanna@gmail.com> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…ils (litmuschaos#753) * test: add unit tests for RandStringBytesMask and GetRunID in stringutils Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> * fixing gofmt Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> --------- Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
* test: add unit tests for retry.go in pkg/utils folder Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> * fixing gofmt Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> --------- Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…s#755) * test: add unit tests for exec.go file in pkg/utils folder Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> * fixing gofmt Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> * creating table driven test and also updates TestCheckPodStatus Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> --------- Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> Co-authored-by: Shubham Chaudhary <shubham.chaudhary@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
* written test for workload.go in pkg/workloads Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> * checking go formatting Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> --------- Signed-off-by: Prakhar-Shankar <prakharshankar247@gmail.com> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…#757) * chore: Fix typo in log statement Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> * chore: adds multi-container stress chaos system with improved lifecycle management and better error handling Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> --------- Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> Co-authored-by: Shubham Chaudhary <shubham.chaudhary@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…muschaos#764) Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…litmuschaos#766) * chore: adds retries for k8s api operations Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> * chore: adds retries for litmus api operations Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> --------- Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…aos#749) Signed-off-by: Calvin Audier <calvin.audier@amadeus.com> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
Signed-off-by: neelanjan00 <neelanjan.manna@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
…set to true Signed-off-by: Shubham Chaudhary <shubham.chaudhary@harness.io> Signed-off-by: Aditya Sridasyam <sridasyamaditya@gmail.com>
Author
|
@neelanjan00 Sorry for the delay ! I have done the DCO, can you please merge this as per your convenience |
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 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.
What this PR does / why we need it:
This PR creates a function under stringutils which takes comma separated targetHostnames string as input and return formatted string which is expected by dns_interceptor binary
This removes manual effort from the user to enter a string with correct formatting
For example
experiment.targetHostnames = "Alice, Bob, Charlie" (string entered by user)
FormatHostnames(experiment.targetHostnames) = "["Alice", "Bob", "Charlie"]" (as expected by dns_interceptor binary)
As of now the experiment fails when a comma separated string value is passed from ChaosCenter.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Checklist:
breaking-changestagrequires-upgradetag