`pulumi preview/up` just exits with code 255 and ...
# general
b
pulumi preview/up
just exits with code 255 and no error, not preview what do I do wrong? index.ts:
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const config = new pulumi.Config("gcp-bootstrap");

// Create a GCP resource (Storage Bucket)
const gke = new gcp.organisations.Project("gke01", {
    orgId: config.require("organisation")
});

// Export the DNS name of the bucket
export const gkeId = gke.id;
tail of
pulumi preview
Copy code
Logging in using access token from PULUMI_ACCESS_TOKEN
Previewing update ($CORP/prod):

Permalink: <https://app.pulumi.com/$CORP/gcp-bootstrap/prod/previews/242b9dd0-b832-4f99-94fd-de87398528ca>
exact command I run:
Copy code
./scripts/docker_run.sh pulumi preview --verbose 3 --stack adohkan/prod
where ./scripts/docker_run.sh is:
Copy code
!/bin/bash

MAVENPROXY_URL=<https://mycorp-caching-proxy/>
#MAVENPROXY_URL=https://

exec docker run --rm \
  ${https_proxy:+-e https_proxy="${https_proxy}"} \
  ${http_proxy:+-e http_proxy="${http_proxy}"} \
  ${no_proxy:+-e no_proxy="${no_proxy}"} \
  ${PULUMI_ACCESS_TOKEN:+-e PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN}} \
  -e GOOGLE_APPLICATION_CREDENTIALS=/root/.config/gcloud/application_default_credentials.json \
  -v ~/.config/gcloud/application_default_credentials.json:/root/.config/gcloud/application_default_credentials.json:ro \
  -e MAVENPROXY_URL="${MAVENPROXY_URL}" \
  -v $(pwd):/code \
  -v yarm_cache:/usr/local/share/.cache/yarn \
  -w /code \
  --entrypoint= \
  -it \
  -v $(pwd)/certs:/usr/local/share/ca-certificates:ro \
  pulumi/pulumi:latest /bin/sh -uec './scripts/prep.sh; exec "$@"' -- "$@"
and
./scripts/prep.sh
is:
Copy code
#!/bin/sh
set -ue

update-ca-certificates

export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
npm config --global set cache /npm-cache
npm config --global set cafile /etc/ssl/certs/ca-certificates.crt
npm config --global set registry ${MAVENPROXY_URL}<http://registry.npmjs.org/|registry.npmjs.org/>
npm config --global set noproxy ".cluster.local,.mycorp"

pulumi  plugin install resource gcp $(python -c 'import json; print("v" + json.load(open("package-lock.json"))["dependencies"]["@pulumi/gcp"]["version"])') --server ${MAVENPROXY_URL}<http://api.pulumi.com/releases/plugins|api.pulumi.com/releases/plugins>  --verbose

yarn install

gcloud config set proxy/type http
gcloud config set proxy/address 165.225.80.41
gcloud config set proxy/port 10074
gcloud config set core/custom_ca_certs_file /etc/ssl/certs/ca-certificates.crt
w
I am not aware of any known reason for that to happen. I would always expect an error report. You could try running with
--logtostderr -v=9 2> out.txt
to capture more details logging.
b
Copy code
I0808 10:30:40.170286       6 plugins.go:466] GetPluginPath(language, nodejs, <nil>): found on $PATH /usr/bin/pulumi-language-nodejs
I0808 10:30:40.170297       6 plugins.go:130] ensurePluginsAreInstalled(): plugin nodejs <nil> already installed
I0808 10:30:40.170496       6 plugins.go:505] GetPluginPath(resource, gcp, 0.18.15): enabling new plugin behavior
I0808 10:30:40.170508       6 plugins.go:587] SelectCompatiblePlugin(..., gcp): beginning
I0808 10:30:40.170518       6 plugins.go:616] SelectCompatiblePlugin(..., gcp): best plugin gcp-0.18.15: semver match
I0808 10:30:40.170537       6 plugins.go:629] SelectCompatiblePlugin(..., gcp): selecting plugin 'gcp-0.18.15': best match 
I0808 10:30:40.170550       6 plugins.go:552] GetPluginPath(resource, gcp, 0.18.15): found in cache at /root/.pulumi/plugins/resource-gcp-v0.18.15/pulumi-resource-gcp
I0808 10:30:40.170557       6 plugins.go:130] ensurePluginsAreInstalled(): plugin gcp 0.18.15 already installed
I0808 10:30:40.170564       6 plugins.go:145] ensurePluginsAreInstalled(): completed
I0808 10:30:40.170571       6 plugins.go:228] computeDefaultProviderPlugins(): considering nodejs
I0808 10:30:40.170579       6 plugins.go:231] computeDefaultProviderPlugins(): skipping nodejs, not a resource provider
I0808 10:30:40.170586       6 plugins.go:228] computeDefaultProviderPlugins(): considering gcp-0.18.15
I0808 10:30:40.170595       6 plugins.go:257] computeDefaultProviderPlugins(): plugin gcp-0.18.15 selected for package gcp (first seen)
I0808 10:30:40.170602       6 plugins.go:263] computeDefaultProviderPlugins(): summary of default plugins:
I0808 10:30:40.170608       6 plugins.go:265]   gcp             = 0.18.15

I0808 10:30:40.170733       6 step_generator.go:554] stepGenerator.GeneratePendingDeletes(): scanning previous snapshot for pending deletes
I0808 10:30:40.170743       6 plan_executor.go:251] planExecutor.retirePendingDeletes(...): no pending deletions
I0808 10:30:40.170759       6 plan_executor.go:138] planExecutor.Execute(...): waiting for incoming events
I0808 10:30:40.170770       6 langruntime_plugin.go:136] langhost[nodejs].Run(pwd=/code,program=.,#args=0,proj=gcp-bootstrap,stack=prod,#config=0,dryrun=true) executing
I0808 10:30:40.170776       6 step_executor.go:321] StepExecutor worker(-2): worker coming online
I0808 10:30:40.170789       6 step_executor.go:321] StepExecutor worker(-2): worker waiting for incoming chains
I0808 10:30:40.720906       6 langruntime_plugin.go:163] langhost[nodejs].RunPlan(pwd=/code,program=.,...,dryrun=true) success: progerr=
I0808 10:30:40.721708       6 source_eval.go:163] EvalSourceIterator ended with bail.
I0808 10:30:40.721718       6 plan_executor.go:142] planExecutor.Execute(...): incoming event (nil? true, &{<nil>})
I0808 10:30:40.721730       6 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): waiting for worker threads to exit
I0808 10:30:40.721737       6 step_executor.go:321] StepExecutor worker(-2): worker exiting due to cancellation
I0808 10:30:40.721746       6 step_executor.go:321] StepExecutor worker(-1): StepExecutor.waitForCompletion(): worker threads all exited
I0808 10:30:40.721755       6 plan_executor.go:195] planExecutor.Execute(...): step executor has completed
I0808 10:30:40.721787       6 plan_executor.go:72] planExecutor.Execute(...): exiting provider canceller
I0808 10:30:40.721779       6 ignore.go:44] Explicitly ignoring and discarding error: rpc error: code = Canceled desc = grpc: the client connection is closing