AcademySoftwareFoundation / AcademySoftwareFoundation/rez

rez-test skips tests on pre_release

Open
#1,068 0 comments 0 reactions 0 assignees View on GitHub
bug rez-test
Dominant language
Python
Stars
1.1k
Forks
374
Avg merge
9d 12h
Merged PRs (30d)
5

Description

Given a package with a test like:

```
tests = \
{'methodic': {'command': 'methodic {root}',
'requires': ['methodic'],
'run_on': ['default', 'pre_release']}}
```

rez-release is skipping the test and prints this:

```
21:02:28 WARNING Could not resolve environment for this variant (/tmp/rez_testing_repo_MCs0EB/rez_mlambda/1.0.0/package.py[]). This is a known issue and will be fixed once 'explicit variant selection' is added to rez.
```

This may only occur on packages without variants, but I haven't verified that yet (in this repro, there were no variants).

This must have something to do with how the pre-release testing hook works. What happens is:

* variant payload is installed, but isn't added to the installed package.py yet (so it's invisible)
* a special temp pkg is created (in a temp pkg repo), with a variant that redirects to the real variant payload. This is the variant you see in the msg above
* rez-test uses this temp pkg to resolve the test runtime with the new variant, and performs the tests
* if the tests pass, the installed package.py is then updated to include the new variant

Contributor guide

Open the contributing guide

Research direction

Trace the pre-release testing hook through rez-release and rez-test, focusing on the temporary package and redirected variant described in the report. Reproduce the no-variant package case and verify that the test runtime resolves successfully, the test runs, and the installed package.py is updated only after it passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.