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

Nits and stuff #3514

Merged
merged 7 commits into from
Aug 7, 2023
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
12 changes: 12 additions & 0 deletions agent/containers/images/container_entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@

source /opt/pbench-agent/profile

if [[ -z "${*}" ]]; then
echo "No command supplied" >&2
exit 127
fi

# If the exec is successful, control won't return to this script, so the
# commands following it are only for reporting the error (so disable the
# lint check).
# shellcheck disable=SC2093
exec "${@}"
rc=${?}
echo "exec ${*} failed with status ${rc}" >&2
exit ${rc}
2 changes: 1 addition & 1 deletion lib/pbench/server/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import jwt
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from requests.structures import CaseInsensitiveDict
from urllib3 import Retry

from pbench.server import JSON, PbenchServerConfig

Expand Down
2 changes: 1 addition & 1 deletion lib/pbench/test/unit/server/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ def generate_api_key(

Args:
username: username to include in the token payload.
name: name or description of the key.
label: name or description of the key.
user: user attributes will be extracted from the user object to include
in the token payload.
offset: If True, 10 min will be added to 'current_utc',to avoid duplicate error
Expand Down
1 change: 0 additions & 1 deletion server/pbenchinacan/container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ PBINC_INACAN=${PBINC_SERVER}/pbenchinacan
# Locations inside the container
INSTALL_ROOT=/opt/pbench-server
SERVER_LIB=${INSTALL_ROOT}/lib
CONF_PATH=${SERVER_LIB}/config/pbench-server.cfg

#+
# Configuration verification section.
Expand Down
4 changes: 4 additions & 0 deletions server/pbenchinacan/deploy-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
# 8090 - keycloak authentication server
# 9200 - Elasticsearch

TMP_DIR=${TMP_DIR:-${WORKSPACE_TMP:-/var/tmp/pbench}}
PB_DEPLOY_FILES=${PB_DEPLOY_FILES:-${TMP_DIR}/pbench_server_deployment}

# The default container registry to use with the organization name in that
# registry. E.g., `quay.io/pbench`.
PB_CONTAINER_REG=${PB_CONTAINER_REG:-$(<${HOME}/.config/pbench/ci_registry.name)}
PB_SERVER_IMAGE_TAG=${PB_SERVER_IMAGE_TAG:-${USER}}

# Default pull policy for all images is to pull the image if the registry has a
# *different* version (despite the name -- different is assumed to be "newer").
Expand Down
3 changes: 0 additions & 3 deletions server/pbenchinacan/load_keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ ADMIN_PASSWORD=${ADMIN_PASSWORD:-"admin"}
REALM=${KEYCLOAK_REALM:-"pbench-server"}
CLIENT=${KEYCLOAK_CLIENT:-"pbench-client"}

TMP_DIR=${TMP_DIR:-${WORKSPACE_TMP:-/var/tmp/pbench}}
PB_DEPLOY_FILES=${PB_DEPLOY_FILES:-${TMP_DIR}/pbench_server_deployment}

export CURL_CA_BUNDLE=${CURL_CA_BUNDLE:-"${PWD}/server/pbenchinacan/etc/pki/tls/certs/pbench_CA.crt"}

end_in_epoch_secs=$(date --date "2 minutes" +%s)
Expand Down
3 changes: 2 additions & 1 deletion server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ python-dateutil
requests # TODO CVE-2023-32681 (>=2.31.0)
sdnotify
sqlalchemy>=1.4.23
sqlalchemy_utils>=0.37.6
sqlalchemy_utils>=0.37.6
urllib3