Skip to content

Commit

Permalink
Merge dnplas-dev-fix-ci into main (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
DnPlas authored Jul 31, 2023
2 parents c154e37 + 7db9c0c commit 702bb25
Show file tree
Hide file tree
Showing 94 changed files with 1,381 additions and 1,459 deletions.
49 changes: 19 additions & 30 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ jobs:
- kfp-profile-controller
- kfp-api
steps:
# Ideally we'd use self-hosted runners, but this effort is still not stable
# This action will remove unused software (dotnet, haskell, android libs, codeql,
# and docker images) from the GH runner, which will liberate around 60 GB of storage
# distributed in 40GB for root and around 20 for a mnt point.
- name: Maximise GH runner space
uses: easimon/maximize-build-space@v7
with:
root-reserve-mb: 40960
remove-dotnet: 'true'
remove-haskell: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
Expand All @@ -82,21 +95,12 @@ jobs:
juju-channel: 2.9/stable
charmcraft-channel: latest/candidate

# TODO: Remove once the actions-operator does this automatically
- name: Configure kubectl
run: |
sg microk8s -c "microk8s config > ~/.kube/config"
- run: |
sg microk8s -c "tox -e ${{ matrix.charm }}-integration"
# Collect debug logs if failed
- name: Dump Juju/k8s logs on failure
uses: canonical/charm-logdump-action@main
if: failure()
with:
app: ${{ matrix.charm }}
model: testing
- name: Collect charm debug artifacts
uses: canonical/kubeflow-ci/actions/dump-charm-debug-artifacts@main
if: always()

test-bundle:
name: Test the bundle
Expand Down Expand Up @@ -128,21 +132,13 @@ jobs:
channel: 1.24/stable
juju-channel: 2.9/stable
charmcraft-channel: latest/candidate
microk8s-addons: "dns hostpath-storage rbac metallb:10.64.140.43-10.64.140.49"

# TODO: Remove once https://bugs.launchpad.net/juju/+bug/2024897 is fixed
- name: Refresh Juju snap
run: |
sudo snap refresh juju --revision 22345
# Required until https://github.com/charmed-kubernetes/actions-operator/pull/33 is merged
- run: |
sg microk8s -c "microk8s enable metallb:'10.64.140.43-10.64.140.49,192.168.0.105-192.168.0.111'"
# TODO: Remove once the actions-operator does this automatically
- name: Configure kubectl
run: |
sg microk8s -c "microk8s config > ~/.kube/config"
- name: Run test
run: |
# Requires the model to be called kubeflow due to kfp-viewer
Expand All @@ -160,16 +156,9 @@ jobs:
run: juju status
if: failure()

- name: Save relevant debug artifacts
- name: Collect charm debug artifacts
uses: canonical/kubeflow-ci/actions/dump-charm-debug-artifacts@main
if: always()
run: |
mkdir ~/kfp-operators-debug-logs
juju debug-log --replay | tee ~/kfp-operators-debug-logs/juju-debug-log.log
juju status | tee ~/kfp-operators-debug-logs/juju-status.log
bash -c "cp ~/.local/state/charmcraft/log/* ~/kfp-operators-debug-logs/"
sg microk8s -c "microk8s.kubectl describe deployments -A | tee ~/kfp-operators-debug-logs/deployments.log"
sg microk8s -c "microk8s.kubectl describe pods -A | tee ~/kfp-operators-debug-logs/pods.log"
sg microk8s -c "microk8s.kubectl describe workloads -A | tee ~/kfp-operators-debug-logs/workloads.log"

- name: Upload debug artifacts
if: always()
Expand Down
Loading

0 comments on commit 702bb25

Please sign in to comment.