Repository navigation
Check BanyanDB server compatibility against the API versions the OAP supports in code - #14267
Merged
Merged
Conversation
…supports in code The OAP now knows the BanyanDB API versions it supports, 0.11 and 0.13, in the client library's BanyanDBAPIVersion enum. Each version lists the server API versions its code works with; the OAP boots only against a server the oldest version works with, and records the version it works as (the server's, or a forced one) on the client (BanyanDBClient#getServerAPIVersion), so code can branch on V0_13.isCompatibleWith(serverAPIVersion) once it uses something a newer API adds. The @APISince annotation marks such code. The compatibleServerApiVersions setting (SW_STORAGE_BANYANDB_COMPATIBLE_SERVER_API_VERSIONS) is removed: it could list versions the OAP has no code for. For debugging only, the environment variable SW_STORAGE_BANYANDB_FORCE_SERVER_API_VERSION makes the OAP work as one of the supported versions, whatever version the server reports.
wankai123
approved these changes
Nov 25, 2026
11 tasks done
wu-sheng
added a commit
to apache/skywalking-graalvm-distro
that referenced
this pull request
Nov 26, 2026
…-debugging module (#53) * Sync upstream to cb632100a5: TAL live debugging and the trace-pairing-debugging module The skywalking submodule moves 8 commits past 4bb9a61839 to cb632100a5. - TAL rules are live-debuggable (apache/skywalking#14265). Upstream's TAL compiler emits the debug probes when the codegen switch is on, which the precompiler turns on before every pass, so every pre-compiled TAL class carries its debug holder and probes; dsl-debugging runs TAL sessions and the /runtime/tal/* listing as it is. - Accept and wire the new trace-pairing-debugging admin module (poms, AcceptedModules, provider inventory, application.yml, regenerated config loader). - /runtime/rule/bundled refuses oal and tal with 400 invalid_catalog, as upstream now does for a catalog no runtime-rule engine claims; the parity test takes the served catalogs from upstream's MAL and LAL engines. - BanyanDBStorageConfig.Global loses compatibleServerApiVersions (apache/skywalking#14267); regenerate the loader. - otel-rules/oap.yaml and redis-instance.yaml change upstream (apache/skywalking#14264, #14258); OapTest feeds the new OTLP protocols and drop reasons, and the rule and source pins are refreshed. - Adopt upstream's dsl-debugging/tal-native and tal-otlp e2e cases; the dsl-debugging status fixture gains upstream's catalogs list; the e2e runner follows upstream's pin 8bb8499. - Docs and changelog describe TAL debugging and the new module. * Run upstream's cluster-paging e2e on two native replicas in a kind cluster Upstream runs dsl-debugging/cluster-paging on two ZooKeeper-coordinated containers. The distro runs it as dsl-debugging-cluster-paging on two native replicas on the Kubernetes coordinator, as otlp-traces-cluster does: upstream's span emitter sends to the first pod, and upstream's flow script reads through the second, with its two node names (oap1 / oap2) replaced by the pods' IPs, as the Kubernetes coordinator names the nodes; the wrapper fails when upstream renames them. It is the distro's only e2e of the admin-internal gRPC bus between nodes.
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.
Check BanyanDB server compatibility against the API versions the OAP supports in code
0.11.A BanyanDB server reports its API version, and several BanyanDB releases share one: 0.11.0, 0.11.1 and 0.11.2 report
0.11, and the coming 0.12 release keeps API0.11, so it works with the OAP asV0_11. Until now the OAP accepted whatever versionscompatibleServerApiVersionslisted, with no code that knew what a version means. A new API version usually adds a field or a type, so the OAP has to know, in code, which API version a request needs and whether the connected server works with it.Design
BanyanDBAPIVersion(client library) lists the API versions the OAP's code is written for, oldest first:V0_11andV0_13. Each version lists the server API versions its code works with:V0_11works with servers reporting0.11or0.13,V0_13with0.13.isCompatibleWith(serverAPIVersion)is the one check.Incompatible BanyanDB server API version: 0.x. Supported versions: 0.11, 0.13.BanyanDBClient#verifyServerAPIVersionreads the server's version, checks the version the OAP works as (the server's, or a forced one), and records it asgetServerAPIVersion(). Code that uses something a newer API adds branches onV0_13.isCompatibleWith(client.getServerAPIVersion())and keeps a path for older servers.@APISince(V0_13)marks such code: a request field, an enum value, a message type or an RPC a version introduced.No code uses API 0.13 yet: this PR adds the mechanism and the
V0_13entry, so the first 0.13 feature only needs its branch and annotation. BecauseV0_11lists0.13, the OAP already boots against a server reporting0.13.Settings
compatibleServerApiVersions(SW_STORAGE_BANYANDB_COMPATIBLE_SERVER_API_VERSIONS) is removed: it could list versions the OAP has no code for. A server reporting another API version, such as0.10, no longer boots even if the setting listed it. Abydb.ymlthat still sets it boots, with the loader'ssetting is not supportedwarning; the environment variable alone is ignored.SW_STORAGE_BANYANDB_FORCE_SERVER_API_VERSIONmakes the OAP work as a supported version, whatever version the server reports (e.g.0.13against a BanyanDB development build that has API 0.13's additions but still reports0.11). It is not inbydb.yml; the OAP logs a warning at boot while it is set, and an unsupported value fails the boot.Follow-up
SW_STORAGE_BANYANDB_COMPATIBLE_SERVER_API_VERSIONS: "0.10,0.11"indeploy/platform/kubernetes/values.yaml. This PR removes that setting, so the line can go when the showcase moves to an OAP with this change.Verified
Unit tests: the version lists' rules (each version works with its own servers, none lists a server older than itself, every listed server is one the oldest version works with, declared oldest first), and
verifyServerAPIVersionagainst a fake server (supported, unsupported, forced, forced unsupported).Against real servers (
ghcr.io/apache/skywalking-banyandb:8efdf0ca…, the e2e commit, andapache/skywalking-banyandb:0.11.1): both report0.11and are accepted; forcing0.13works as0.13; forcing0.14fails withIncompatible BanyanDB API version: 0.14, forced in place of the server's 0.11. Supported versions: 0.11, 0.13.If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.GraalVM distro impact:
BanyanDBStorageConfig.Globalloses itscompatibleServerApiVersionsfield, so the distro's generatedYamlConfigLoaderUtils, which callssetCompatibleServerApiVersions, is regenerated at its next sync. The force variable is read withSystem.getenvat connect time, not in a static initializer, so the native image reads it at run time.