From 0a1e1462ab69218b15e39f6b217082d94f051891 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 13 Jan 2025 11:59:40 -0800 Subject: [PATCH 1/3] Update CI message (#220) * include CODEOWNERS * include status messages * include status messages * improve message * improve message * improve message * improve message * improve message --- .github/CODEOWNERS | 13 +++++++++++++ .gitlab-ci.yml | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..4db710f1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,13 @@ +# This is a comment. +# Each line is a file pattern followed by one or more owners. + +# For more info about this file, please see +# https://docs.github.com/en/enterprise/2.18/user/github/creating-cloning-and-archiving-repositories/about-code-owners + +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, + +* @hpc-io/pdc-developers + +# This directory controls the permissions/review requirements +.github/ @hpc-io/pdc \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cdc68744..d21ab1fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,17 @@ variables: + STATUS_PROJECT: "hpc-io/pdc" + STATUS_NAME: "NERSC / Perlmutter" PDC_BUILD_PATH: "${CI_PROJECT_DIR}/build" PDC_INSTALL_PATH: "${CI_PROJECT_DIR}/install" GIT_CLONE_PATH: "${CI_BUILDS_DIR}/${CI_PROJECT_NAME}/${CI_JOB_ID}" stages: + - authorize - build - test - metrics .report-status: - variables: - STATUS_PROJECT: "hpc-io/pdc" - STATUS_NAME: "NERSC / Perlmutter" script: # For complete details on the GitHub API please see: # https://developer.github.com/v3/repos/statuses @@ -22,30 +22,50 @@ stages: -H "Authorization: Bearer ${GITHUB_TOKEN}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \ - -d "{\"state\":\"${CI_JOB_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" + -d "{\"state\":\"${CI_JOB_NAME}\",\"description\":\"${STATUS_MESSAGE}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" pending: stage: .pre + variables: + STATUS_MESSAGE: "Waiting for manual approval..." extends: - .report-status success: stage: .post + variables: + STATUS_MESSAGE: "Successfully passed all tests on NERSC system!" extends: - .report-status failure: stage: .post + variables: + STATUS_MESSAGE: "Failed to pass all tests on NERSC system!" extends: - .report-status rules: - when: on_failure -perlmutter-no-cache-build: - stage: build +perlmutter-authorize: + stage: authorize rules: - if: '$METRICS == null' when: manual + script: + - | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${GITHUB_TOKEN}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \ + -d "{\"state\":\"pending\",\"description\":\"Running...\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" + +perlmutter-no-cache-build: + stage: build + needs: + - perlmutter-authorize id_tokens: SITE_ID_TOKEN: aud: https://gitlab.com @@ -71,9 +91,8 @@ perlmutter-no-cache-build: perlmutter-cache-build: stage: build - rules: - - if: '$METRICS == null' - when: manual + needs: + - perlmutter-authorize id_tokens: SITE_ID_TOKEN: aud: https://gitlab.com/ From f44b9314a0a9c494de5dc871375f51114d4b0b5e Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Thu, 16 Jan 2025 10:39:18 -0800 Subject: [PATCH 2/3] fix metric name (#222) --- .github/workflows/store-metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/store-metrics.py b/.github/workflows/store-metrics.py index 9d12b627..0ac4673b 100644 --- a/.github/workflows/store-metrics.py +++ b/.github/workflows/store-metrics.py @@ -127,7 +127,7 @@ total_time_file_agg += t observed_time_file_agg += t obj_close_time_node.append(t) - elif 'Sleep time' in line: + elif 'Sleep end' in line: t = float(line.split(':')[1]) sleep_time_file_agg += t observed_time_file_agg += t From 04fadff8aa372b2c4fdeb2000351ef14f360752d Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Fri, 17 Jan 2025 10:14:57 -0800 Subject: [PATCH 3/3] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d21ab1fc..6d1a03aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,14 +34,14 @@ pending: success: stage: .post variables: - STATUS_MESSAGE: "Successfully passed all tests on NERSC system!" + STATUS_MESSAGE: "Successfully passed all tests on Perlmutter!" extends: - .report-status failure: stage: .post variables: - STATUS_MESSAGE: "Failed to pass all tests on NERSC system!" + STATUS_MESSAGE: "Failed to pass all tests on Perlmutter!" extends: - .report-status rules: