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

DEVOPS-2030 Skip Cloudflare at Nersc #489

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# execution_engine2 (ee2) release notes
=========================================

## 0.0.15
- Update JobRunner and Execution Engine to substitute internal urls to go through cloudflare

## 0.0.14
- Update clients to work with mongo7 by updating pymongo and mongoengine
- Fix linting issues from flake8 and black
Expand Down
2 changes: 1 addition & 1 deletion kbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ service-language:
python

module-version:
0.0.14
0.0.15

owners:
[bsadkhin, tgu2, wjriehl, gaprice]
Expand Down
4 changes: 2 additions & 2 deletions lib/execution_engine2/execution_engine2Impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class execution_engine2:
# state. A method could easily clobber the state set by another while
# the latter method is running.
######################################### noqa
VERSION = "0.0.13"
VERSION = "0.0.15"
GIT_URL = "[email protected]:kbase/execution_engine2.git"
GIT_COMMIT_HASH = "3e9f80f38458d7b383d2e028f15213b0fcb1a77e"
GIT_COMMIT_HASH = "d82ec9b1c5b8fc0fc67e0ebc4b52f29d0c817835"

# BEGIN_CLASS_HEADER
MONGO_COLLECTION = "jobs"
Expand Down
35 changes: 18 additions & 17 deletions scripts/execute_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@ set -x

HOME=$(pwd)
export HOME

JOB_ID=$1
EE2_ENDPOINT=$2

# Remove 'services.' from EE2_ENDPOINT if it exists
EE2_ENDPOINT=${EE2_ENDPOINT/services./}

KBASE_ENDPOINT=$EE2_ENDPOINT
export KBASE_ENDPOINT

# Detect if we are running at NERSC and load some customization
# Probably better ways to deal with this but this is good enough.
if [ -e /global/homes/k/kbaserun/.local_settings ] ; then
HOME=/global/homes/k/kbaserun
. $HOME/.local_settings $1 $2
. "$HOME/.local_settings" "$JOB_ID" "$EE2_ENDPOINT"
fi

debug_dir="debug"
runner_logs="runner_logs"
mkdir ${debug_dir}
mkdir ${runner_logs}
runner_logs=$(readlink -f runner_logs)
debug_dir=$(readlink -f debug_dir)


debug_dir=$(mkdir -p "$(readlink -f debug)")


env >"${debug_dir}/envf"
{
Expand All @@ -32,13 +39,11 @@ env >"${debug_dir}/envf"

${PYTHON_EXECUTABLE} -V "${debug_dir}/pyversion"

JOB_ID=$1
EE2_ENDPOINT=$2
KBASE_ENDPOINT=$EE2_ENDPOINT
export KBASE_ENDPOINT


tar -xf JobRunner.tgz && cd JobRunner && cp scripts/*.py . && chmod +x ./*.py


${PYTHON_EXECUTABLE} ./jobrunner.py "${JOB_ID}" "${EE2_ENDPOINT}" &
pid=$!

Expand All @@ -49,10 +54,6 @@ trap '{ kill $pid }' SIGTERM
wait ${pid}
EXIT_CODE=$?

# Deprecated these in favor of moving them back to ee2 container.
#LOG_DIR="../../../logs/${JOB_ID}"
#mkdir -p "${LOG_DIR}"
#cp "${runner_logs}/${JOB_ID}".out "${LOG_DIR}/".
#cp "${runner_logs}/${JOB_ID}".err "${LOG_DIR}/"

kill -9 $pid2
exit ${EXIT_CODE}
Loading