polkadot icon indicating copy to clipboard operation
polkadot copied to clipboard

Integration test for DB upgrades

Open dvdplm opened this issue 3 years ago • 7 comments

In the light of https://github.com/paritytech/polkadot/issues/5168 it would be good to have zombienet tests in place to test DB version upgrades for both rocksdb and paritydb.

dvdplm avatar Mar 21 '22 22:03 dvdplm

cc @pepoviola

cheme avatar Mar 31 '22 10:03 cheme

Hi @cheme, we can use this config to test a network of two validators, with one validator using paritydb.

[settings]
timeout = 1000
bootnode = false

[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
chain = "rococo-local"

  [[relaychain.nodes]]
  name = "alice"
  args = [ "-lparachain=debug", "--database=paritydb-experimental" ]

  [[relaychain.nodes]]
  name = "bob"
  args = [ "-lparachain=debug" ]


[[parachains]]
id = 100
addToGenesis = false

  [[parachains.collator_groups]]
    count = 1
    [parachains.collator_groups.collator]
    name = "collator"
    command = "adder-collator"
    image = "{{COL_IMAGE}}"

And we can test that both nodes are up and other metric that you need.

Thanks!

pepoviola avatar Apr 11 '22 11:04 pepoviola

@pepoviola we have a paritydb test in our suite right now. I think we just need support to use restard a node with a different image tag in the same test. Are you tracking this feature in Zombienet ?

sandreim avatar Aug 16 '22 10:08 sandreim

Hi @sandreim, restarting the node with a diff image tag isn't supported because we don't use any kind of persistence disk for the pods. But we can download the new binary and restart the process (in the same pod) using this new version. I created a PoC in this pr. Let me know what you think.

Thanks!

pepoviola avatar Aug 16 '22 13:08 pepoviola

I don't think we need to persist the data, just changing the binary should be sufficient.

sandreim avatar Aug 16 '22 13:08 sandreim

Looks like a good idea to look at this as well https://github.com/paritytech/polkadot/issues/5367 . Sounds like something we could test implicitly based on network config, only that we need more assertions.

sandreim avatar Aug 16 '22 13:08 sandreim

ping @cheme/ @dvdplm this should be covered by https://github.com/paritytech/polkadot/pull/5970 Thanks!

pepoviola avatar Sep 20 '22 18:09 pepoviola