This is a KBase module generated by the KBase Software Development Kit (SDK).
You will need to have the SDK installed to use this module. Learn more about the SDK and how to use it.
You can also learn more about the apps implemented in this module from its catalog page or its spec file.
- Contributing requirements, such as pre-commit as per CONTRIBUTING.rst
See the .travis file for information on how to test locally
Make sure you have the latest versions of
- docker
- docker-compose
git clone https://github.com/kbase/execution_engine2.git
cd execution_engine2
docker build . -t execution_engine2:test
docker-compose up -d
docker-compose exec ee2_with_ssh bash
# (This directory is linked to your pwd via the docker-compose file)
cd /ee2
make test-coverage
Once the docker image is built, it does not need to be rebuilt after code changes to rerun tests. Just ensure the services are up, exec into the container, and run the tests.
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose test/tests_for_db/
PYTHONPATH=.:lib:test pytest --cov-report=xml --cov lib/execution_engine2/ --verbose test/tests_for_db/ee2_model_test.py
exec
into the docker container as before and switch to the /ee2
directory.
pip install pre-commit
pre-commit install
pre-commit run --all-files
To remove the pre commit hooks:
pre-commit uninstall
conda install -c conda-forge python-htcondor
import htcondor
- Use a remote ssh debugger with the correct path mappings
- Right click on the file you'd like to run and select run test
- To add a bugfix or new feature:
- Create a new feature branch, branching from
develop
. Ask a repo owner for help if necessary. - If you're a repo owner you can push directly to this branch. If not, make pull requests to the branch as necessary.
- Add:
- Feature / bugfix code
- Tests
- Documentation, if applicable
- Release notes, if applicable
- See the PR template in
worksflows/pull_request_template.md
for details
- Once the feature is complete, create a PR from the feature branch to
develop
and request a review from person with EE2 knowledge via the Github interface and via Slack. - When the PR is approved, squash and merge into
develop
and delete the feature branch.
- Create a new feature branch, branching from
- To create a new release:
- Increment the version as per semantic versioning in
kbase.yml
.- Update the release notes to the correct version, if necessary.
- Run
make compile
. - Go through the process above to get the changes into
develop
. - Make a PR from
develop
tomain
. - Once the PR is apporoved, merge (no squash) to
main
. - Tag the merge commit in GitHub with the semantic version from
kbase.yml
.
- Increment the version as per semantic versioning in
EE2 understands client group specifications in JSON and CSV formats. Both formats have special fields in common:
request_cpus
- the number of CPUs to requestrequest_memory
- the amount of memory, in MB, to requestrequest_disk
- the amount of memory, in GB, to requestclient_group_regex
- boolean - treat the client group (see below) as a regular expressiondebug_mode
- boolean - run the job in debug mode
The client group is handled differently for JSON and CSV:
- The JSON format has the
clientgroup
field, which is optional. - The CSV format must have the client group in the first 'column' of the CSV and is required. The
remainder of the 'columns' must be in
key=value
format.
Any fields other than the above are sent on to the scheduler as key value pairs.
For example, to set the client group to bigmem
, request 32 CPUs, 64GB of memory, and 1TB of disk,
the following would be entered in the catalog UI:
- CSV:
bigmem, request_cpus=32, request_memory=64000, request_disk=1000
- JSON:
{"client_group": "bigmem", "request_cpus" : "32", "request_memory" : "64000", "request_disk" : "1000"}
Note that the representation of this data in the catalog API is idiosyncratic - both the JSON and CSV data are split by commas into parts. EE2 will detect JSON entries and reconsitute them before deserialization.
- Notifications are sent to the #ee_notifications slack channel
- Cronjobs are copied in and launched via the Dockerfile
- There are cronjobs configured in /etc/cron.d/ee2_cronjobs
- You can monitor them by reading the logs in /root/cron-purge.log
- This is a daemon launched by entrypoint.sh
- It is not a cronjob because there is no way to easy way to seek through the HTCondor EXECUTE log, which takes a while to seek through
- These scripts will have to be rethought if we do not want multiple copies running if ee2 is horizontally scaled.
Contact @Tianhao-Gu, @bio_boris, @briehl