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
IRedisCache fluent calls that don't necessarily make sense #304
Comments
for
Moved 'WithSubnet' and 'WithStaticIP' to premium Cache definition only in pr Azure/azure-libraries-for-java#445. Thanks for reporting. |
@hovsepm A brainstorm of how the compiler could be taught this, in terms of the types involved (but perhaps unrealistic):
|
@TimLovellSmith The issue is in
I believe in create (aka definition) flow developers are not able to switch between SKUs. |
@hovsepm For update, we can take shardCount as an example since its one of the premium SKU settings you can update. I don't mind that you can do redisCache.Update().WithShardCount(2), in fact I agree that when you don't know the actual SKU, it is better to be permissive. It was just the doomed-to-fail combinations which I felt I should try to object to: .WithBasicSku().WithShardCount(2), WithBasicSku().WithStandardSku() etc. |
@TimLovellSmith I think we should consider separating Redis and RedisPremium types in the Fluent layers. In that case we can have better functionality and isolation of features but that work will be a major breaking change for customers and most probably will be done during 2.0 transition of Fluent SDK. It would look like this:
What do you think? |
* Regenerated Redis with latest fixes. * fix for Azure/azure-libraries-for-net#305 * Fix for Azure/azure-libraries-for-net#304 * fix for Azure/azure-libraries-for-net#303 * Fixed build break * commit of the current dev state * Added comments. * Fixed stylecheck errors. * fix of the fix * Fixed the fix of the fix * Fix the build break. * Fix for PatchSchedule failures * fixed style check breaks * Fixed LinkedServers. * Fixed build breaks. * Re-recorded redis Azure test * re-recorded Redis sample * Fixed Beta since text.
Release 1.13 is out. Please upgrade your references. |
I just noticed it is funny that you can put multiple sku changes in a single 'update' call like this:
caches.GetById(id).Update().WithPremiumSku().WithStandardSku().WithBasicSku().Apply();
It is also funny that you can do 'WithSubnet' and 'WithStaticIP' when you're chosen basic/standard SKU, as we don't allow that!
INetwork nw;
caches.Define("c").WithRegion("r").WithExistingResourceGroup("g").WithBasicSku().WithSubnet(nw, "subnetName");
The text was updated successfully, but these errors were encountered: