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

Plugins can't be executed on Windows #737

Closed
dsimansk opened this issue Mar 11, 2020 · 3 comments · Fixed by #738
Closed

Plugins can't be executed on Windows #737

dsimansk opened this issue Mar 11, 2020 · 3 comments · Fixed by #738
Assignees
Labels
good first issue Denotes an issue ready for a new contributor. kind/bug Categorizes issue or PR as related to a bug.

Comments

@dsimansk
Copy link
Contributor

dsimansk commented Mar 11, 2020

Bug report

We use syscall.Exec() as underlying mechanism to execute plugins locally. However, syscall doesn't support Windows as target platform.

The very same problem resolved in kubectl.

// Execute implements PluginHandler
func (h *DefaultPluginHandler) Execute(executablePath string, cmdArgs, environment []string) error {
return syscall.Exec(executablePath, cmdArgs, environment)
}

Expected behavior

kn plugins are executable on Windows.

kn version

HEAD

/kind good-first-issue

@dsimansk dsimansk added the kind/bug Categorizes issue or PR as related to a bug. label Mar 11, 2020
@knative-prow-robot knative-prow-robot added the good first issue Denotes an issue ready for a new contributor. label Mar 11, 2020
@MIBc
Copy link
Contributor

MIBc commented Mar 12, 2020

We can refer to kubectl. I can help to do it.

@rhuss
Copy link
Contributor

rhuss commented Mar 12, 2020

Cool, thanks ! I'll assign the issue to you

/assign MIBc

MIBc added a commit to MIBc/client that referenced this issue Mar 12, 2020
Fixes knative#737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
MIBc added a commit to MIBc/client that referenced this issue Mar 12, 2020
Fixes knative#737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
@maximilien
Copy link
Contributor

I also wonder if there is a way to extend PROW to support any platform specific e2e tests execution? Would be useful for this issue (Windows) and the small differences between Mac OSX and Linux. For instance this issue Mac OS X-specific issue #733 will require a Mac to test.

I am going to open an issue to capture this problem. It’s not high-priority since we can trust the various contributors have done the tests but that clearly will not be a long term solution for automated CI.

MIBc added a commit to MIBc/client that referenced this issue Mar 18, 2020
Fixes knative#737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
MIBc added a commit to MIBc/client that referenced this issue Mar 20, 2020
Fixes knative#737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
knative-prow-robot pushed a commit that referenced this issue Mar 20, 2020
Fixes #737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
dsimansk pushed a commit to dsimansk/client that referenced this issue Mar 20, 2020
Fixes knative#737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.
knative-prow-robot pushed a commit that referenced this issue Mar 24, 2020
* fix(trigger): Make --filter flag truly optional (#745)

* fix(trigger): Make --filter flag truly optional

* fix(trigger): Update trigger docs

* chore: Update changelog

* fix(trigger): Fix filter delete for trigger update (#746)

* chore: Update changelog

* Fix plugin execution for Windows (#738)

Fixes #737

* Use exec.Command instend of syscall.Exec for windows.
* Fix a bug in plugin handler test when running it on windows.
* Fix typo.

* fix: Fix default config path on Windows (#752)

Co-authored-by: Lv Jiawei <lvjiawei@cmss.chinamobile.com>
dsimansk added a commit to dsimansk/client that referenced this issue Jun 29, 2021
* [release-v0.22.0] Update func to v0.16.0

* [release-v0.22.0] Update func to latest release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants