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

Creating virtual environment for each test #247

Merged
merged 14 commits into from
Sep 5, 2021
Merged

Creating virtual environment for each test #247

merged 14 commits into from
Sep 5, 2021

Conversation

sungeunbae
Copy link
Member

@sungeunbae sungeunbae commented Sep 1, 2021

Creates virtual environment at /tmp/qcore/#hash#, installs requirements.
Runs test, then removes after.

Docker images all removed from the server to release space.
Binaries are kept under /nesi/project/nesi00213/tools

Note: For virtual environments, pytest and pytest-black should be included in requirements.txt for the auto-tests to run

@jasonmotha jasonmotha marked this pull request as draft September 1, 2021 03:18
@sungeunbae sungeunbae marked this pull request as ready for review September 1, 2021 22:13
Copy link
Contributor

@jasonmotha jasonmotha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself is looking good! Glad you got it working

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

Jenkinsfile Outdated
Comment on lines 8 to 9
pwd
env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using these as debug output for the logs, it would be nice to wrap it with "Current working directory:" etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean as a separate "stage"? Sure - can do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the latest patch

@jpa198
Copy link
Contributor

jpa198 commented Sep 1, 2021

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

I think pulling EMOD3D and compiling every time we do a test is too much. I think the responsibility for updating the binaries should be on the EMOD3D repo.
So that probably needs a jenkins file to build the tools on PR creation or merge.
EMOD3D is normally low traffic, so it shouldn't be an issue too often.

@jasonmotha
Copy link
Contributor

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

I think pulling EMOD3D and compiling every time we do a test is too much. I think the responsibility for updating the binaries should be on the EMOD3D repo.
So that probably needs a jenkins file to build the tools on PR creation or merge.
EMOD3D is normally low traffic, so it shouldn't be an issue too often.

Sweet. Agreed with all your thoughts.

@sungeunbae
Copy link
Member Author

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

I think pulling EMOD3D and compiling every time we do a test is too much. I think the responsibility for updating the binaries should be on the EMOD3D repo.
So that probably needs a jenkins file to build the tools on PR creation or merge.
EMOD3D is normally low traffic, so it shouldn't be an issue too often.

Sweet. Agreed with all your thoughts.

I only managed to build a couple of tools on ec2 - had to temporarily install openmpi and FFTW3, and it crashed at Fractal3D. At the point, I had all the binaries needed for the test, so I didn't go further to fix the build issues.

@jpa198
Copy link
Contributor

jpa198 commented Sep 1, 2021

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

I think pulling EMOD3D and compiling every time we do a test is too much. I think the responsibility for updating the binaries should be on the EMOD3D repo.
So that probably needs a jenkins file to build the tools on PR creation or merge.
EMOD3D is normally low traffic, so it shouldn't be an issue too often.

Sweet. Agreed with all your thoughts.

I only managed to build a couple of tools on ec2 - had to temporarily install openmpi and FFTW3, and it crashed at Fractal3D. At the point, I had all the binaries needed for the test, so I didn't go further to fix the build issues.

If we do want to take that path, I can make a build target for just tools we need for testing

@sungeunbae
Copy link
Member Author

@jpa198 Thoughts about compiling emod3d-tools as part of environment setup. Just because the binaries may change and hence break the tests?

I think pulling EMOD3D and compiling every time we do a test is too much. I think the responsibility for updating the binaries should be on the EMOD3D repo.
So that probably needs a jenkins file to build the tools on PR creation or merge.
EMOD3D is normally low traffic, so it shouldn't be an issue too often.

Sweet. Agreed with all your thoughts.

I only managed to build a couple of tools on ec2 - had to temporarily install openmpi and FFTW3, and it crashed at Fractal3D. At the point, I had all the binaries needed for the test, so I didn't go further to fix the build issues.

If we do want to take that path, I can make a build target for just tools we need for testing

No need for now - I will move on to other repos and convert to virtual envs and will see if I need more binaries.

Copy link
Contributor

@jasonmotha jasonmotha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Looks good.

@sungeunbae sungeunbae merged commit de08cc3 into master Sep 5, 2021
@sungeunbae sungeunbae deleted the jenkins_venv branch September 5, 2021 23:52
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.

3 participants