https://pulumi.com logo
#general
Title
# general
g

gray-train-95118

09/22/2023, 7:36 PM
Hi all, can somebody help me build a provider locally? Specifically I am trying to build pulumi-docker for python. I have followed the setup steps at https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md and then tried the following:
Copy code
ulimit -n 5000
make provider
chmod +x ./bin/pulumi-resource-docker
chmod +x ./bin/pulumi-tfgen-docker
make install_plugins
export PATH=$PATH:$PWD/bin
export PACKAGE_VERSION=$(pulumictl get version --language generic)
make build_python
curl <https://raw.githubusercontent.com/pulumi/scripts/master/ci/check-worktree-is-clean> | bash
tar -zcf sdk/python.tar.gz -C sdk/python .
This outputs a tar.gz archive, and when I try to pip install it, I get the following error:
Copy code
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['pulumi', 'plugin', 'install', 'resource', 'docker', '0.0.0']' returned non-zero exit status 255.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for pulumi-docker
Failed to build pulumi-docker
ERROR: Could not build wheels for pulumi-docker, which is required to install pyproject.toml-based projects
tagging @melodic-tomato-39005 so you know I'm still working on this. It has been a busy week.
s

shy-arm-32391

09/22/2023, 8:12 PM
hi, do you mind me asking a few questions?
are you using docker at latest?
g

gray-train-95118

09/22/2023, 8:15 PM
ask away! um I would have to check my docker version...but I'm not using docker to try to build the provider. I'm building on my Linux Mint 21.2 desktop.
s

shy-arm-32391

09/22/2023, 8:16 PM
disclaimer: I am not at all a pythonista but it may be that you're hitting the middle of our migration to using wheels publishing
sorry! my internal brain is using unhelpful shorthand - my question about docker was whether you're trying to build off of the latest
pulumi-docker
.
g

gray-train-95118

09/22/2023, 8:22 PM
ah gotcha! I'm building off a fork that's a few commits behind now...actually trying to build from latest in this moment to see if it's a problem with the fork
s

shy-arm-32391

09/22/2023, 8:22 PM
We haven't rolled out wheels support for pulumi-docker as of quite yet so I doubt that's it.
g

gray-train-95118

09/22/2023, 8:27 PM
This output is coming from the
pip install python.tar.gz
command, I'm not trying to
python -m build
my own distribution, if that helps
s

shy-arm-32391

09/22/2023, 8:30 PM
yeah, you want to use the locally-build SDK, right? I think our instructions may be off I always build the node or go sdks heh 😅 - but the steps I'd follow are: 1.
make tfgen
(to ensure your schema is up to date) 2.
make build_python
and unset the PACKAGE_VERSION
g

gray-train-95118

09/22/2023, 8:32 PM
yes, I'm trying to test with docker desktop on linux for this PR: https://github.com/pulumi/pulumi-docker/pull/725
There are instructions??
I'll try that
s

shy-arm-32391

09/22/2023, 8:34 PM
😭 there should be 😞 also, now I remember you from the username! thank you so much for contributing! ❤️
g

gray-train-95118

09/22/2023, 8:35 PM
I'm trying haha. My real contribution will be adding more step by step instructions if I can figure this out.
s

shy-arm-32391

09/22/2023, 8:36 PM
the provider specific instructions are here: https://github.com/pulumi/pulumi-docker/blob/master/CONTRIBUTING.md but they're not entirely complete.
oh! and then
make install_python_sdk
to install the SDK on your machine to try out.
(that's a no-op for python though)
g

gray-train-95118

09/22/2023, 10:57 PM
Well you were spot on, I pulled in the latest updates from upstream/master and it's working correctly now. Thank you!
Also I'm sorry I hated on your instructions. This makes a lot more sense now that it is working and you all have been super helpful and encouraging every step of the way.
s

shy-arm-32391

09/29/2023, 2:09 PM
hi! sorry I disappeared from this thread - I was at a conference this week. I've just kicked off the final test suite and your PR should be good to go. Please do not ever apologize for highlighting unhelpful documentation! Especially not as someone who shows up and pulls up their sleeves to help. That's what open source is all about, suggesting improvements, and working together. 🙂 If you still have the bandwidth, I would love it if you filed an issue that highlighted where you ran into trouble with the build instructions. Filing against pulumi-docker is fine; we can probably improve things elsewhere as well.
g

gray-train-95118

09/29/2023, 8:16 PM
No worries! Just submitted an issue. Hopefully that helps.