Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rez test release hook #758

Closed

Conversation

fnaum
Copy link

@fnaum fnaum commented Oct 5, 2019

A simple pre-release test hook that we have been using at AL for more than a year.

It just run rez test packageName==Version if the package that is being released contains the tests field

Related to #665

Federico Naum and others added 2 commits October 5, 2019 16:24
Run rez test with explicitly fixed package version to ensure that the tests are run for the
released package, not whatever latest version would might be resolved.

Also, always print rez test stdout/stderr output to allow debugging, instead of hiding it in case of an error.
@nerdvegas
Copy link
Contributor

Isn't this actually a post-release hook? The package is already installed before its tests are run.

I think we're gonna need to test via a temp install, and abort the actual release if test(s) don't pass.

@fnaum
Copy link
Author

fnaum commented Oct 28, 2019

Maybe this code does not make sense without the point #2 in this other PR #759
When we run rez test, we do a local install and use that package (contents and metadata) to run the test, when this fails this pre-release hook aborts the release.

@fnaum
Copy link
Author

fnaum commented Oct 28, 2019

actually reading the code now, I just realize that this is using install_path which in our case that is a temp area.

We do have a specialized rez-unleash command that does a rez-release in a temp area and then if the tests passes get the package and checks it in our asset management system that puts it in the final destination.
I'll have a look when I'm back to work if I can make this more general for the community

@nerdvegas
Copy link
Contributor

I have to decline this PR as it's superseded by #811

To give context - the way this is now managed in rez-test avoids the need to build/install the package twice. Unfortunately this cannot be implemented as a pre-release hook, because the hook is not called at the appropriate time (and changing that would not make sense for most hook plugins).

Please see that PR for more details.
Thx
A

@nerdvegas nerdvegas closed this Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants