Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,90 @@
logger = logging.getLogger(__name__)

MAX_METRICS_FILE_SIZE = 1024
MINUTE_IN_SECONDS = 60
HOURS_IN_SECONDS = MINUTE_IN_SECONDS * 60
DAYS_IN_SECONDS = HOURS_IN_SECONDS * 24

RUNNER_SPAWN_DURATION_SECONDS = Histogram(
name="runner_spawn_duration_seconds",
documentation="Time in seconds to initialize the VM and register the runner on GitHub.",
labelnames=[labels.FLAVOR],
buckets=[5, 10, 15, 30, 60, 60 * 2, 60 * 3, 60 * 5, 60 * 10, float("inf")],
buckets=[
5,
10,
15,
30,
MINUTE_IN_SECONDS,
MINUTE_IN_SECONDS * 2,
MINUTE_IN_SECONDS * 3,
MINUTE_IN_SECONDS * 5,
MINUTE_IN_SECONDS * 10,
float("inf"),
],
)
RUNNER_IDLE_DURATION_SECONDS = Histogram(
name="runner_idle_duration_seconds",
documentation="Time in seconds to runner waiting idle for the job to be picked up.",
labelnames=[labels.FLAVOR],
buckets=[
5,
10,
15,
30,
MINUTE_IN_SECONDS,
MINUTE_IN_SECONDS * 2,
MINUTE_IN_SECONDS * 3,
MINUTE_IN_SECONDS * 5,
MINUTE_IN_SECONDS * 10,
float("inf"),
],
)
RUNNER_QUEUE_DURATION_SECONDS = Histogram(
name="runner_queue_duration_seconds",
documentation="Time taken in seconds for the job to be started.",
labelnames=[labels.FLAVOR],
buckets=[
# seconds
5,
30,
MINUTE_IN_SECONDS,
MINUTE_IN_SECONDS * 5,
MINUTE_IN_SECONDS * 10,
MINUTE_IN_SECONDS * 20,
MINUTE_IN_SECONDS * 30,
HOURS_IN_SECONDS,
HOURS_IN_SECONDS * 2,
HOURS_IN_SECONDS * 5,
float("inf"),
],
)
EXTRACT_METRICS_DURATION_SECONDS = Histogram(
name="extract_metrics_duration_seconds",
documentation="Time taken in seconds for the metrics to be extracted.",
labelnames=[labels.FLAVOR],
buckets=[5, 10, 15, 30, 60, 60 * 2, 60 * 3, 60 * 5, 60 * 10, float("inf")],
)
JOB_DURATION_SECONDS = Histogram(
name="job_duration_seconds",
documentation="Time taken in seconds for the job to be completed.",
labelnames=[labels.FLAVOR],
buckets=[
MINUTE_IN_SECONDS,
MINUTE_IN_SECONDS * 5,
MINUTE_IN_SECONDS * 10,
MINUTE_IN_SECONDS * 20,
MINUTE_IN_SECONDS * 30,
MINUTE_IN_SECONDS * 60,
# hours
HOURS_IN_SECONDS * 2,
HOURS_IN_SECONDS * 4,
HOURS_IN_SECONDS * 6,
# days
DAYS_IN_SECONDS * 3,
Comment thread
yanksyoon marked this conversation as resolved.
# Limit of the run is 5 days: https://docs.github.com/en/actions/reference/limits
DAYS_IN_SECONDS * 5,
float("inf"),
],
)
JOB_REPOSITORY_COUNT = Gauge(
name="job_repository_count",
Expand Down
4 changes: 2 additions & 2 deletions jobmanager/client/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/setup-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ORIGINAL_CONTROLLER=$(juju controllers --format json | jq -r '.controllers | keys | .[0]')

echo "bootstrapping microk8s juju controller"
sudo snap install microk8s --channel=1.32-strict/stable
sudo snap install microk8s --channel=1.34-strict/stable
GROUP=snap_microk8s
sudo usermod -a -G "$GROUP" "$USER"
if [ "$(id -gn)" != "$GROUP" ]; then
Expand Down
Loading