Skip to content

Breaking change to aiida_localhost fixture in v2.9.0 #7499

Description

@danielhollas

PR #7363 changed the aiida_localhost fixture by adding a suffix to it's label, localhost was changed to localhost-master, or to localhost-[xdist-worker-id] in parallel pytest execution. This is a breaking change for consumers who hardcoded the computer label in their test, as I discovered while testing v2.9.0rc1 in aiidalab-widgets-base aiidalab/aiidalab-widgets-base#773.

Of course, the fix is trivial, and arguably we shouldn't have used a hardcoded value in the first place, but on the other hand the value was the same / consistent with what e.g. verdi presto would produce so it was not entirely unreasonable.

Couple suggestions:

  1. This would be good to highlight a bit in the CHANGELOG.
  2. localhost-master is a really confusing name. Can we make it localhost-test or something along those lines? Or, to minimize the breakage, just keep the localhost? My understanding while reading through analysis 🐛 aiida_localhost: suffix label with xdist-worker id #7363 is that using localhost is fine when not running under pytest-xdist since we should be always running under a test profile.
  3. (somewhat off-topic here) I still don't understand how appending tthe xdist worker id is supposed to resolve the test flakiness observed in aiida_profile_clean causes flaky test failures under pytest-xdist #7347. If each worker is working on their own database (as noted by claude analysis 🐛 aiida_localhost: suffix label with xdist-worker id #7363 (comment)), then they shouldn't step on each others foot and this is a pointless fix. And if there is something else, then we should be generating a unique name regardless with something like a uuid.

Metadata

Metadata

Assignees

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions