Closed heaths closed 4 years ago
You can take a quick look at https://github.com/Azure/azure-sdk-for-net/pull/9582 to see how we're testing multiple versions of Storage.
The C# Guidelines weigh on the default version:
The version parameter must be required, and default to the latest supported service version.
But it doesn't draw a distinction between Previews and Stable. I'm not sure if the other languages are any more explicit.
I would imagine we'd ship
v4.X.0
with Latest
meaning "Latest Stable release" andv4.X.0-Preview1
with Latest
meaning "Latest Preview release"Scheduled for Mar-2
That distinction is important, and any guidelines on which version to use should be general. To be honest, I didn't even check the C# guidelines because I expected general guidelines for anything related to this. JS Key Vault, for example, is making a distinction between Preview and Stable.
But regarding service version specific, one lingering question is whether we should explicitly define constants/values (and in some languages, there is no distinction like JS) for "7.1" mapping to "7.1-preview" until it ships, or just "7.1-preview" and keep it forever even if the service doesn't. Or should we keep our packages preview until a service GAs then drop "-preview" and GA our packages? I imagine for many client packages they may want to preview some functionality while keeping the package GA, though I'm not sure if that's allowed either. That's one thing we need guidance on as well.
@jongio can you also distill the info you sent me offline and update this thread this week so people have time to grok it before our meeting on March 2nd?
I updated the original description with some information @jongio sent me offline.
Notes from architecture board:
Recording: https://msit.microsoftstream.com/video/1cb87c26-f4f7-4c98-b953-cea00c451b0d
ACTION: Adrian will submit a PR to add the following requirements to general guidelines
ServiceVersion
enum.ServiceVersion
enum values MUST match the service version in swagger.ServiceVersion
enum should be suffixed by -preview
Recorded Tests:
ACTION:
Inconsistencies:
ACTION:
Closing out as the guideline changes have been completed.
Storage has already started supporting a new stable service version, while Key Vault is about to add support for a preview service version. We have many questions and would like to discuss and arrive at some guidance how Azure SDK should deal with service versions.
Scenario
What's driving this is that Key Vault is adding a 7.1-preview service version. This will likely be supported for some time before it GAs, and perhaps longer after that depending on service guidance. In response, we want to release a 4.1-preview client version that contains the new APIs they need to preview to customers.
Client version options
There are a couple of ways to do this, both with semvers or date versions:
ClientOptions.ServiceVersion
enumerations can define, for example, aV7_1_Preview
version that equates to "7.1-preview". When the service GAs, we'd keep that version and add aV7_1
version when we release new packages. We could never dropV7_1_Preview
even if the service eventually drops support.ClientOptions.ServiceVersion
enumerations can define, for example, aV7_1
version that equates to "7.1-preview" and change that when the service GAs and we release new packages.On a related note, does this necessitate the client being in a preview state in directly correlation to service being in a preview state? If it does, because the client is in a preview state can we drop the
V7_1_Preview
service version before we GA and after the service has GA'd?Default client version
I can find no guidance on what the default service version should be. Key Vault currently defaults to "7.0" - our track 2 "RTM", if you will. It does define a constant
LatestVersion
value, however. Storage, on the other hand, defaults to the latest version.ClientOptions
, or should we do it for them through a fixed default or, perhaps, upgrade periodically and intentionally?What should guidance be in this case?
Testing different service versions
The guidelines state that all versions should be tested and recorded. While ideal, we also currently have a considerable amount of space consumed by recorded tests. Should we follow the guidelines, or - for now - try to mitigate growing repo sizes and test a single version when possible? If so, should we test the default version (or higher, as needed for some methods or models) as decided above?
Inconsistencies
There are also inconsistencies throughout the languages, as pointed out by @jongio:
.NET
XXClient.ServiceVersion
enumeration - does not allow for user-provided string.LatestVersion
.TypeScript/JavaScript
const PackageVersion = 1.0
SERVICE_VERSION="2019-07-07"
Python
Java
XXServiceVersion
enum.XXServiceVersion.getLatest()
static method.