Skip to content

Commit 439d81a

Browse files
committed
address review comments
1 parent c4968cd commit 439d81a

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

.github/workflows/notebooks-digest-updater.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
git fetch origin ${{ env.TMP_BRANCH }} && \
6767
git pull origin ${{ env.TMP_BRANCH }} && \
6868
git add manifests/base/ && \
69-
git commit -m "Update image-related related sha digests via notebooks-digest-updater GitHub action" && \
69+
git commit -m "Update image related sha digests via notebooks-digest-updater GitHub action" && \
7070
git push origin ${{ env.TMP_BRANCH }}
7171
else
7272
echo "There were no changes detected in the images for the ${{ env.BRANCH_NAME }}"
@@ -92,7 +92,7 @@ jobs:
9292
if [[ -n "${{ steps.skipped_log.outputs.log }}" ]]; then
9393
body+="
9494
95-
:warning: The following images were skipped during update, please push them manually or retriger the GitHub action:
95+
:warning: The following images were skipped during update, please push them manually or retriger the GitHub action:
9696
${{ steps.skipped_log.outputs.log }}
9797
"
9898
fi

ci/image-skipping-logger.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

ci/sha-digest-updater.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ BRANCH=$3
66
REPO_NAME=$4
77

88
REPO_ROOT=$(git rev-parse --show-toplevel)
9-
# Declare and initialize the image-skipping-logger.sh
10-
export SKIPPED_LOG_PATH="$REPO_ROOT/skipped-images.txt"
11-
source "$REPO_ROOT/ci/image-skipping-logger.sh"
12-
init_skipped_log
9+
# Declare and initialize the image skipping log file (This does not commit)
10+
export SKIPPED_LOG="$REPO_ROOT/skipped-images.txt"
11+
12+
init_skipped_log() {
13+
mkdir -p "$(dirname "$SKIPPED_LOG")"
14+
touch "$SKIPPED_LOG"
15+
}
16+
17+
log_skipped_image() {
18+
local image_name="$1"
19+
echo ":x: — No matching sha for $image_name" >> "$SKIPPED_LOG"
20+
}
1321

1422
# Fetch the latest commit hash (or use the user-provided one)
1523
fetch_latest_hash() {
@@ -109,6 +117,8 @@ update_runtime_images() {
109117
done
110118
}
111119

120+
init_skipped_log
121+
112122
PARAMS_ENV_PATH="$REPO_ROOT/manifests/base/params.env"
113123
# In case the digest updater function is triggered upstream.
114124
if [[ "$REPO_OWNER" == "opendatahub-io" ]]; then
@@ -136,7 +146,7 @@ if [[ "$REPO_OWNER" == "opendatahub-io" ]]; then
136146
# Check for latest_tag validity (maybe the new image is not yet build)
137147
if [[ -z "$latest_tag" || "$latest_tag" == "null" ]]; then
138148
echo "No matching tag found on registry for $file. Skipping."
139-
# calls log_skipped_image funtion from image-skipping-logger.sh script
149+
# calls log_skipped_image to log missing updates
140150
log_skipped_image "$image"
141151
continue
142152
fi
@@ -191,7 +201,7 @@ elif [[ "$REPO_OWNER" == "red-hat-data-services" ]]; then
191201
# Check for latest_tag validity (maybe the new image is not yet built)
192202
if [[ -z "$latest_tag" || "$latest_tag" == "null" ]]; then
193203
echo "No matching tag found on registry for $file. Skipping."
194-
# calls log_skipped_image funtion from image-skipping-logger.sh script
204+
# calls log_skipped_image to log missing updates
195205
log_skipped_image "$image"
196206
continue
197207
fi

0 commit comments

Comments
 (0)