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
Azure Blob Storage state store strips the prefix #3032
Comments
Most folks do not use the special runtime provided prefixes like appID, podID, namespace etc - of course they are very powerful and useful. I suggest introducing a new metadata property like |
The problem is that appID is the default prefix. Right now the component always acts as if "none" is the prefix. The consequence is that if 2 apps write the same key, and users don't set a prefix, with ABS they read the same data, but with all other components they don't. As for solutions, I agree there are 2 options, and I'm not a fan of either.
|
It really is difficult one. Just to add my opinions : From an end-user perspective, not introducing breaking changes in behaviour is more important than having a oddly named metadata option. Speaking from experience, breaking changes really hurts dev teams that are trying to adopt, embrace, and build confidence in a particular tech. That said, given this particular bug is related to the access of data, you could argue that the fix creates a more secure mode of operation with a narrower scope, and so as an end-user, I could see it as reasonable breaking change to make. Hypothetically, If the fix was creating a less secure / greater scope to the data, this could be disastrous for an end-user scenario i.e. data compromise / leakage. |
@olitomlinson thanks for sharing your opinion! To be clear, we are not talking about making a breaking change in the current component. A Component YAML that defines The two options are both backwards-compatible as they require users to opt into the new, fixed behavior:
|
In that case, purely from an end-user perspective, I would bias towards preferring a v2 component. There would need to be some explicit documentation on the change in behaviour, targeted directly at V2 users who are upgrading from V1. |
I would recommend taking the v2 component approach. The dapr documentation indicates A version upgrade indicates a breaking change. The breaking change in this case would be fixing the default keyprefix behavior. The documentation for the version upgrade could indicate the default keyprefix behavior will be |
I may be leaning towards a "v2" myself. Although it's uncomfortable, it probably is the most correct choice. @dapr/maintainers-components-contrib what are your thoughts? |
In general, for maintenance reasons, I am against the I do not want to set a precedent where we introduces v2....v100 for tiny changes. That's a big maintenance burden. As a maintainer I would personally choose to do the following:
Compatibility between v1 and v2 components will not necessarily be guaranteed. We reserve the right to change components significantly between versions. We continue maintaining all component versions unless we announce a deprecation of an existing version in accordance with our deprecation policy. |
Note that the default keyPrefix (if unset) is "appid". So we should show a warning unless the keyPrefix is explicitly set to "none", because the component behaves as if it were set to "none". This can have important consequences as users could expect the state to be namespaced per app (keyPrefix=appId), while in this case it's not (acts as keyPrefix=none) |
Yes we can take a look at those exact details - I am commenting from memory here and forgot some of the info. I think we can use a metadata property + warning, and eventually switch the default to what it should be all along with a backwards compatibility path. |
Thinking about this more, in this case we can go with a |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
The v2 of the component does not strip the app's prefix Fixes #3032 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Reported by a user on Discord.
keyPrefix
is ineffective with the Azure Blob Storage state store. It appears that the component explicitly removes the prefix from the file key:components-contrib/state/azure/blobstorage/blobstorage.go
Lines 221 to 228 in c2dbb03
Looking at the "git blame", it appears that this behavior has been present since the very first version of the component: #348
However, this is not something we can fix because it would break backwards-compatibility for all existing users. It may require a v2 of the component.
Note that it appears that
||
is a valid character in Azure Blob Storage file paths.The text was updated successfully, but these errors were encountered: