diff --git a/.github/workflows/scripts/build_test_pr.sh b/.github/workflows/scripts/build_test_pr.sh index 546b1b422..1fafd4d04 100755 --- a/.github/workflows/scripts/build_test_pr.sh +++ b/.github/workflows/scripts/build_test_pr.sh @@ -14,4 +14,3 @@ docker build --build-arg BUILD_DATE="$DATE" \ --label us.kbase.vcs-pull-req="$PR" \ -t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" - \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index fd4b051ed..9a90121ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get clean all && apt-get update --fix-missing -y && apt-get upgrade -y # to run your App. For instance, you could place an apt-get update or # install line here, a git checkout to download code, or run any other # installation scripts. -RUN apt-get install -y gcc wget vim htop tmpreaper +RUN apt-get install -y gcc wget vim htop tmpreaper iputils-ping RUN mkdir -p /etc/apt/sources.list.d # Install condor @@ -78,3 +78,6 @@ ENV PATH=/kb/module:$PATH ENTRYPOINT [ "./scripts/entrypoint.sh" ] CMD [ ] + +# Gunicorn runs here, exposed for docker-slim +EXPOSE 5000 diff --git a/lib/execution_engine2/sdk/EE2Authentication.py b/lib/execution_engine2/sdk/EE2Authentication.py index 649d6ab1f..4f1bbd683 100644 --- a/lib/execution_engine2/sdk/EE2Authentication.py +++ b/lib/execution_engine2/sdk/EE2Authentication.py @@ -62,7 +62,6 @@ def check_admin_permission(self, requested_perm): user_permission = self._get_user_admin_permissions() - self.sdkmr.logger.debug(f"Requesting perm {requested_perm}, {user_permission}") if requested_perm == AdminPermissions.WRITE: if user_permission == AdminPermissions.WRITE: return True diff --git a/lib/execution_engine2/sdk/EE2Runjob.py b/lib/execution_engine2/sdk/EE2Runjob.py index 2beed9a7a..6d35065b0 100644 --- a/lib/execution_engine2/sdk/EE2Runjob.py +++ b/lib/execution_engine2/sdk/EE2Runjob.py @@ -493,17 +493,41 @@ def run_batch( wsid = batch_params.get(_WORKSPACE_ID) meta = batch_params.get(_META) - + now = time.time() self._preflight( runjob_params=params, batch_params=batch_params, new_batch_job=True, as_admin=as_admin, ) + preflight_done = time.time() + self.logger.debug(f"preflight took {preflight_done - now}s") + + pre_add_job_req = time.time() self._add_job_requirements(params, bool(as_admin)) # as_admin checked above + post_add_job_req = time.time() + self.logger.debug( + f"_add_job_requirements took {post_add_job_req - pre_add_job_req}s" + ) + + pre_check_job_args = time.time() self._check_job_arguments(params, batch_job=True) + post_check_job_args = time.time() + self.logger.debug( + f"check_job_arguments took {post_check_job_args - pre_check_job_args}s" + ) + + pre_create_batch_job = time.time() batch_job = self._create_batch_job(wsid=wsid, meta=meta) + post_create_job_batch = time.time() + self.logger.debug( + f"create batch job took {post_create_job_batch - pre_create_batch_job}s" + ) + + pre_run_batch = time.time() children_jobs = self._run_batch(batch_job=batch_job, params=params) + post_run_batch = time.time() + self.logger.debug(f"run_batch took {post_run_batch - pre_run_batch}s") return {_BATCH_ID: str(batch_job.id), "child_job_ids": children_jobs} diff --git a/requirements.txt b/requirements.txt index 618dc4908..48b6d5f54 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ docker==5.0.0 gevent==21.1.2 greenlet==1.1.0 gunicorn==20.1.0 -htcondor==9.1.0 +htcondor==9.7.0 Jinja2==3.0.1 JSONRPCBase==0.2.0 mock==4.0.3