Skip to content

Commit 87f98c6

Browse files
committed
Merge remote-tracking branch 'upstream/main' into RHDHBUGS-3432-tech-dept-parallelize-bundle-and-image-processing-in-prepare-restricted-environment-sh-for-faster-execution
2 parents d4c08b8 + 6bbbec1 commit 87f98c6

85 files changed

Lines changed: 4864 additions & 2123 deletions

File tree

Some content is hidden

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

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ Please explain the changes you made here.
2121
Detailed instructions may help reviewers test this PR quickly and provide quicker feedback.
2222
-->
2323

24-
## Building Container Images for Testing
24+
## Container Images
2525

26-
Need to test container images from this PR?
27-
28-
**For Maintainers:** To trigger a test image build, review the code and comment `/build-images`.
29-
This always builds the HEAD of the PR branch.
30-
31-
**For Contributors:** Ask a maintainer to run `/build-images`.
32-
33-
Images will be built and pushed to Quay with links posted in comments.
26+
Container images are built and pushed to Quay automatically when relevant files change.
27+
Image links will be posted in a PR comment once the push completes.

‎.github/workflows/next-container-build.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
name: Build and push operator-bundle
8383
needs: changes
8484
if: needs.changes.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch'
85-
runs-on: ubuntu-24.04
85+
runs-on: ubuntu-26.04
8686
permissions:
8787
contents: read
8888
packages: write
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Nightly PostgreSQL Upgrade Test
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "25 0 * * *"
7+
8+
jobs:
9+
postgresql-upgrade:
10+
name: E2E PostgreSQL ${{ matrix.from_branch }} to ${{ matrix.to_branch }}
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ matrix.from_branch }}-${{ matrix.to_branch }}
13+
cancel-in-progress: true
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 90
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- from_branch: release-1.10
21+
to_branch: main
22+
permissions:
23+
contents: read
24+
env:
25+
CONTAINER_ENGINE: docker
26+
FROM_OPERATOR_MANIFEST: https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/${{ matrix.from_branch }}/dist/rhdh/install.yaml
27+
TO_OPERATOR_MANIFEST: ${{ github.workspace }}/dist/rhdh/install.yaml
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32+
with:
33+
ref: ${{ matrix.to_branch }}
34+
fetch-depth: 0
35+
persist-credentials: false
36+
37+
- name: Setup Go
38+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
39+
with:
40+
go-version-file: 'go.mod'
41+
42+
- name: Resolve source operator image
43+
run: |
44+
FROM_OPERATOR_IMAGE=$(curl --proto '=https' --proto-redir '=https' -fsSL "$FROM_OPERATOR_MANIFEST" | yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image')
45+
test -n "$FROM_OPERATOR_IMAGE"
46+
skopeo inspect "docker://$FROM_OPERATOR_IMAGE" > /dev/null
47+
echo "FROM_OPERATOR_IMAGE=$FROM_OPERATOR_IMAGE" >> "$GITHUB_ENV"
48+
49+
- name: Remove unnecessary files to free up disk space
50+
uses: endersonmenezes/free-disk-space@2a22f8c59cae9cddae7194b33e6b92d023b2b4b8 # v4
51+
with:
52+
remove_android: true
53+
remove_dotnet: true
54+
remove_haskell: true
55+
rm_cmd: "rmz"
56+
57+
- name: Build target operator image and manifest
58+
env:
59+
TO_OPERATOR_IMAGE: localhost/rhdh-operator:nightly-${{ matrix.from_branch }}-to-${{ matrix.to_branch }}-${{ github.run_id }}
60+
run: |
61+
make image-build build-installer PROFILE=rhdh IMG="$TO_OPERATOR_IMAGE"
62+
MANIFEST_IMAGE=$(yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image' "$TO_OPERATOR_MANIFEST")
63+
test "$MANIFEST_IMAGE" = "$TO_OPERATOR_IMAGE"
64+
echo "TO_OPERATOR_IMAGE=$TO_OPERATOR_IMAGE" >> "$GITHUB_ENV"
65+
66+
- name: Generate Kind config
67+
run: |
68+
cat <<EOF > "$RUNNER_TEMP/kind-config.yaml"
69+
apiVersion: kind.x-k8s.io/v1alpha4
70+
kind: Cluster
71+
nodes:
72+
- role: control-plane
73+
extraPortMappings:
74+
- containerPort: 80
75+
hostPort: 80
76+
protocol: TCP
77+
- containerPort: 443
78+
hostPort: 443
79+
protocol: TCP
80+
kubeadmConfigPatches:
81+
- |
82+
apiVersion: kubelet.config.k8s.io/v1beta1
83+
kind: KubeletConfiguration
84+
imageGCHighThresholdPercent: 70
85+
imageGCLowThresholdPercent: 50
86+
imageMinimumGCAge: 2m
87+
EOF
88+
89+
- name: Create Kind cluster
90+
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
91+
with:
92+
cluster_name: test-cluster
93+
config: ${{ runner.temp }}/kind-config.yaml
94+
ignore_failed_clean: true
95+
96+
- name: Load target operator image
97+
run: kind load docker-image --name test-cluster "$TO_OPERATOR_IMAGE"
98+
99+
- name: Install Ingress Controller
100+
run: |
101+
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
102+
kubectl wait --namespace ingress-nginx \
103+
--for=condition=ready pod \
104+
--selector=app.kubernetes.io/component=controller \
105+
--timeout=90s
106+
107+
- name: Run PostgreSQL upgrade E2E test
108+
env:
109+
BACKSTAGE_OPERATOR_TESTS_PLATFORM: kind
110+
BACKSTAGE_OPERATOR_TESTS_POSTGRESQL_UPGRADE: 'true'
111+
PROFILE: 'rhdh'
112+
OPERATOR_MANIFEST: ${{ env.TO_OPERATOR_MANIFEST }}
113+
IMG: ${{ env.TO_OPERATOR_IMAGE }}
114+
run: make test-e2e-upgrade

‎.github/workflows/nightly-upgrade-test.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ jobs:
7979
8080
FROM_OPERATOR_MANIFEST="https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/${{ matrix.from_branch }}/${distLocation}"
8181
echo "FROM_OPERATOR_MANIFEST=${FROM_OPERATOR_MANIFEST}" >> $GITHUB_ENV
82-
FROM_OPERATOR_IMAGE=$(curl -s "${FROM_OPERATOR_MANIFEST}" | yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image')
82+
FROM_OPERATOR_IMAGE=$(curl --proto '=https' --proto-redir '=https' -fsSL "${FROM_OPERATOR_MANIFEST}" | yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image')
8383
echo "FROM_OPERATOR_IMAGE=${FROM_OPERATOR_IMAGE}" >> $GITHUB_ENV
8484
8585
TO_OPERATOR_MANIFEST="https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/${{ matrix.to_branch }}/${distLocation}"
8686
echo "TO_OPERATOR_MANIFEST=${TO_OPERATOR_MANIFEST}" >> $GITHUB_ENV
87-
TO_OPERATOR_IMAGE=$(curl -s "${TO_OPERATOR_MANIFEST}" | yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image')
87+
TO_OPERATOR_IMAGE=$(curl --proto '=https' --proto-redir '=https' -fsSL "${TO_OPERATOR_MANIFEST}" | yq 'select(.kind == "Deployment" and .metadata.labels.app == "rhdh-operator") | .spec.template.spec.containers[0].image')
8888
echo "TO_OPERATOR_IMAGE=${TO_OPERATOR_IMAGE}" >> $GITHUB_ENV
8989
9090
- name: Check if operator images exist in remote registry

‎.github/workflows/nightly.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
make test
7171
7272
- name: Upload coverage to Codecov
73-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
73+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7
7474
with:
7575
token: ${{ secrets.CODECOV_TOKEN }}
7676
files: cover.out

‎.github/workflows/plugin-installer.yaml‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77
- 'release-[2-9]+.[0-9]+'
88
paths:
99
- 'plugin-installer/**'
10+
- 'pkg/fetcher/**'
11+
- 'cmd/plugin-fetch/**'
1012
- '.github/workflows/plugin-installer.yaml'
1113
pull_request:
1214
branches:
1315
- main
1416
paths:
1517
- 'plugin-installer/**'
18+
- 'pkg/fetcher/**'
19+
- 'cmd/plugin-fetch/**'
1620
- '.github/workflows/plugin-installer.yaml'
1721

1822
concurrency:
@@ -30,13 +34,16 @@ jobs:
3034
- name: Checkout
3135
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3236

33-
- name: Install dependencies
34-
run: |
35-
sudo apt-get -y update
36-
sudo apt-get -y install skopeo
37+
- name: Set up Go
38+
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
39+
with:
40+
go-version-file: go.mod
3741

3842
- name: Run tests
39-
run: RUN_INTEGRATION_TESTS=true ./plugin-installer/install_plugins_test.sh
43+
run: make dp-installer-test
44+
45+
- name: Build image (verify Dockerfile)
46+
run: docker build -f plugin-installer/Dockerfile .
4047

4148
build:
4249
name: Build image
@@ -49,17 +56,13 @@ jobs:
4956
- name: Checkout
5057
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5158

52-
- name: Build image (PR validation)
53-
if: github.event_name == 'pull_request'
54-
run: make install-dp-build
55-
5659
- name: Set up QEMU
5760
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
58-
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4
61+
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
5962

6063
- name: Set up Docker Buildx
6164
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
62-
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
65+
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
6366

6467
- name: Login to registry (${{ env.REGISTRY }})
6568
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
@@ -71,4 +74,4 @@ jobs:
7174

7275
- name: Build and push multiplatform image
7376
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
74-
run: make install-dp-buildx
77+
run: make dp-installer-buildx

0 commit comments

Comments
 (0)