codex-storage / cs-codex-dist-tests

Distributed System Tests for Nim-Codex
3 stars 3 forks source link

Remove run ID and introduce deploy ID #93

Closed gmega closed 7 months ago

gmega commented 7 months ago

This PR removes the notion of a run id and replaces it with a deploy id in continuous tests. Deploy ids can be set at deploy time only (duh), and will be picked up by the test runner from the deploy file on subsequent runs of the continuous test runner. As a consequence, the deploy id becomes a deployer parameter, and can no longer be overridden at the runner. For non-continuous tests, the deploy ID is created on-the-fly.

veaceslavdoina commented 7 months ago

So, there no runid env var anymore?

I did a test run via GitHub Actions and there we still assign runid label/env manually via template, but

gmega commented 7 months ago

So, there no runid env var anymore?

Correct, now there's only a deploy id, which you can set when you deploy a new network.

* will `deployment id` be generated automatically at deployment?

Yes, if nothing is set. You can still customize it with DEPLOYID when doing the deploy, but you can no longer set it when you fire the test runner, as that's the whole point: the test runner will just pick up the deploy id from the deploy file.

* can we still set out own `deployment id` via env var?

Yes (see above).

* what is the way to get same unique value through the run for

  * Prometheus - populated from Pod labels
  * Elasticsearch - populated from _STATUS.log

The runid in the Pod labels should already be correct, and match what's in the status.

I did a test run via GitHub Actions and there we still assign runid label/env manually via template, but

* I can't see `deploymentid` label - this is used by Prometheus

* In `09-56-44Z_ContinuousTestRun_STATUS.log` I see `"runid":"20240206-095227"`

Correct, I didn't change the external facing attribute names (except for the env var :grimacing:) - sorry for not mentioning that sooner. They are still called runid both in the status log and the Prometheus labels, even though they are now technically deploy IDs and are no longer allowed to diverge.

* Actual `runid` set by GitHub Actions was `20240206-095044` - I will remove that when we will switch to `deployment id`

Yeah, for now what will happen is that if you don't set DEPLOYID then it will simply generate it automatically, using a very similar strategy to what you have in the github action.