Skip to content

Improve how we pass data between steps

See e.g. the changes commit 61928d8 brings to torified_gnupg.feature. There the class variable gnupg_recv_key_res is used between steps. Imagine if the step that assigns it (i.e. I fetch the ... OpenPGP key...) is done before the background snapshot is saved, and some step that uses gnupg_recv_key_res (e.g. GnuPG uses the ... keyserver...) is done after the background snapshot is restored. It will work for the first scenario, but in the following scenarios gnupg_recv_key_res will be empty, because class variables are cleared between scenarios.

Perhaps steps like these should only be allowed either when no background snapshot is used, or after the background snapshot has been restored? That could be achieved by putting the following at their beginnings:

   raise if @skip_steps_while_restoring_background

Or we don’t allow using class variables between steps them at all, and instead we have to use global variables (i.e. $gnupg_recv_key_res), which are not cleared ever.

Feature Branch: test/5847-fix-global-vs-class-variables-issue

Parent Task: #10237

Related issues

Original created by @tails on 5847 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information