Skip to content
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

Logic for splitting comma-separated inputs need to be fixed #555

Open
neelanjan00 opened this issue Sep 6, 2022 · 3 comments · May be fixed by #564 or #686
Open

Logic for splitting comma-separated inputs need to be fixed #555

neelanjan00 opened this issue Sep 6, 2022 · 3 comments · May be fixed by #564 or #686
Assignees
Labels
good first issue Good for newcomers

Comments

@neelanjan00
Copy link
Member

What happened: The comma-separated inputs are usually validated using a similar paradigm across all experiments:

instanceNamesList := strings.Split(experimentsDetails.VMInstanceName, ",")
if len(instanceNamesList) == 0 {
	return errors.Errorf("no instance name found to stop")
}

However, if the input string is an empty string then still the length of the resultant slice will be 1. Hence this check maybe simply updated with the following in all places:

if experimentsDetails.VMInstanceName == "" {
        return errors.Errorf("no instance name found to stop")
}
@neelanjan00 neelanjan00 added the good first issue Good for newcomers label Sep 6, 2022
@chinmaym07
Copy link
Contributor

Hi @neelanjan00
Can I try this ?

@neelanjan00
Copy link
Member Author

Sure!

@chinmaym07 chinmaym07 linked a pull request Sep 17, 2022 that will close this issue
9 tasks
@RipulHandoo
Copy link

Hi @neelanjan00, I'd like to work on this if the issue is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants