|
54 | 54 | - name: Setup and start KinD cluster
|
55 | 55 | uses: ./common/github-actions/kind
|
56 | 56 |
|
57 |
| - - name: Deploy Kueue |
58 |
| - run: | |
59 |
| - make kueue-e2e |
60 |
| -
|
61 | 57 | - name: Install OLM
|
62 | 58 | run: |
|
63 | 59 | kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/crds.yaml
|
@@ -126,83 +122,80 @@ jobs:
|
126 | 122 | BUNDLE_PUSH_OPT: "--tls-verify=false"
|
127 | 123 | CATALOG_PUSH_OPT: "--tls-verify=false"
|
128 | 124 |
|
129 |
| - # TODO: Disabled during the MCAD to Kueue transition. |
130 |
| - # We do not intend to support the scenario of in place updating |
131 |
| - # from an MCAD-based Codeflare Operator to a Kueue-based one. |
132 |
| - # - name: Run OLM Upgrade e2e AppWrapper creation test |
133 |
| - # run: | |
134 |
| - # export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
135 |
| - # echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
136 |
| - # set -euo pipefail |
137 |
| - # go test -timeout 30m -v ./test/upgrade -run TestMNISTCreateAppWrapper -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
138 |
| - |
139 |
| - # - name: Update Operator to the built version |
140 |
| - # run: | |
141 |
| - # ORIGINAL_POD_NAME=$(kubectl get pod -l app.kubernetes.io/name=codeflare-operator -n openshift-operators -o json | jq -r .items[].metadata.name) |
142 |
| - # echo "Running old operator pod name is ${ORIGINAL_POD_NAME}" |
143 |
| - |
144 |
| - # echo Updating custom CatalogSource image to the built CatalogSource with latest operator |
145 |
| - # kubectl patch CatalogSource codeflare-olm-test -n olm --type merge --patch "{\"spec\":{\"image\":\"${CATALOG_IMG}\"}}" |
146 |
| - |
147 |
| - # echo Waiting for previous operator pod to get deleted |
148 |
| - # kubectl wait --timeout=120s --for=delete pod/${ORIGINAL_POD_NAME} -n openshift-operators |
149 |
| - |
150 |
| - # echo Waiting for Subscription to be ready |
151 |
| - # kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s |
152 |
| - |
153 |
| - # echo Waiting for Deployment to be ready |
154 |
| - # timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done' |
155 |
| - # kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s |
156 |
| - |
157 |
| - # echo Checking that correct CSV is available |
158 |
| - # CSV_VERSION=$(kubectl get ClusterServiceVersion/codeflare-operator.${VERSION} -n openshift-operators -o json | jq -r .spec.version) |
159 |
| - # if [ "v${CSV_VERSION}" != "${VERSION}" ]; then |
160 |
| - # echo "CSV version v${CSV_VERSION} doesn't match expected version ${VERSION}" |
161 |
| - # exit 1 |
162 |
| - # fi |
163 |
| - # env: |
164 |
| - # CATALOG_IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator-catalog:v0.0.1" |
165 |
| - # SUBSCRIPTION_NAME: "codeflare-operator" |
166 |
| - # SUBSCRIPTION_NAMESPACE: "openshift-operators" |
167 |
| - |
168 |
| - # - name: Run OLM Upgrade e2e Appwrapper Job status test to monitor training |
169 |
| - # run: | |
170 |
| - # export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
171 |
| - # echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
172 |
| - # set -euo pipefail |
173 |
| - # go test -timeout 30m -v ./test/upgrade -run TestMNISTCheckAppWrapperStatus -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
174 |
| - |
175 |
| - # - name: Run e2e tests against built operator |
176 |
| - # run: | |
177 |
| - # export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
178 |
| - # echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
179 |
| - |
180 |
| - # set -euo pipefail |
181 |
| - # go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
182 |
| - |
183 |
| - # - name: Print CodeFlare operator logs |
184 |
| - # if: always() && steps.deploy.outcome == 'success' |
185 |
| - # run: | |
186 |
| - # echo "Printing CodeFlare operator logs" |
187 |
| - # kubectl logs -n openshift-operators --tail -1 -l app.kubernetes.io/name=codeflare-operator | tee ${CODEFLARE_TEST_OUTPUT_DIR}/codeflare-operator.log |
188 |
| - |
189 |
| - # - name: Print KubeRay operator logs |
190 |
| - # if: always() && steps.deploy.outcome == 'success' |
191 |
| - # run: | |
192 |
| - # echo "Printing KubeRay operator logs" |
193 |
| - # kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${CODEFLARE_TEST_OUTPUT_DIR}/kuberay.log |
194 |
| - |
195 |
| - # - name: Export all KinD pod logs |
196 |
| - # uses: ./common/github-actions/kind-export-logs |
197 |
| - # if: always() && steps.deploy.outcome == 'success' |
198 |
| - # with: |
199 |
| - # output-directory: ${CODEFLARE_TEST_OUTPUT_DIR} |
200 |
| - |
201 |
| - # - name: Upload logs |
202 |
| - # uses: actions/upload-artifact@v4 |
203 |
| - # if: always() && steps.deploy.outcome == 'success' |
204 |
| - # with: |
205 |
| - # name: logs |
206 |
| - # retention-days: 10 |
207 |
| - # path: | |
208 |
| - # ${{ env.CODEFLARE_TEST_OUTPUT_DIR }}/**/*.log |
| 125 | + - name: Run OLM Upgrade e2e AppWrapper creation test |
| 126 | + run: | |
| 127 | + export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
| 128 | + echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
| 129 | + set -euo pipefail |
| 130 | + go test -timeout 30m -v ./test/upgrade -run TestMNISTCreateAppWrapper -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
| 131 | +
|
| 132 | + - name: Update Operator to the built version |
| 133 | + run: | |
| 134 | + ORIGINAL_POD_NAME=$(kubectl get pod -l app.kubernetes.io/name=codeflare-operator -n openshift-operators -o json | jq -r .items[].metadata.name) |
| 135 | + echo "Running old operator pod name is ${ORIGINAL_POD_NAME}" |
| 136 | +
|
| 137 | + echo Updating custom CatalogSource image to the built CatalogSource with latest operator |
| 138 | + kubectl patch CatalogSource codeflare-olm-test -n olm --type merge --patch "{\"spec\":{\"image\":\"${CATALOG_IMG}\"}}" |
| 139 | +
|
| 140 | + echo Waiting for previous operator pod to get deleted |
| 141 | + kubectl wait --timeout=120s --for=delete pod/${ORIGINAL_POD_NAME} -n openshift-operators |
| 142 | +
|
| 143 | + echo Waiting for Subscription to be ready |
| 144 | + kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s |
| 145 | +
|
| 146 | + echo Waiting for Deployment to be ready |
| 147 | + timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done' |
| 148 | + kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s |
| 149 | +
|
| 150 | + echo Checking that correct CSV is available |
| 151 | + CSV_VERSION=$(kubectl get ClusterServiceVersion/codeflare-operator.${VERSION} -n openshift-operators -o json | jq -r .spec.version) |
| 152 | + if [ "v${CSV_VERSION}" != "${VERSION}" ]; then |
| 153 | + echo "CSV version v${CSV_VERSION} doesn't match expected version ${VERSION}" |
| 154 | + exit 1 |
| 155 | + fi |
| 156 | + env: |
| 157 | + CATALOG_IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator-catalog:v0.0.1" |
| 158 | + SUBSCRIPTION_NAME: "codeflare-operator" |
| 159 | + SUBSCRIPTION_NAMESPACE: "openshift-operators" |
| 160 | + |
| 161 | + - name: Run OLM Upgrade e2e Appwrapper Job status test to monitor training |
| 162 | + run: | |
| 163 | + export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
| 164 | + echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
| 165 | + set -euo pipefail |
| 166 | + go test -timeout 30m -v ./test/upgrade -run TestMNISTCheckAppWrapperStatus -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
| 167 | +
|
| 168 | + - name: Run e2e tests against built operator |
| 169 | + run: | |
| 170 | + export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} |
| 171 | + echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV |
| 172 | +
|
| 173 | + set -euo pipefail |
| 174 | + go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt |
| 175 | +
|
| 176 | + - name: Print CodeFlare operator logs |
| 177 | + if: always() && steps.deploy.outcome == 'success' |
| 178 | + run: | |
| 179 | + echo "Printing CodeFlare operator logs" |
| 180 | + kubectl logs -n openshift-operators --tail -1 -l app.kubernetes.io/name=codeflare-operator | tee ${CODEFLARE_TEST_OUTPUT_DIR}/codeflare-operator.log |
| 181 | +
|
| 182 | + - name: Print KubeRay operator logs |
| 183 | + if: always() && steps.deploy.outcome == 'success' |
| 184 | + run: | |
| 185 | + echo "Printing KubeRay operator logs" |
| 186 | + kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${CODEFLARE_TEST_OUTPUT_DIR}/kuberay.log |
| 187 | +
|
| 188 | + - name: Export all KinD pod logs |
| 189 | + uses: ./common/github-actions/kind-export-logs |
| 190 | + if: always() && steps.deploy.outcome == 'success' |
| 191 | + with: |
| 192 | + output-directory: ${CODEFLARE_TEST_OUTPUT_DIR} |
| 193 | + |
| 194 | + - name: Upload logs |
| 195 | + uses: actions/upload-artifact@v4 |
| 196 | + if: always() && steps.deploy.outcome == 'success' |
| 197 | + with: |
| 198 | + name: logs |
| 199 | + retention-days: 10 |
| 200 | + path: | |
| 201 | + ${{ env.CODEFLARE_TEST_OUTPUT_DIR }}/**/*.log |
0 commit comments