Skip to content

Fixed the Logic for comma-separated splitting#564

Open
chinmaym07 wants to merge 2 commits intolitmuschaos:masterfrom
chinmaym07:fixed-comma-split
Open

Fixed the Logic for comma-separated splitting#564
chinmaym07 wants to merge 2 commits intolitmuschaos:masterfrom
chinmaym07:fixed-comma-split

Conversation

@chinmaym07
Copy link
Contributor

Signed-off-by: chinmaym07 b418020@iiit-bh.ac.in

What this PR does / why we need it:

Updated the logic for comma separated splitting.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #555

Special notes for your reviewer:

Checklist:

  • Fixes Logic for splitting comma-separated inputs need to be fixed #555
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

uditgaurav
uditgaurav previously approved these changes Sep 21, 2022
@chinmaym07
Copy link
Contributor Author

@ispeakc0de @uditgaurav @ksatchit Please review.

@ispeakc0de
Copy link
Member

Hi @chinmaym07, pre-checks action is failing. Please fix it
I saw you have added the strings.TrimSpace change in all chaoslibs. It have requested to change it only for your changes(splitting logic) not at all places

@neelanjan00
Copy link
Member

Hi @chinmaym07 , have you made all the changes suggested by Shubham?

Signed-off-by: chinmaym07 <b418020@iiit-bh.ac.in>
Signed-off-by: chinmaym07 <b418020@iiit-bh.ac.in>
@chinmaym07
Copy link
Contributor Author

Hi @neelanjan00 .
Please review this PR.

xnaveenx added a commit to xnaveenx/litmus-go that referenced this pull request Dec 23, 2025
…uschaos#555)

This supersedes stale PRs litmuschaos#564 and litmuschaos#686 by introducing a centralized, tested utility.

- Added SplitList function to pkg/utils/stringutils to safely handle comma-separated strings
- Added unit tests covering edge cases (empty strings, trailing commas, spaces, only commas)
- Verified fix for issue where empty input returned slice of length 1
xnaveenx added a commit to xnaveenx/litmus-go that referenced this pull request Dec 23, 2025
…uschaos#555)

This supersedes stale PRs litmuschaos#564 and litmuschaos#686 by introducing a centralized, tested utility.

- Added SplitList function to pkg/utils/stringutils to safely handle comma-separated strings
- Added unit tests covering edge cases (empty strings, trailing commas, spaces, only commas)
- Verified fix for issue where empty input returned slice of length 1

Signed-off-by: xnaveen <naveen010210@gmail.com>
xnaveenx added a commit to xnaveenx/litmus-go that referenced this pull request Jan 7, 2026
…uschaos#555)

This supersedes stale PRs litmuschaos#564 and litmuschaos#686 by introducing a centralized, tested utility.

- Added SplitList function to pkg/utils/stringutils to safely handle comma-separated strings
- Added unit tests covering edge cases (empty strings, trailing commas, spaces, only commas)
- Verified fix for issue where empty input returned slice of length 1

Signed-off-by: xnaveen <naveen010210@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logic for splitting comma-separated inputs need to be fixed

4 participants