Repository navigation
Expand local to multi-arch and add to CI #342
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fb22c81
[local] Multi-platform local images for x64 and arm64
mcopik d4b858c
[build] Install x86 wheels for x64 targets on ARM machines
mcopik d66b389
[cli] Exit with an error when building or pushing an image fails
mcopik cae8828
[cli] Push single-platform builds of multi-platform images
mcopik 6407ef5
[docker] Support registries with a port when pushing images
mcopik df9310b
[build] Install Python dependencies from wheels for the target's glibc
mcopik bd8cb9a
[local] Compare the architecture with the Docker daemon's
mcopik 5a1e470
[build] Select platform-specific npm packages for the target architec…
mcopik 35c9344
[build] Build images for another platform with BuildKit
mcopik b737697
[local] Wait up to 30 seconds for function servers to start
mcopik add69a7
[system] Ensure build containers are removed
mcopik 7eea8cd
[regression] Add local regression
mcopik 454003a
[local] Add to CI runner
mcopik bcfd358
[regression] Skip non-ARM benchmark on arm runners
mcopik 1c62913
[system] Correctly install Python dependencies
mcopik 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
Some comments aren't visible on the classic Files Changed page.
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
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 |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| name: Local Regression | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| code_ref: | ||
| description: Approved commit to test; empty uses the triggering commit | ||
| type: string | ||
| required: false | ||
| default: "" | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
| - "feature/**" | ||
|
|
||
| jobs: | ||
| regression: | ||
| strategy: | ||
| matrix: | ||
| language: [python, nodejs] | ||
| architecture: [x64, arm64] | ||
| include: | ||
| - language: python | ||
| version: "3.11" | ||
| - language: nodejs | ||
| version: "20" | ||
| fail-fast: false | ||
|
|
||
| name: ${{ matrix.language }} ${{ matrix.version }} ${{ matrix.architecture }} | ||
| # Local functions run on the Docker daemon's architecture, so each | ||
| # architecture needs a native runner. | ||
| runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | ||
| timeout-minutes: 60 | ||
|
|
||
| env: | ||
| RESOURCE_PREFIX: ci | ||
| LANGUAGE: ${{ matrix.language }} | ||
| LANGUAGE_VERSION: ${{ matrix.version }} | ||
| ARCHITECTURE: ${{ matrix.architecture }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ inputs.code_ref || github.sha }} | ||
| submodules: recursive | ||
| persist-credentials: false | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | ||
| with: | ||
| enable-cache: ${{ inputs.code_ref == '' }} | ||
|
|
||
| - name: Create virtual environment and install SeBS | ||
| run: | | ||
| uv venv | ||
| uv pip install . | ||
|
|
||
| - name: Start RustFS and ScyllaDB | ||
| run: | | ||
| set -o pipefail | ||
| uv run sebs storage start all configs/storage.json --output-json storage.json | ||
|
|
||
| - name: Create local regression config | ||
| run: | | ||
| jq \ | ||
| --arg language "${LANGUAGE}" \ | ||
| --arg version "${LANGUAGE_VERSION}" \ | ||
| --arg architecture "${ARCHITECTURE}" \ | ||
| ' | ||
| .experiments.deployment = "local" | ||
| | .deployment.name = "local" | ||
| | .experiments.architecture = $architecture | ||
| | .experiments.system_variant = "package" | ||
| | .experiments.runtime.language = $language | ||
| | .experiments.runtime.version = $version | ||
| ' configs/example.json > local-regression.json | ||
|
|
||
| - name: Run local regression | ||
| id: regression | ||
| continue-on-error: true | ||
| timeout-minutes: 45 | ||
| run: | | ||
| set -o pipefail | ||
| uv run sebs benchmark regression test \ | ||
| --config local-regression.json \ | ||
| --storage-configuration storage.json \ | ||
| --deployment local \ | ||
| --language ${LANGUAGE} \ | ||
| --language-version ${LANGUAGE_VERSION} \ | ||
| --architecture ${ARCHITECTURE} \ | ||
| --selected-architecture \ | ||
| --resource-prefix ${RESOURCE_PREFIX} \ | ||
| --filter-output | ||
|
|
||
| - name: Collect function container logs | ||
| if: steps.regression.outcome == 'failure' | ||
| run: | | ||
| mkdir -p diagnostics | ||
| docker ps -a > diagnostics/containers.txt 2>&1 || true | ||
| for container in $(docker ps -a --format '{{.Names}}'); do | ||
| docker logs "${container}" > "diagnostics/${container}.log" 2>&1 || true | ||
| done | ||
|
|
||
| - name: Upload regression artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: local-regression-artifacts-${{ matrix.language }}-${{ matrix.version }}-${{ matrix.architecture }} | ||
| path: | | ||
| diagnostics/ | ||
| regression-cache/ | ||
| storage.json | ||
| local-regression.json | ||
| regression_*.json | ||
| regression_*.log | ||
| if-no-files-found: ignore | ||
|
|
||
| - name: Fail job when regression failed | ||
| if: steps.regression.outcome == 'failure' | ||
| run: exit 1 | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| run: | | ||
| uv run sebs storage stop all storage.json || true |
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
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.