Skip to content

Errors in make prepare #634

@anoland

Description

@anoland

Describe what happened

Related to #342

I'm also having problems but I get different errors. I make a copy of the template and clone locally. Before I run the "make prepare" I run "make test" and get these expected failures because I don't have all the requirements.

cd provider && go test -short -v -count=1 -cover -timeout 2h -parallel 4 -coverprofile="coverage.txt" ./...
=== RUN   TestRandomResource
=== PAUSE TestRandomResource
=== CONT  TestRandomResource
    random_resource_test.go:47: Outputs: {map[length:{false [] 24} result:{false [] g2bgM7oEcQKEF8YAGULg5xjp}]}
--- PASS: TestRandomResource (0.00s)
PASS
coverage: 53.3% of statements
ok      github.com/pulumi/pulumi-provider-boilerplate/provider  0.014s  coverage: 53.3% of statements
        github.com/pulumi/pulumi-provider-boilerplate/provider/cmd/pulumi-resource-pulumi-provider-example              coverage: 0.0% of statements
cd examples && go test -v -tags=all -timeout 2h
=== RUN   TestDotnet
--- PASS: TestDotnet (0.00s)
=== RUN   TestGoExampleLifecycle
    go_test.go:21: PULUMI_BACKEND_URL=file:///tmp/TestGoExampleLifecycle2120366791/002
    go_test.go:21: PULUMI_DEBUG_GRPC=/tmp/TestGoExampleLifecycle2120366791/003/grpc.json
    go_test.go:21: starting providers
    go_test.go:21: creating stack test
    go_test.go:21: adding go.mod replacement: /home/anoland/projects/pkg/mod/golang.org/[email protected]/bin/go mod edit -replace github.com/pulumi/pulumi-provider-boilerplate/sdk/go/pulumi-provider-boilerplate=/home/anoland/projects/src/github.com/anoland/pulumi-provider-example/sdk/go/pulumi-provider-boilerplate
    go_test.go:27: previewing update
    go_test.go:28: deploying
    go_test.go:29: destroying
    go_test.go:21: destroying stack, to skip this set PULUMITEST_SKIP_DESTROY_ON_FAILURE=true
    go_test.go:21: Removed temp directories. To retain these, set PULUMITEST_RETAIN_FILES=true
--- PASS: TestGoExampleLifecycle (7.32s)
=== RUN   TestJava
--- PASS: TestJava (0.00s)
=== RUN   TestNodejsExampleLifecycle
    nodejs_test.go:14: linking isn't working correctly
--- SKIP: TestNodejsExampleLifecycle (0.00s)
=== RUN   TestPython
--- PASS: TestPython (0.00s)
=== RUN   TestYAMLExampleLifecycle
    yaml_test.go:16: PULUMI_BACKEND_URL=file:///tmp/TestYAMLExampleLifecycle1307020466/002
    yaml_test.go:16: PULUMI_DEBUG_GRPC=/tmp/TestYAMLExampleLifecycle1307020466/003/grpc.json
    yaml_test.go:16: starting providers
    yaml_test.go:16: creating stack test
    yaml_test.go:21: previewing update
    yaml_test.go:21: failed to preview update: failed to run preview: exit status 255
        code: 255
        stdout: Previewing update (test):
        
        stderr: error: failed to load language plugin yaml: no language plugin 'pulumi-language-yaml' found in the workspace
        
        
    yaml_test.go:16: destroying stack, to skip this set PULUMITEST_SKIP_DESTROY_ON_FAILURE=true
    yaml_test.go:16: Skipping removal of programDir temp directories on failures: "/tmp/TestYAMLExampleLifecycle1307020466"
    yaml_test.go:16: To remove these directories on failures, set PULUMITEST_RETAIN_FILES_ON_FAILURE=false
--- FAIL: TestYAMLExampleLifecycle (1.19s)
=== RUN   TestYAMLExampleUpgrade
    yaml_test.go:27: PULUMI_BACKEND_URL=file:///tmp/TestYAMLExampleUpgrade318197825/002
    yaml_test.go:27: PULUMI_DEBUG_GRPC=/tmp/TestYAMLExampleUpgrade318197825/003/grpc.json
    yaml_test.go:27: starting providers
    yaml_test.go:27: creating stack test
    yaml_test.go:31: PULUMI_BACKEND_URL=file:///tmp/TestYAMLExampleUpgrade318197825/005
    yaml_test.go:31: PULUMI_DEBUG_GRPC=/tmp/TestYAMLExampleUpgrade318197825/006/grpc.json
    yaml_test.go:31: starting providers
    yaml_test.go:31: creating stack test
    yaml_test.go:31: run cache found at testdata/recorded/TestProviderUpgrade/yaml/0.0.1/stack.json
    yaml_test.go:31: importing stack
    yaml_test.go:31: previewing update
    yaml_test.go:31: failed to preview update: failed to run preview: exit status 255
        code: 255
        stdout: Previewing update (test):
        
        stderr: error: failed to load language plugin yaml: no language plugin 'pulumi-language-yaml' found in the workspace
        
        
    yaml_test.go:27: destroying stack, to skip this set PULUMITEST_SKIP_DESTROY_ON_FAILURE=true
    yaml_test.go:27: Skipping removal of programDir temp directories on failures: "/tmp/TestYAMLExampleUpgrade318197825"
    yaml_test.go:27: To remove these directories on failures, set PULUMITEST_RETAIN_FILES_ON_FAILURE=false
--- FAIL: TestYAMLExampleUpgrade (1.92s)
FAIL
exit status 1
FAIL    github.com/pulumi/pulumi-provider-boilerplate/examples  10.451s
make: *** [Makefile:180: test] Error 1

That is just a starting point.
When I try the prepare step this happens.

%printenv | grep -E '^ORG|NAME|REPO'
ORG=anoland
NAME=pulumi-provider-example
REPOSITORY=github.com/anoland/pulumi-provider-example
[email protected]: (pulumi-provider-example@main) github.com/anoland/pulumi-provider-example 
%make prepare
# SED needs to not fail when encountering unicode characters
LC_CTYPE=C 
LANG=C
mv "provider/cmd/pulumi-resource-provider-boilerplate" provider/cmd/pulumi-resource-pulumi-provider-example # SED_SKIP
# In MacOS the -i parameter needs an empty  to execute in place.
if [[ "" == "Darwin" ]]; then \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '' '/SED_SKIP/!s,github.com/pulumi/pulumi-[x]yz,github.com/anoland/pulumi-provider-example,g' {} \; ; \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '' '/SED_SKIP/!s/[xX]yz/pulumi-provider-example/g' {} \; ; \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '' '/SED_SKIP/!s/[aA]bc/anoland/g' {} \; ; \
else \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '/SED_SKIP/!s,github.com/pulumi/pulumi-[x]yz,github.com/anoland/pulumi-provider-example,g' {} \; ; \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '/SED_SKIP/!s/[xX]yz/pulumi-provider-example/g' {} \; ; \
        find . \( -path './.git' -o -path './sdk' \) -prune -o -not -name 'go.sum' -type f -exec sed -i '/SED_SKIP/!s/[aA]bc/anoland/g' {} \; ; \
fi
[email protected]: (pulumi-provider-example@main) github.com/anoland/pulumi-provider-example 
%make test
cd provider && go test -short -v -count=1 -cover -timeout 2h -parallel 4 -coverprofile="coverage.txt" ./...
# github.com/pulumi/pulumi-provider-boilerplate/provider/cmd/pulumi-resource-pulumi-provider-example/pulumi-resource-provider-boilerplate
cmd/pulumi-resource-pulumi-provider-example/pulumi-resource-provider-boilerplate/main.go:23:8: missing import path
FAIL    github.com/pulumi/pulumi-provider-boilerplate/provider/cmd/pulumi-resource-pulumi-provider-example/pulumi-resource-provider-boilerplate [setup failed]
=== RUN   TestRandomResource
=== PAUSE TestRandomResource
=== CONT  TestRandomResource
    random_resource_test.go:47: Outputs: {map[length:{false [] 24} result:{false [] o2tGUfKRmRiqEJAI6oVtYCMO}]}
--- PASS: TestRandomResource (0.00s)
PASS
coverage: 53.3% of statements
ok      github.com/pulumi/pulumi-provider-boilerplate/provider  0.015s  coverage: 53.3% of statements
        github.com/pulumi/pulumi-provider-boilerplate/provider/cmd/pulumi-resource-pulumi-provider-example              coverage: 0.0% of statements
FAIL
make: *** [Makefile:106: test_provider] Error 1
%go vet ./...
provider/cmd/pulumi-resource-pulumi-provider-example/pulumi-resource-provider-boilerplate/main.go:23:8: missing import path
tests/provider_test.go:27:8: missing import path

I can't even get that far as the test failures.

Sample program

Not program yet. Just trying to get the boilerplate set up.

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

pulumi about
CLI
Version 3.199.0
Go Version go1.25.1 X:nodwarf5
Go Compiler gc

Host
OS arch
Version "rolling"
Arch x86_64

Backend
Name dionysus
URL file://.pulumifs
User anoland
Organizations
Token type personal

Pulumi locates its logs in /tmp by default
warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /home/anoland/projects/src/github.com/anoland/pulumi-provider-example). If you have not created a project yet, use pulumi new to do so: no project file found
warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /home/anoland/projects/src/github.com/anoland/pulumi-provider-example). If you have not created a project yet, use pulumi new to do so: no project file found

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSome behavior is incorrect or out of spec

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions