Skip to content

Commit d0d9cee

Browse files
committed
Merge branch 'stable-2.x' of https://github.com/opendatahub-io/notebooks into sync-downstream-225
2 parents 8cd4a69 + cee5011 commit d0d9cee

File tree

115 files changed

+15148
-6466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+15148
-6466
lines changed

.dockerignore

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
.git/
2-
.idea/
3-
.venv/
41
bin/
52
ci/
63
tests/
74

5+
# IDE
6+
.idea/
7+
8+
# git
9+
.git/
10+
.gitignore
11+
.gitkeep
12+
13+
# Python cache
814
**/.mypy_cache/
915
**/.pytest_cache/
1016
**/__pycache__/
1117
**/*.pyc
1218

13-
**/Dockerfile
19+
# Virtual environment
20+
env/
21+
venv/
22+
.venv/
23+
*.egg-info/
24+
25+
# Dockerfiles
26+
**/Dockerfile*
27+
28+
# Logs
29+
*.log
30+
31+
# OS-specific files
32+
.DS_Store
33+
Thumbs.db

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## How Has This Been Tested?
7+
<!--- Please describe in detail how you tested your changes. -->
8+
<!--- Include details of your testing environment, and the tests you ran to -->
9+
<!--- see how your change affects other areas of the code, etc. -->
10+
11+
Self checklist (all need to be checked):
12+
- [ ] Ensure that you have run `make test` (`gmake` on macOS) before asking for review
13+
- [ ] Changes to everything except `Dockerfile.konflux` files should be done in `odh/notebooks` and automatically synced to `rhds/notebooks`. For Konflux-specific changes, modify `Dockerfile.konflux` files directly in `rhds/notebooks` as these require special attention in the downstream repository and flow to the upcoming RHOAI release.
14+
15+
## Merge criteria:
16+
<!--- This PR will be merged by any repository approver when it meets all the points in the checklist -->
17+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
18+
19+
- [ ] The commits are squashed in a cohesive manner and have meaningful messages.
20+
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
21+
- [ ] The developer has manually tested the changes and verified that the changes work

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,8 @@ jobs:
141141
df -h
142142
143143
sudo apt-get update
144-
sudo apt-get remove -y '^dotnet-.*'
145-
sudo apt-get remove -y '^llvm-.*'
146-
sudo apt-get remove -y 'php.*'
147-
sudo apt-get remove -y '^mongodb-.*'
148-
sudo apt-get autoremove -y
144+
sudo apt-get purge -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*'
145+
sudo apt-get autoremove -y --purge
149146
sudo apt-get clean
150147
sudo rm -rf /usr/local/.ghcup &
151148
sudo rm -rf /usr/local/lib/android &

.github/workflows/update-tags.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: Update Tekton Tags
3+
on: # yamllint disable-line rule:truthy
4+
workflow_dispatch:
5+
inputs:
6+
new_tag:
7+
description: "Set a new image tag (e.g. YYYYx-vn.n)"
8+
required: true
9+
jobs:
10+
update-tags:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v5
18+
with:
19+
ref: main
20+
fetch-depth: 0
21+
22+
- name: Detect and replace tags in .tekton and params-latest.env files
23+
id: replace
24+
run: |
25+
set -e
26+
regex="[0-9]{4}[a-z]-v[0-9]+\.[0-9]+"
27+
new_tag="${{ github.event.inputs.new_tag }}"
28+
29+
echo "Searching for tags in .tekton/*.yaml..."
30+
prev_tag=$(grep -rhoP "$regex" .tekton/*.yaml | sort -u | head -n1)
31+
32+
if [ -z "$prev_tag" ]; then
33+
echo "❌ No matching tag found with regex $regex"
34+
exit 1
35+
fi
36+
37+
echo "Found previous tag: $prev_tag"
38+
echo "Replacing $prev_tag -> $new_tag"
39+
40+
# Update Tekton yamls
41+
find .tekton -type f -name "*.yaml" -print0 | \
42+
xargs -0 -I{} perl -0777 -i -pe "s/\Q$prev_tag\E/$new_tag/g" "{}"
43+
44+
# Update params-latest.env
45+
perl -pi -e "s/\Q$prev_tag\E/$new_tag/g" manifests/base/params-latest.env
46+
47+
# Export previous tag for later steps
48+
echo "previous_tag=$prev_tag" >> $GITHUB_OUTPUT
49+
50+
- name: Commit and push changes to branch
51+
id: commit
52+
run: |
53+
branch="update-tekton-tag-${{ github.event.inputs.new_tag }}"
54+
prev_tag="${{ steps.replace.outputs.previous_tag }}"
55+
new_tag="${{ github.event.inputs.new_tag }}"
56+
57+
git config user.name "github-actions[bot]"
58+
git config user.email "github-actions[bot]@users.noreply.github.com"
59+
60+
if git diff --quiet; then
61+
echo "✅ No changes to commit"
62+
exit 0
63+
fi
64+
65+
git checkout -b "$branch"
66+
git add .tekton/*.yaml manifests/base/params-latest.env
67+
git commit -m "chore: update tags from ${prev_tag} to ${new_tag}"
68+
git push origin "$branch"
69+
echo "branch=$branch" >> $GITHUB_OUTPUT
70+
71+
- name: Create Pull Request
72+
run: |
73+
branch="${{ steps.commit.outputs.branch }}"
74+
prev_tag="${{ steps.replace.outputs.previous_tag }}"
75+
new_tag="${{ github.event.inputs.new_tag }}"
76+
77+
body=":rocket: Automated Tekton + params-latest.env image tag update.
78+
- Updated from \`${prev_tag}\` → \`${new_tag}\`
79+
- Created by \`.github/workflows/update-tekton-tags.yaml\`"
80+
81+
gh pr create \
82+
--repo "$GITHUB_REPOSITORY" \
83+
--title "chore: update image tags ${prev_tag} → ${new_tag}" \
84+
--body "$body" \
85+
--head "$branch" \
86+
--base main
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)