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

Fixed ResourceOption deepcopy bug in stack_reference.py #4553

Merged
merged 5 commits into from
May 8, 2020

Conversation

solidDoWant
Copy link
Contributor

Replaced copy statements with ResourceOptions.merge in stack_reference.py. If a set of ResourceOptions is passed with parent set then the resource creation fails due to deepcopy failing.

Minimum code to reproduce:

from typing import Optional
from pulumi import ResourceOptions, StackReference, ComponentResource

class SomeComponent(ComponentResource):
    def __init__(self, name: str, stack_name: str, opts: Optional[ResourceOptions] = None):
        super().__init__("some_component", name, {}, opts)

        self.stack_reference: StackReference = StackReference(
            name = f"{name}-stack_reference",
            opts = ResourceOptions(parent=self),
            stack_name = stack_name
        )

stack_name: str = "REDACTED"

SomeComponent("example_of_problem", stack_name)

@solidDoWant
Copy link
Contributor Author

solidDoWant commented May 2, 2020

Anybody know why Travis is failing the pre-install tasks? Looks like it's trying to download something from a site with an expired cert.

Looks like yarn's website cert expired or something, it's passing now

@leezen leezen requested a review from pgavlin May 3, 2020 02:50
Copy link
Member

@lukehoban lukehoban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lukehoban lukehoban merged commit b7fb3ba into pulumi:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants