hey one observation: I use the sourcegraph chrome ...
# general
g
hey one observation: I use the sourcegraph chrome extension in my browser: https://chrome.google.com/webstore/detail/sourcegraph/dgjhfomjieaadpoljlnidmbgkdffpack which is supposed to give code hinting and navigation when browsing typescript code on github. I’m noticing however that sourcegraph is never able to resolve pulumi packages. I believe this may be caused by the inability to install pulumi packages when the pulumi CLI is not installed (i.e. one of the postinstall scripts fail the installation). Sourcegraph probably (that is my understanding) attempts to automatically installs npm packages on a remote server and then uses the downloaded packages to power their code intelligence API. Probably this remote server is unable to download the package because it doesn’t have pulumi CLI installed. Any thoughts on how to fix this? Would it be possible to make pulumi npm packages installable without having pulumi CLI installed?
w
Interesting - we should definitely look into this. Not sure exactly how SourceGraph resolves these - but your guess about why it's not working seems plausible. Having installation warn instead of fail if
pulumi
is not installed may be a solution here.
g
hey @white-balloon-205 any update on the issue above? shoudl i create a gh issue?
w
We addressed the issue of failing installation when Pulumi is missing in https://github.com/pulumi/pulumi/issues/2155, which should be part of latest releases. Are you still seeing the problem? If so, it’s very possible there is something else going on here. For example, our packages don’t live at the root of the repo they are defined in, and go through a not trivial build process. It’s possible something about that process doesn’t work with SourceGraph? Do they provide a way to diagnose this sort of thing?
g
aehm, I’m seeing this problem not in sourcegraph, but rather in our own CI pipeline. There is a a few stages in the CI pipeline which need to install a package which contains some pulumi packages, even though this stage does not execute pulumi.
npm ci
fails with this error:
Copy code
$ npm ci

> protobufjs@6.8.8 postinstall /solvvy/solvvy-apis/node_modules/protobufjs
> node scripts/postinstall


> grpc@1.17.0 install /solvvy/solvvy-apis/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download 
[grpc] Success: "/solvvy/solvvy-apis/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote

> @pulumi/kubernetes@v0.18.0 install /solvvy/solvvy-apis/node_modules/@pulumi/kubernetes
> node scripts/install-pulumi-plugin.js resource kubernetes v0.18.0


There was an issue installing the resource provider plugin. It looks like `pulumi` is not installed on your system. Please visit <https://pulumi.io/> to get Pulumi.
You may try to manually installing the plugin by running `pulumi plugin install resource kubernetes v0.18.0`

> @pulumi/gcp@v0.16.2 install /solvvy/solvvy-apis/node_modules/@pulumi/gcp
> pulumi plugin install resource gcp v0.16.2

sh: 1: pulumi: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @pulumi/gcp@v0.16.2 install: `pulumi plugin install resource gcp v0.16.2`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @pulumi/gcp@v0.16.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-22T12_44_42_353Z-debug.log
ERROR: Job failed: command terminated with exit code 1
I suspect maybe this is just a problem with the gcp plugin since this has last been released Nov 14th before #2155 was closed?
ok, nvm, I guess this commit fixes it https://github.com/pulumi/pulumi-gcp/commit/d435984812c3263301c15651e755f234047ffdeb and I just have to wait for the next release.
w
Ahh - yes - you are right that this is just a case of the package not being released since that change was merged in. I've kicked off a release of
0.16.3
with just the couple of bug fixes.
👍 1
g
cool thanks!