Skip to content

e2e: add backward compatibility test for older CLI versions#2797

Open
snormore wants to merge 13 commits intosnor/serviceability-telemetry-sdksfrom
snor/backward-compat-e2e-test
Open

e2e: add backward compatibility test for older CLI versions#2797
snormore wants to merge 13 commits intosnor/serviceability-telemetry-sdksfrom
snor/backward-compat-e2e-test

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Feb 2, 2026

Summary

  • Add TestE2E_BackwardCompatibility that validates older CLI versions (back to the onchain program's min_compatible_version) can perform all read and write operations against the current upgraded program
  • Test clones account state from live environments, deploys the current branch's program .so, then installs each old CLI version from Cloudsmith and runs read/write workflows
  • Environments (testnet, mainnet-beta) run as parallel sub-tests with a combined compatibility matrix rendered at the end
  • Per-environment Cloudsmith repos: mainnet-beta uses doublezero, testnet uses doublezero-testnet, devnet uses doublezero-devnet
  • Configurable via DZ_COMPAT_CLONE_ENV, DZ_COMPAT_MIN_VERSION, DZ_COMPAT_MAX_NUM_VERSIONS env vars
  • Replace inline Python in the ledger entrypoint with a fork-accounts Rust tool that uses the serviceability SDK for proper Borsh serialization when patching GlobalState accounts
  • Migrate e2e tests to use the new serviceability SDK at sdk/serviceability/go/

Testing Verification

  • Ran full test against testnet and mainnet-beta in parallel
  • testnet: v0.8.2–v0.8.4 all passed (35/35 steps each)
  • mainnet-beta: v0.7.1–v0.8.0 each have 1 expected failure (multicast_group_create due to Borsh struct change in v0.8.1), v0.8.1 all passed (35/35)

@snormore snormore force-pushed the snor/backward-compat-e2e-test branch 2 times, most recently from 1c422b3 to c8e8541 Compare February 2, 2026 22:58
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch from 59f1b57 to 79ded32 Compare February 2, 2026 23:54
@snormore snormore force-pushed the snor/backward-compat-e2e-test branch from 1380646 to 10c1088 Compare February 3, 2026 17:50
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch from 77b5f96 to 0d56ff2 Compare February 3, 2026 17:55
@snormore snormore force-pushed the snor/backward-compat-e2e-test branch from 10c1088 to 38a3cfe Compare February 3, 2026 17:55
Add convenience constructors that use default program IDs and RPC URLs
for each environment (mainnet-beta, testnet, devnet, localnet):

- Go: NewForEnv(env), NewMainnetBeta(), NewTestnet(), etc.
- Python: Client.from_env(env), Client.mainnet_beta(), etc.
- TypeScript: Client.forEnv(env), Client.mainnetBeta(), etc.

Also adds config.go to revdist Go SDK with ProgramID and RPC URL maps,
and updates serviceability Go constructors to create RPC clients
internally (matching telemetry SDK pattern).
…y SDK

Add TestE2E_BackwardCompatibility that validates older CLI versions can
perform all read and write operations against the current upgraded onchain
program. The test clones account state from live environments (testnet and
mainnet-beta by default), deploys the current branch's program, then
installs each old CLI version via Cloudsmith and runs the full workflow.

Also migrates e2e tests to use the new serviceability SDK at
sdk/serviceability/go/.
The test was comparing the entire GlobalConfig struct, but the
NextBGPCommunity field changes in the background while the activator
runs, causing false failures. Since the test only verifies that
RemoteASN was updated correctly, compare only that field.
…reated

Add nil check before accessing GlobalConfig.LocalASN since the config
may not exist yet when the program accounts have been created but
initialization is still in progress.
@snormore snormore force-pushed the snor/backward-compat-e2e-test branch from 38a3cfe to da051c5 Compare February 3, 2026 18:16
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch from 8ab0cd6 to 3bf2ac2 Compare February 4, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants