-
Notifications
You must be signed in to change notification settings - Fork 98
Run regression on CI #294
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
mcopik
wants to merge
53
commits into
master
Choose a base branch
from
feature/circle-ci-jobs
base: master
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
Run regression on CI #294
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
2d8817d
[regression] Multiple bug fixes
mcopik 7cbc681
[ci] Update test job
mcopik eb4d0e0
[ci] Update test job
mcopik 2b19309
[ci] Enable CI job on feature branches
mcopik 09a350c
[ci] Fix CI command
mcopik e9185a1
[ci] Fix CI command
mcopik 5334168
[regression] Non-zero return from failed registration
mcopik 1fac84b
[aws] Remove unnecessary pkg_resources from container
mcopik a0d82f2
[ci] Fixes
mcopik 7454aac
[ci] Migrate from CircleCI to GH Actions
mcopik 62a6f31
[ci] Fixes
mcopik 6615792
[dev] Linting
mcopik 6340049
[dev] Update install in GH Actions
mcopik bd8d6e1
[aws] Reenable regression of 411 for containers
mcopik 96ace65
[ci] Remove the old Docker copy feature needed on CircleCI
mcopik eb4f3bc
[ci] Ensure benchmarks data is cloned
mcopik 3ed8812
[aws][ci] Shorten function names
mcopik 62f437c
[aws] Fix functio nanem splitting
mcopik 745cdd7
[docker] Ensure that failed builds are not marked as success
mcopik 478428e
[system] Add explicit printing of full build log
mcopik 6ac1184
[docker] Print full output of pip install
mcopik 2983b21
[docker] Support fallback to previous version of Docker image
mcopik a569837
[benchmarks] Fix 504 compatibility issues on Python 3.11 and older glibc
mcopik 2fe6edf
[aws] Debugging for regression runs
mcopik 11c96a3
[benchmarks] Ensure that we always put correct path to 311 benchmark
mcopik 3fa215d
[system] Bump current version
mcopik 483b016
[ci] Simplify resource naming
mcopik fdd7639
[ci] Add Nodejs builds
mcopik 75d5fee
[ci] Update badges
mcopik f0948f0
[ci] Cleanup functions once we are done
mcopik dbbf677
[ci] Enable GCP and Azure
mcopik 9d8b39a
[system] Update default architecture
mcopik 9339236
[ci] Add arm64 runs
mcopik 4b1a07e
[ci] Try to fix GCP credentials
mcopik ffee6d4
[ci] Fix
mcopik ef681b0
[ci] Bump GCP node version
mcopik b9ff872
[ci] Use ARM runners
mcopik 1214044
[ci] Fix typo in Azure creds
mcopik 307e6aa
[system] Support building multi-platform images
mcopik 921f5b6
[docs] Update docs on container images
mcopik 106ece6
[gcp] Tolerate 503 errors
mcopik c6f5101
[gcp] Add public access to all functions
mcopik 5a1f9fa
[ci] Extend timeout to handle Azure
mcopik 7a8bfb9
[azure] Ensure that regression always logs in
mcopik b4a34b5
[docs] Update config paths
mcopik 55adc37
[aws] Extend build image to arm64 compatibility
mcopik 5e3400a
[system] Proper build of multi-platform images
mcopik 54bc65a
[aws] Update Node.js build image for arm
mcopik 31a775d
[aws] Properly cleanup function resources
mcopik 7bb7e4a
[gcp] Delete functions
mcopik 3567ac5
[aws] Proper cleaning of function URLs
mcopik 379942f
[azure] Add function deletion option
mcopik f56f858
[ci] More langues
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
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,144 @@ | ||
| name: Regression Job (Reusable) | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| platform: | ||
| required: true | ||
| type: string | ||
| language: | ||
| required: true | ||
| type: string | ||
| version: | ||
| required: true | ||
| type: string | ||
| architecture: | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ${{ inputs.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | ||
|
|
||
| env: | ||
| RESOURCE_PREFIX: ci | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Restore SeBS cache | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: regression-cache/ | ||
| key: sebs-cache-${{ github.ref_name }}-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} | ||
| restore-keys: | | ||
| sebs-cache-${{ github.ref_name }}- | ||
|
|
||
| - name: Setup GCP credentials | ||
| if: inputs.platform == 'gcp' | ||
| uses: google-github-actions/auth@v2 | ||
| with: | ||
| credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON }} | ||
|
|
||
| - name: Setup Azure credentials | ||
| if: inputs.platform == 'azure' | ||
| run: | | ||
| echo "AZURE_SECRET_APPLICATION_ID=${{ secrets.AZURE_SECRET_APPLICATION_ID }}" >> $GITHUB_ENV | ||
| echo "AZURE_SECRET_TENANT=${{ secrets.AZURE_SECRET_TENANT }}" >> $GITHUB_ENV | ||
| echo "AZURE_SECRET_PASSWORD=${{ secrets.AZURE_SECRET_PASSWORD }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup AWS credentials | ||
| if: inputs.platform == 'aws' | ||
| run: | | ||
| echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV | ||
| echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV | ||
| echo "AWS_DEFAULT_REGION=${{ secrets.AWS_DEFAULT_REGION || 'us-east-1' }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Create virtual environment and install SeBS | ||
| run: | | ||
| uv venv | ||
| uv pip install . | ||
|
|
||
| - name: Run regression tests | ||
| timeout-minutes: 10 | ||
| run: | | ||
| source .venv/bin/activate | ||
| uv run sebs benchmark regression test \ | ||
| --config configs/example.json \ | ||
| --deployment ${{ inputs.platform }} \ | ||
| --language ${{ inputs.language }} \ | ||
| --language-version ${{ inputs.version }} \ | ||
| --architecture ${{ inputs.architecture }} \ | ||
| --selected-architecture \ | ||
| --resource-prefix ci | ||
|
|
||
| - name: Cleanup deployed functions | ||
| if: always() | ||
| run: | | ||
| source .venv/bin/activate | ||
| uv run sebs resources cleanup \ | ||
| --config configs/example.json \ | ||
| --deployment ${{ inputs.platform }} \ | ||
| --resource-prefix ci \ | ||
| --resource-type functions | ||
|
|
||
| - name: Generate test summary | ||
| if: always() | ||
| run: | | ||
| echo "Regression Test Summary" > test-summary.txt | ||
| echo "======================" >> test-summary.txt | ||
| echo "Platform: ${{ inputs.platform }}" >> test-summary.txt | ||
| echo "Language: ${{ inputs.language }}" >> test-summary.txt | ||
| echo "Version: ${{ inputs.version }}" >> test-summary.txt | ||
| echo "" >> test-summary.txt | ||
| if ls regression_*.json 1> /dev/null 2>&1; then | ||
| ls -1 regression_*.json | wc -l | xargs echo "Benchmarks tested:" >> test-summary.txt | ||
| echo "" >> test-summary.txt | ||
| echo "Results saved to artifacts/results/" >> test-summary.txt | ||
| else | ||
| echo "No benchmark results found" >> test-summary.txt | ||
| fi | ||
|
|
||
| - name: Upload test summary | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-summary-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} | ||
| path: test-summary.txt | ||
|
|
||
| - name: Collect and upload regression results | ||
| if: always() | ||
| run: | | ||
| mkdir -p results | ||
| if ls regression_*.json 1> /dev/null 2>&1; then | ||
| mv regression_*.json results/ || true | ||
| fi | ||
|
|
||
| - name: Upload regression results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: results-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} | ||
| path: results/ | ||
| if-no-files-found: ignore | ||
|
|
||
| - name: Upload cache snapshot | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cache-snapshot-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} | ||
| path: cache/ | ||
| if-no-files-found: ignore | ||
|
|
||
| - name: Save SeBS cache | ||
| if: success() | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: regression-cache/ | ||
| key: sebs-cache-${{ github.ref_name }}-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} | ||
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,55 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| linting: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Install system dependencies | ||
| run: sudo apt update && sudo apt install -y libcurl4-openssl-dev | ||
|
|
||
| - name: Cache uv dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/uv | ||
| key: uv-${{ runner.os }}-${{ hashFiles('requirements.txt', 'pyproject.toml') }} | ||
| restore-keys: | | ||
| uv-${{ runner.os }}- | ||
|
|
||
| - name: Install SeBS with dev dependencies | ||
| run: uv sync --extra dev | ||
|
|
||
| - name: Python code formatting with black | ||
| run: uv run black sebs --check --config .black.toml | ||
|
|
||
| - name: Python code lint with flake8 | ||
| run: uv run flake8 sebs --config=.flake8.cfg --tee --output-file flake-reports | ||
|
|
||
| - name: Python static code verification with mypy | ||
| run: uv run mypy sebs --config-file=.mypy.ini | ||
|
|
||
| - name: Check for Python documentation coverage | ||
| run: uv run interrogate -v --fail-under 100 sebs | ||
|
|
||
| - name: Upload flake8 reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: flake-reports | ||
| path: flake-reports |
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,75 @@ | ||
| name: Regression Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - 'feature/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| regression: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - platform: aws | ||
| language: python | ||
| version: "3.11" | ||
| architecture: "x64" | ||
| - platform: aws | ||
| language: python | ||
| version: "3.11" | ||
| architecture: "arm64" | ||
| - platform: aws | ||
| language: nodejs | ||
| version: "16" | ||
| architecture: "x64" | ||
| - platform: aws | ||
| language: nodejs | ||
| version: "16" | ||
| architecture: "arm64" | ||
| - platform: aws | ||
| language: cpp | ||
| version: "all" | ||
| architecture: "x64" | ||
| - platform: aws | ||
| language: java | ||
| version: "17" | ||
| architecture: "x64" | ||
| - platform: aws | ||
| language: java | ||
| version: "17" | ||
| architecture: "arm64" | ||
| - platform: gcp | ||
| language: python | ||
| version: "3.11" | ||
| architecture: "x64" | ||
| - platform: gcp | ||
| language: nodejs | ||
| version: "20" | ||
| architecture: "x64" | ||
| - platform: gcp | ||
| language: java | ||
| version: "17" | ||
| architecture: "x64" | ||
| - platform: azure | ||
| language: python | ||
| version: "3.11" | ||
| architecture: "x64" | ||
| - platform: azure | ||
| language: nodejs | ||
| version: "20" | ||
| architecture: "x64" | ||
| - platform: azure | ||
| language: java | ||
| version: "17" | ||
| architecture: "x64" | ||
| fail-fast: false | ||
|
|
||
| uses: ./.github/workflows/_regression-job.yml | ||
| with: | ||
| platform: ${{ matrix.platform }} | ||
| language: ${{ matrix.language }} | ||
| version: ${{ matrix.version }} | ||
| architecture: ${{ matrix.architecture }} | ||
| secrets: inherit |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upload the correct cache directory in the snapshot artifact.
This workflow restores/saves
regression-cache/, but snapshot upload points tocache/, so the artifact can miss the actual cache used by regression runs.🛠️ Proposed fix
- name: Upload cache snapshot if: always() uses: actions/upload-artifact@v4 with: name: cache-snapshot-${{ inputs.platform }}-${{ inputs.language }}-${{ inputs.version }} - path: cache/ + path: regression-cache/ if-no-files-found: ignore🤖 Prompt for AI Agents