Thread
#general
    s

    steep-baker-41148

    2 months ago
    Hi there, is there a way to see how FileArchive is implemented in Pulumi? I'm trying to upload Lambda to AWS using Pulumi Python and it always shows changes when different developers are doing pulumi up. So I'm wondering what exactly does it hash, e.g. are timestamps considered and so on - I could try to switch to StringAsset but this sounds stupid
    b

    bored-oyster-3147

    2 months ago
    The Pulumi SDK is open source, you can find the python implementation of FileArchive here: https://github.com/pulumi/pulumi/blob/06ba63bb57e90706c1550861b785075ae860144a/sdk/python/lib/pulumi/asset.py#L99
    You'll need to dig around a bit more in the
    /sdk/python/lib/pulumi
    directory to find how it is used.
    s

    steep-baker-41148

    2 months ago
    @bored-oyster-3147 well, I've seen that already thanks but it doesn't help. It seems to be some Python wrapper round allegedly deep Go internals and you can't see what is being done or not done (as in hashed) by just reading the Python SDK code. This is why I'm asking where I could find the real source. Searching Pulumi repositories for "FileArchive" didn't get me far. I only found some Go generator code
    b

    bored-oyster-3147

    2 months ago
    The SDK components are essentially serialized and sent to the golang side for interpretation and provisioning. So you'd likely need to find where the golang server side code for the file archive is deserialized and handled.
    s

    steep-baker-41148

    2 months ago
    Right, that's why I'm asking for pointers here
    b

    bored-oyster-3147

    2 months ago
    I think you want to search
    archive
    instead of
    filearchive
    . I don't think the backend differentiates from the different types of archives much. I have found the following: Some hashing mentioned in the object diffing here:https://github.com/pulumi/pulumi/blob/a5687d16a9d9dfa0c562a10489a88ce2a5986421/pkg/backend/display/object_diff.go#L586 This is an engine event you could trace around to see what its doing:https://github.com/pulumi/pulumi/blob/a5687d16a9d9dfa0c562a10489a88ce2a5986421/pkg/engine/events.go#L506 And another archive handling event for stack deployment:https://github.com/pulumi/pulumi/blob/5528cde977ff1006895ad1a56b089a3ff43a3d90/pkg/resource/stack/deployment.go#L574
    s

    steep-baker-41148

    2 months ago
    Hmmm, so my problem is that in the state file, the outputs look like
    "code": "/tmp/pulumi-asset-049f885f54552ba53ad1a1c8c477c3681be05baf8e6fb7465fc5a2fdf72ffe18"
    o_O
    b

    bored-oyster-3147

    2 months ago
    Might need to open an issue or ping someone on the Pulumi team so that you can get an answer from one of them!
    s

    steep-baker-41148

    2 months ago
    b

    bored-oyster-3147

    2 months ago
    Gotcha. Ironically that was actually an old coworker of mine lol. Well if you can get your issue reproducible like he did wouldn't hurt to open it back up