-
Notifications
You must be signed in to change notification settings - Fork 33
e2e: testing qemu provisioner + driver with jumpstarter-exec #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
c7d7c54
6da964a
641a78b
6017640
45d69a6
57975a7
e46f816
ac786ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Build context for python/Containerfile is the repo root. | ||
| rust/target/ | ||
| **/target/ | ||
| python/.venv/ | ||
| **/.venv/ | ||
| **/__pycache__/ | ||
| **/.pytest_cache/ | ||
| **/.mypy_cache/ | ||
| **/.ruff_cache/ | ||
| e2e/testdata/ | ||
| .github/ | ||
| docs/_build/ | ||
| controller/bin/ | ||
| *.qcow2 | ||
| *.img | ||
| *.raw |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,74 @@ jobs: | |
| path: /tmp/exporterset-controller-image.tar | ||
| retention-days: 1 | ||
|
|
||
| build-exporter-image: | ||
| needs: changes | ||
| if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' | ||
| strategy: | ||
| matrix: | ||
| include: ${{ fromJson(needs.changes.outputs.e2e-matrix) }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Cache exporter image | ||
| id: cache | ||
| uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5 | ||
| with: | ||
| path: /tmp/exporter-image.tar | ||
| key: exporter-image-${{ matrix.arch }}-${{ hashFiles('python/Containerfile', 'python/**/pyproject.toml', 'python/uv.lock', 'rust/**', 'controller/Makefile') }} | ||
|
|
||
| - name: Build exporter image | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| make -C controller docker-build-exporter | ||
| docker save quay.io/jumpstarter-dev/jumpstarter:latest -o /tmp/exporter-image.tar | ||
|
|
||
| - name: Upload exporter image | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: exporter-image-${{ matrix.arch }} | ||
| path: /tmp/exporter-image.tar | ||
| retention-days: 1 | ||
|
|
||
| build-qemu-runtime-image: | ||
| needs: changes | ||
| if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' | ||
| strategy: | ||
| matrix: | ||
| include: ${{ fromJson(needs.changes.outputs.e2e-matrix) }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Cache qemu-runtime image | ||
| id: cache | ||
| uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5 | ||
| with: | ||
| path: /tmp/qemu-runtime-image.tar | ||
| key: qemu-runtime-image-${{ matrix.arch }}-${{ hashFiles('controller/Makefile', 'controller/Containerfile.qemu-runtime') }} | ||
|
|
||
| - name: Build qemu-runtime image | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| make -C controller docker-build-qemu-runtime | ||
| docker save quay.io/jumpstarter-dev/virtual/qemu-runtime:latest -o /tmp/qemu-runtime-image.tar | ||
|
|
||
| - name: Upload qemu-runtime image | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: qemu-runtime-image-${{ matrix.arch }} | ||
| path: /tmp/qemu-runtime-image.tar | ||
| retention-days: 1 | ||
|
|
||
| build-python-wheels: | ||
| needs: changes | ||
| if: needs.changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' | ||
|
|
@@ -215,12 +283,13 @@ jobs: | |
| # =========================================================================== | ||
|
|
||
| e2e-tests: | ||
| needs: [changes, build-controller-image, build-operator-image, build-exporterset-controller-image, build-python-wheels] | ||
| needs: [changes, build-controller-image, build-operator-image, build-exporterset-controller-image, build-exporter-image, build-qemu-runtime-image, build-python-wheels] | ||
| strategy: | ||
| matrix: | ||
| include: ${{ fromJson(needs.changes.outputs.e2e-matrix) }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 60 | ||
| # Includes ExporterSet QEMU coverage (TCG); flash/boot still skipped until #924. | ||
| timeout-minutes: 90 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
|
|
@@ -254,6 +323,9 @@ jobs: | |
| sudo modprobe "$mod" 2>/dev/null || true | ||
| done | ||
|
|
||
| - name: Prefetch Alpine guest image for ExporterSet QEMU | ||
| run: bash e2e/scripts/ensure-qemu-guest-image.sh | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this must run from the setup-e2e make target, not be part of github ci yaml. |
||
|
|
||
| - name: Setup e2e test environment | ||
| run: make e2e-setup | ||
| env: | ||
|
|
@@ -320,7 +392,7 @@ jobs: | |
| artifact-name: e2e-logs-compat-old-controller | ||
|
|
||
| e2e-compat-old-client: | ||
| needs: [changes, build-controller-image, build-operator-image, build-exporterset-controller-image, build-python-wheels] | ||
| needs: [changes, build-controller-image, build-operator-image, build-exporterset-controller-image, build-exporter-image, build-qemu-runtime-image, build-python-wheels] | ||
| # Skip on PRs — compat tests run in merge queue and workflow_dispatch. | ||
| if: >- | ||
| github.event_name != 'pull_request' | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -72,3 +72,4 @@ spec: | |||||
| arch: x86_64 | ||||||
| smp: 1 | ||||||
| mem: 1G | ||||||
| disk_size: 10G | ||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
May be more conservative like this, to make sure CI is ok.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 45d69a6: sample uses |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ const ( | |
| // configMountPath is where the ExporterConfig Secret is mounted. | ||
| configMountPath = "/etc/jumpstarter/exporters" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider exporting the constant from the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exported |
||
|
|
||
| // exporterContainerName is the init-container name in the sidecar Pod. | ||
| // exporterContainerName is the main container that runs jmp run. | ||
| exporterContainerName = "exporter" | ||
| ) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.