canonical / s3-integrator

An integrator charm for handling s3 credentials
https://charmhub.io/s3-integrator
Apache License 2.0
1 stars 1 forks source link

Bucket name gets over-written after relation #5

Closed MiaAltieri closed 1 year ago

MiaAltieri commented 1 year ago

small bug I noticed on the s3-integrator charm. When I do :

 2004  juju deploy ./*charm
 2005  juju run-action s3-integrator/leader sync-s3-credentials access-key="*" secret-key="*" --wait
 2006  juju config s3-integrator   bucket=“pbm-test-bucket-1”     path="data/pbm/backup"     region="us-west-2"
 2007  juju relate s3-integrator mongodb

the bucket is not set to pbm-test-bucket-1 but instead realtion-<number> but if after relating I do:

2010 juju config s3-integrator bucket=pbm-test-bucket-1

then it gets the right bucket name

I think it has to do with this line

maybe changing it to something like:

bucket =  self.get_secret("app", "bucket) or event.bucket