|
48 | 48 | juju-channel: ${{ matrix.juju.snap_channel }} |
49 | 49 | provider: microk8s |
50 | 50 | channel: "${{ matrix.k8s-version }}-strict/stable" |
51 | | - bootstrap-options: "--agent-version ${{ matrix.juju.agent }}" |
| 51 | + # bootstrap-options: "--agent-version ${{ matrix.juju.agent }}" |
52 | 52 | microk8s-group: snap_microk8s |
53 | 53 | microk8s-addons: "hostpath-storage rbac dns metallb:10.64.140.43-10.64.140.49" |
| 54 | + - name: Patch juju installation |
| 55 | + run: | |
| 56 | + sudo snap install yq |
| 57 | + CONTROLLER_NAME=$(juju controllers --format yaml | yq .current-controller) |
| 58 | + juju destroy-controller $CONTROLLER_NAME --destroy-storage --no-prompt --destroy-all-models |
| 59 | + sudo snap refresh juju --revision 33784 |
| 60 | + sudo -i -u ubuntu juju bootstrap microk8s $CONTROLLER_NAME --agent-version "${{ matrix.juju.agent }}" |
| 61 | +
|
54 | 62 | - name: Install tox & poetry |
55 | 63 | run: | |
56 | 64 | pip install tox |
@@ -102,46 +110,15 @@ jobs: |
102 | 110 | echo "Installing terraform from snap" |
103 | 111 | sudo snap install terraform --classic |
104 | 112 | fi |
105 | | - - id: cache-image |
106 | | - name: Cache Image Locally |
107 | | - run: | |
108 | | - # Download image for avoiding time out |
109 | | - IMAGE="ghcr.io/canonical/charmed-spark-kyuubi@sha256:9268d19a6eef91914e874734b320fab64908faf0f7adb8856be809bc60ecd1d0" |
110 | | - docker pull $IMAGE |
111 | | - docker save $IMAGE -o image.tar |
112 | | - sudo microk8s ctr images import --base-name $IMAGE image.tar |
113 | | - docker rmi $IMAGE |
114 | | - rm image.tar |
115 | 113 | - id: tests-integration |
116 | 114 | name: Run Integration Tests |
117 | 115 | timeout-minutes: 90 |
118 | 116 | env: |
119 | 117 | AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} |
120 | 118 | AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} |
121 | 119 | run: | |
122 | | - UUID=$(uuidgen) |
123 | | - echo "Using UUID: ${UUID}" |
124 | | - cd python |
125 | | - # Run simple tests to make sure backend works and to clean up if needed |
126 | | - tox run -e integration-object-storage -- --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --uuid $UUID |
127 | | -
|
128 | | - # Sometimes deleting resources on the clouds may take some time |
129 | | - sleep 60 |
130 | | -
|
131 | | - # The first tests deploy the bundle |
132 | | - tox run -e integration-bundle -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --keep-models --model test-uat --cos-model cos --uuid $UUID |
133 | | -
|
134 | | - # Next we only use --no-deploy flag |
135 | | -
|
136 | | - tox run -e integration-kyuubi -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --no-deploy --keep-models --model test-uat --cos-model cos --uuid $UUID |
137 | | - tox run -e integration-sparkjob -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --no-deploy --keep-models --model test-uat --cos-model cos --uuid $UUID |
138 | | -
|
139 | | - # We re-run the last tests to make sure that the tests are idempotent |
140 | | - tox run -e integration-kyuubi -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --no-deploy --keep-models --model test-uat --cos-model cos --uuid $UUID |
141 | | - tox run -e integration-sparkjob -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --no-deploy --model test-uat --cos-model cos --uuid $UUID |
142 | | -
|
143 | | - # # Run backup / restore tests separately without --no-deploy and --keep-models |
144 | | - # tox run -e integration-backup-restore -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} --model test-uat --cos-model cos --uuid $UUID |
| 120 | + cd python/ |
| 121 | + tox -e uat -- --backend ${{ matrix.backend }} --spark-version ${{ matrix.version }} --storage-backend ${{ matrix.storage-backend }} |
145 | 122 | - id: collect-logs |
146 | 123 | name: Collect logs if job failed |
147 | 124 | shell: bash |
|
0 commit comments