feat: add blueprint API and rename server group name to server base name#12
Open
frederickbaier wants to merge 1 commit intofeat/platformfrom
Open
feat: add blueprint API and rename server group name to server base name#12frederickbaier wants to merge 1 commit intofeat/platformfrom
frederickbaier wants to merge 1 commit intofeat/platformfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new top-level management API for blueprints — reusable runtime/software templates that groups and persistent servers can use as their base source configuration. The controller already exposes the underlying REST endpoints; this PR wires them into the Java SDK so consumers can create, list, update, and delete blueprints without dropping down to the generated OpenAPI client.
At the same time, the server query filter is generalized from "server group name" to "server base name". The same filter now matches either a persistent server name or a group name, so keeping the old
serverGroupNamenaming was actively misleading. A newgetServerByName(serverName, splitChar)helper is added so callers can resolve a runtime server name (e.g.Lobby-1) in a single call instead of parsing the suffix themselves.Changes
BlueprintApiinterface withgetBlueprintById,getBlueprintByName,getAllBlueprints,createBlueprint,updateBlueprint,deleteBlueprint, backed byBlueprintApiImplagainst the generatedBlueprintsApiclient.CreateBlueprintRequestandUpdateBlueprintRequestbuilders (name, configurator, Minecraft version, server software, server URL, software version, runtime config, workflow steps).CloudApi/CloudApiImplexposeblueprint();CacheEventListenerinvalidates blueprint cache keys on create/update/delete events;EntityType.BLUEPRINTand ablueprint(s)prefix added toQueryKey.ServerQuery:serverGroupNamesfield andfilterByServerGroupNamerenamed toserverBaseNames/filterByServerBaseName. Old names kept as@Deprecatedpass-throughs.ServerApi:getServersByGroupdeprecated in favor ofgetServersByServerBaseName;getServerByNumericalIdparameter renamed toserverBaseName; newgetServerByName(serverName, splitChar)that splits the name, queries by base name + numerical ID, and falls back to a persistent-server match when numerical ID is-1.QueryCache/QueryKeyjavadoc examples updated from"group"to"serverBaseName"to match the new key shape.Type of Change
Behavior Change
Before:
BlueprintsApidirectly and manage their own cache keys.ServerQuery.filterByServerGroupName(...)could only be reasoned about as filtering by group, even though the controller also matched persistent server names.Lobby-1required the caller to split the string and callgetServerByNumericalId(group, id)themselves.After:
cloudApi.blueprint().createBlueprint(...)/updateBlueprint/deleteBlueprint/getAllBlueprintsare first-class and participate in the sharedQueryCache(invalidated onblueprintcreate/update/delete events).ServerQuery.filterByServerBaseName(...)explicitly matches either persistent server name or group name; the old method still works but is@Deprecated.serverApi.getServerByName(\"Lobby-1\", '-')returns the right server without the caller parsing the suffix; exact matches beat fallbacks, and a name with no suffix is treated as a persistent server lookup.No breaking changes at the source level — all renamed methods have deprecated default/pass-through shims.
Pre-Deployment Migrations
No migrations required before deploying. The controller already serves the blueprint endpoints; this PR only adds a client-side wrapper. The
serverBaseNamerename is a source-compatible refactor.