pulumi / pulumi-synced-folder

A Pulumi component that synchronizes a local folder to Amazon S3, Azure Blob Storage, or Google Cloud Storage.
Apache License 2.0
3 stars 2 forks source link

problem with synced-folder 0.10.2 #27

Closed marekkwiecien closed 1 year ago

marekkwiecien commented 1 year ago

We're using this feature when syncing folder kept in git with s3 like this (typescript):

    const folder = new synced.S3BucketFolder("synced-folder", {
        path: "./testdata",
        bucketName: "somebucketname",
        acl: aws.s3.BucketOwnerFullControlAcl,
        managedObjects: false
    });

This is executed by github action during deployment to some specific env.

We observed that the folder is synced just once - when created for the first time only. New files when the synced-folder resource exists do nto get uploaded to s3. Is there a way to further debug this?

cnunciato commented 1 year ago

Thanks for the report! I'm able to reproduce this. Looking into it.

cnunciato commented 1 year ago

Dug into this a bit more over the weekend. It looks like this is a bug either in the Command provider (which this component uses to run commands like aws s3 sync when managedObjects is false) or in pulumi-go-provider. Specifically, the bug is that changes to the Command's environment property (whose value changes when the synced folder's contents change) are not triggering its update script to be run as they should be.

https://github.com/pulumi/pulumi-command/issues/231 to track has been filed to track what we think is the core issue, but I'll leave this one open as I'm sure other users of this component are seeing it as well.

gbegher commented 1 year ago

It seems that the core of the issue was fixed but that the change is not yet reflected in the package. Maybe this just needs a version bump to trigger a new release @cnunciato?

edit: Simply updating the dependcy should work. I fixed it for me by temporarily replicating the provider code on my side but using the updated pulumi-command that contains the fix.

cnunciato commented 1 year ago

@gbegher This is resolved with the latest version of synced-folder, 0.11.1. Thanks again reporting this!