-
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
Open
mangelajo
wants to merge
8
commits into
main
Choose a base branch
from
e2e-test-qemu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c7d7c54
feat: exporter-as-main QEMU pods with ExitAndReplace recycle e2e
mangelajo 6da964a
fix(qemu): put cidata on shared volume for sidecar mode
mangelajo 641a78b
test(e2e): power-cycle QEMU ExporterSet pods and assert recycle stays…
mangelajo 6017640
fix: cover shutdown_runtime_sidecar paths and share e2e client helpers
mangelajo 45d69a6
fix: address PR #929 review feedback for QEMU e2e
mangelajo 57975a7
fix: make shared-volume Unix sockets usable across QEMU pod UIDs
mangelajo e46f816
fix: keep jumpstarter-exec in exporter image, not per-runtime
mangelajo ac786ab
fix: move QEMU guest image prefetch into e2e setup script
mangelajo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Build context for python/Containerfile is the repo root. | ||
| # Keep .git — hatch-vcs metadata hooks call `git rev-parse` for URLs/version. | ||
| rust/target/ | ||
| **/target/ | ||
| python/.venv/ | ||
| **/.venv/ | ||
| **/__pycache__/ | ||
| **/.pytest_cache/ | ||
| **/.mypy_cache/ | ||
| **/.ruff_cache/ | ||
| e2e/testdata/ | ||
| .github/ | ||
| docs/_build/ | ||
| controller/bin/ | ||
| *.qcow2 | ||
| *.img | ||
| *.raw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,77 @@ 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 | ||
| # Bust when exporter image inputs change: Containerfile, Python sources, | ||
| # lockfiles, or embedded jumpstarter-exec (rust/). | ||
| key: exporter-image-${{ matrix.arch }}-${{ hashFiles('python/Containerfile', 'python/packages/**/*.py', 'python/**/pyproject.toml', 'python/uv.lock', 'rust/jumpstarter-exec/**', '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 | ||
| # Bust when QEMU runtime inputs change. | ||
| 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 +286,14 @@ 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. | ||
| # Job > Ginkgo suite timeout (60m in e2e/lib/common.sh) for setup/log upload. | ||
| timeout-minutes: 70 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
|
|
@@ -254,6 +327,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 +396,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' | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,3 +72,4 @@ spec: | |
| arch: x86_64 | ||
| smp: 1 | ||
| mem: 1G | ||
| disk_size: 2G | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.