Versioning
The contract between OpenBI Studio and its plug-ins has a version of its own, major.minor. A minor version only adds, so a plug-in built against an older one keeps running; a major version breaks, and the plug-in must be built again.
Three numbers
- The SDK’s version: 0.3.74
- OpenBI Studio’s version the SDK came with. It is the NuGet package’s version, and the one to give
minStudio. - The contract: 1.2
SdkInfo.Contract:IStudioPlugin,IStudioHost,IPluginStorage,PluginView,PluginManifestand the types they use. OpenBI Studio 0.3.74’s contract is 1.2, which came with 0.3.73. The current download, OpenBI SDK 0.3.74 from www.openbi.no/sdk/, builds against 1.2; a plug-in built with an older SDK, against 1.1 or 1.0, runs in OpenBI Studio 0.3.74 unchanged.- The assemblies’ version: 1.0.0.0
- Kept the same whatever the build, so plug-ins compiled against the SDK always find it.
How a plug-in records its contract
The SDK’s NuGet package has build targets that write the contract into your plug-in’s assembly: nothing to do on your side.
[assembly: AssemblyMetadata("OpenBI.Studio.Sdk.Contract", "1.1")]
The studio reads it from the assembly without loading it, so a plug-in that can’t run is never loaded to find out. A plug-in built without the package can say it in plugin.json ("sdk": "1.1"); the assembly’s wins. One that says nothing was built before contracts were numbered, with OpenBI SDK 0.3.66 or older: contract 1.0.
What the studio does
| The plug-in’s contract | The studio |
|---|---|
| The same | Runs it. |
| The same major, an older minor | Runs it, with no message; only when a newer minor adds something people would miss does its card say so. |
| An older major | Doesn’t load it: “it was built for an older OpenBI SDK (contract …): rebuild it with SDK … (contract …), or download its new version”. When it was turned on, the studio says so as it starts, with the download page and Install a plug-in…; an agent reads the same in studio_status. |
| Newer than the studio’s | Doesn’t load it: “it needs a newer OpenBI Studio”. |
| Not a version | Doesn’t load it, and says why. |
Specialty modules shows each plug-in’s contract on its card, and the install window checks it before installing.
The contracts so far
| Contract | Came with | What it added or changed |
|---|---|---|
| 1.0 | OpenBI Studio 0.3.16 | IStudioPlugin and IStudioHost: tabs, agent tools, the open model and OAX, settings and secrets, Microsoft sign-in, privacy. |
| 1.1 | OpenBI Studio 0.3.67 | For data plug-ins: ReloadModelAsync, SetSourceCredentialAsync, HasSourceCredentialAsync, RemoveSourceCredentialAsync, each with a body of its own. Plug-ins built against 1.0 run unchanged. |
| 1.2 | OpenBI Studio 0.3.73 | A plug-in’s own key to the agent endpoint: plugin.json’s agentAccess, RequestAgentAccessAsync (with a body of its own) and PluginAgentAccess (see Calling the agent endpoint). AgentEndpoint.Key is now empty for plug-ins: the member stays, so every 1.x plug-in still loads, and one that read the key gets an empty string and asks with RequestAgentAccessAsync instead. |
minStudio
minStudio in plugin.json names the oldest OpenBI Studio the plug-in runs in. An older studio doesn’t run it (“it needs OpenBI Studio … or later”), and its install window asks you to update the studio first. Set it to the SDK version you build with, and build against the SDK of the oldest studio you want to reach.
It is never older than the studio its contract came with: a studio with an older contract refuses the plug-in anyway, and minStudio says why before anything is installed. Norway Analytics’ own plug-ins take the later of the two: those built against contract 1.2, Customer Service 1.1.2 among them, say OpenBI Studio 0.3.73 or later in their plugin.json and README, the studio contract 1.2 came with.
When OpenBI Studio is upgraded
An upgrade replaces the studio’s own folder only: plug-ins installed for you or for the computer stay installed and keep working. A plug-in built against an older minor of the same major runs on; one built against an older major waits until its new version is installed.
How the contract grows
Norway Analytics adds to IStudioHost only with a default body, which says the member needs a newer studio or does nothing, and raises the minor version. A member changed or removed comes only with a new major version, said in SdkInfo.History. A plug-in that implements IStudioHost itself, a test’s fake host for instance, needs none of the members with a body.