Skip to content
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

[sdk/{go,nodejs,python}] Fix DeletedWith resource option #11883

Merged
merged 1 commit into from Jan 16, 2023

Commits on Jan 16, 2023

  1. [sdk/{go,nodejs,python}] Fix DeletedWith resource option

    This change fixes the `DeletedWith` resource option in the Go, Node.js,
    and Python SDKs and adds tests.
    
    This feature was a community contribution and while there were engine
    tests included with the original PR, there weren't any tests confirming
    the functionality worked correctly from each SDK.
    
    Here's a summary of the fixes:
    
    * Go: The `DeletedWith` resource option was never usable as it accepted
      a URN instead of a Resource. We discussed this internally a while back
      and decided to go ahead and fix this. (Note: While changing the
      signature is technically a breaking change, the feature is currently
      unusable, so the change would not break anyone, so there's no need to
      wait for a major version bump.)
    
    * Node.js: The `deletedWith` resource option did not work at all from
      the Node.js SDK because it was incorrectly passing the resource object
      itself in the RegisterResource request, rather than the resource's
      URN.
    
    * Python: The `deleted_with` resource option did not work at all from
      the Python SDK because it was incorrectly passing the resource object
      itself in the RegisterResource request, rather than the resource's
      URN.
    
    A `FailsOnDelete` resource has been added to the testprovider, which
    will fail when its `Delete` gRPC is called. The tests use this to ensure
    `Delete` is not called for resources of this type with the `DeletedWith`
    option specified.
    justinvp committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    0b13f91 View commit details
    Browse the repository at this point in the history