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

Mixin errors out when Porter attempts to get schema #40

Closed
vdice opened this issue Oct 7, 2021 · 1 comment
Closed

Mixin errors out when Porter attempts to get schema #40

vdice opened this issue Oct 7, 2021 · 1 comment

Comments

@vdice
Copy link
Contributor

vdice commented Oct 7, 2021

It looks like this mixin is erroring out when Porter attempts to get its schema; because of this, the mixin isn't added to the global Porter schema and thus VSCode/auto-complete thinks usage of helm3 is invalid (because it isn't in the mixin list in Porter's schema).

(At least, I think that's roughly the problem 😄)

$ porter mixin install helm3 --feed-url https://mchorfa.github.io/porter-helm3/atom.xml
installed helm3 mixin v0.1.15-1-g502102c (502102c)

# This emulates what Porter will run to get the mixin schema
$ ~/.porter/mixins/helm3/helm3 schema
Error: stat /Users/vdice/go/src/github.com/MChorfa/porter-helm3/schema/schema.json: no such file or directory
err: stat /Users/vdice/go/src/github.com/MChorfa/porter-helm3/schema/schema.json: no such file or directory

However, note that when building this mixin locally and installing, no error occurs:

 $ make build install
GO111MODULE=on go mod tidy
GO111MODULE=on go generate ./...
mkdir -p bin/mixins/helm3
GO111MODULE=on go build -ldflags '-w -X github.com/MChorfa/porter-helm3/pkg.Version=v0.1.15-2-g4f18e33 -X github.com/MChorfa/porter-helm3/pkg.Commit=4f18e33' -o bin/mixins/helm3/helm3 ./cmd/helm3
mkdir -p bin/mixins/helm3
GOARCH=amd64 GOOS=linux GO111MODULE=on go build -ldflags '-w -X github.com/MChorfa/porter-helm3/pkg.Version=v0.1.15-2-g4f18e33 -X github.com/MChorfa/porter-helm3/pkg.Commit=4f18e33' -o bin/mixins/helm3/helm3-runtime ./cmd/helm3
cd pkg/helm3 && packr2 clean
# @porter mixin uninstall helm3
mkdir -p /Users/vdice/.porter/mixins/helm3/runtimes
install bin/mixins/helm3/helm3 /Users/vdice/.porter/mixins/helm3/helm3
install bin/mixins/helm3/helm3-runtime /Users/vdice/.porter/mixins/helm3/runtimes/helm3-runtime
# @porter mixin list

$ ~/.porter/mixins/helm3/helm3 schema
{
  "$schema":"http://json-schema.org/draft-07/schema#",
  "definitions":{
    "installStep":{
      "type":"object",
      "properties":{
        "helm3":{
...
@carolynvs
Copy link
Collaborator

I have an open PR to fix helm3's schema: #39

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

No branches or pull requests

2 participants