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

Benchmark doesn't work on Windows #1357

Closed
Thanzex opened this issue Dec 6, 2021 · 2 comments
Closed

Benchmark doesn't work on Windows #1357

Thanzex opened this issue Dec 6, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Thanzex
Copy link

Thanzex commented Dec 6, 2021

Whenever i try to benchmark a pod in my windows machines the benchmark would start but not show up in the :benchmark menu nor in the view benchmarks section of portforward.
Reviewing the logs I see this:

�[90m12:05PM�[0m �[1m�[31mERR�[0m�[0m Saving Benchmark �[31merror=�[0m�[31m"open C:\\Users\\bfren\\AppData\\Local\\Temp\\k9s-bench-LAPTOP-91BCJNIT\\bfren\\CLUSTER\\NAMESPACE_POD||30080:3000_1638788739485939400.txt: The filename, directory name, or volume label syntax is incorrect."�[0m

The path contains two illegal characters for Windows, : and |. Apparently, #746 partially fixed this by sanitizing : but failed to include |.
I guess the fix should be as simple as adding the whole list of illegal characters for windows here

invalidPathCharsRX = regexp.MustCompile(`[:/\\]+`)

Also, as you can see logs seem to be full of illegal characters, probably related to using colors in the log, which should only be printed to the console and not saved to a file.

To Reproduce
Steps to reproduce the behavior:

  1. Open a port-frward
  2. Start a benchmark
  3. try to open the aforementioned benchmark.

Expected behavior
The benchmark should appear under :benchmark

Versions (please complete the following information):

  • OS: Windows 10-11
  • K9s: v0.25.8
@derailed derailed added the bug Something isn't working label Dec 6, 2021
@derailed
Copy link
Owner

@Thanzex - fixed v0.25.10

@Thanzex
Copy link
Author

Thanzex commented Dec 14, 2021

@derailed - Wonderful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants