-
Notifications
You must be signed in to change notification settings - Fork 12
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
Attempt resource method on provider #265
Draft
iwahbe
wants to merge
2
commits into
main
Choose a base branch
from
iwahbe/attempt-resource-method-on-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It seems like this doesn't work, since the Provider doesn't see the resulting `Call`. Instead, the built-in `pulumi` provider receives the `Call`, then errors: <details> <summary> `pulumi up` result </summary> ```console $ pulumi up Previewing update (dev) View in Browser (Ctrl+O): https://app.pulumi.com/pulumi/dev/dev/previews/490ebc68-af05-49e7-96a2-e6182339ce67 Loading policy packs... Type Name Plan Info + pulumi:pulumi:Stack dev-dev create 1 error + └─ pulumi:providers:test explicit-provider create Policies: ✅ [email protected] Diagnostics: pulumi:pulumi:Stack (dev-dev): error: Program failed with an unhandled exception: Traceback (most recent call last): File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 361, in do_rpc_call return monitor.Call(req) ^^^^^^^^^^^^^^^^^ File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/grpc/_channel.py", line 1160, in __call__ return _end_unary_response_blocking(state, call, False, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/grpc/_channel.py", line 1003, in _end_unary_response_blocking raise _InactiveRpcError(state) # pytype: disable=not-instantiable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNKNOWN details = "call of pulumi:providers:test/makePet returned an error: the builtin provider does not implement call" debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-08-20T17:33:11.944431+02:00", grpc_status:2, grpc_message:"call of pulumi:providers:test/makePet returned an error: the builtin provider does not implement call"}" > During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ianwahbe/go/bin/pulumi-language-python-exec", line 197, in <module> loop.run_until_complete(coro) File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 142, in run_in_stack await run_pulumi_func(run) File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 56, in run_pulumi_func await wait_for_rpcs() File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 118, in wait_for_rpcs await task File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 366, in do_call resp = await asyncio.get_event_loop().run_in_executor(None, do_rpc_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/invoke.py", line 363, in do_rpc_call handle_grpc_error(exn) File "/Users/ianwahbe/go/src/github.com/pulumi/pulumi-go-provider/examples/call/consumer/venv/lib/python3.12/site-packages/pulumi/runtime/settings.py", line 307, in handle_grpc_error raise grpc_error_to_exception(exn) Exception: call of pulumi:providers:test/makePet returned an error: the builtin provider does not implement callg ``` </details>
iwahbe
force-pushed
the
iwahbe/attempt-resource-method-on-provider
branch
from
August 20, 2024 15:42
7a23394
to
54afde5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems like this doesn't work, since the Provider doesn't see the resulting
Call
. Instead, the built-inpulumi
provider receives theCall
, then errors:`pulumi up` result