Closed mcopik closed 1 year ago
Hi @mcopik , Can I work on this?
@punitkashyup Absolutely, please feel free to start on the issue :-)
Let me know if you have any questions or concerns - happy to help.
Hey @mcopik ,Can you elaborate the issue so that I could understand it further?. Thanks!
@rahulsurwade08 @punitkashyup We use a cache where we store all information about cloud resources - functions, storage accounts and buckets, permissions, etc. This helps us to deploy experiments as we do not have to retrieve everything on every single launch of sebs
.
Currently, we cache credentials together with the cloud config, which is not a good practice. For example, see the class sebs.{platform}.config.Credentials
. If you deploy a function, you will be able to examine the JSON files created in cache
directory.
We should not cache those credentials. However, we want to avoid the situation when we build the cache, then the user switches between cloud accounts and attempts to use sebs
with different credentials and a different account. In such a situation, our cache is not only useless but will also return weird errors. Thus, we should store in the cache the account ID. When we connect to the cloud with uncached credentials, we should check if the account ID matches the one in cache - if not, then we should throw an error that clearly explains to the user that the cache is invalid.
We cache credentials for future access. However, we should: