Skip to content

Bring feature/perf up-to-date #5629

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 60 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
afe395f
ci: remove warnings about outdated node versions
psafont Apr 19, 2024
c4ec768
pyproject.toml update settings for pytest etc for running CI locally
bernhardkaindl Mar 11, 2024
06a3d67
pyproject.toml: Migrate pytype_reporter from scripts to python3
bernhardkaindl Mar 11, 2024
45ca375
ci: do not comment on PRs after merging
psafont Apr 19, 2024
4661655
ci: ignore pylint and pyflakes checks
psafont Apr 19, 2024
8244e33
test_observer.py: Add setUp() and tearDown() of mock modules
bernhardkaindl Mar 6, 2024
4cdcf74
observer.py: Update error handling
bernhardkaindl Mar 6, 2024
e677c05
ci: install observer.py dependencies
psafont Apr 22, 2024
026818b
opam: delete xapi-stdext package
psafont Apr 22, 2024
c59e4ff
opam: fix xapi-squeezed metadata
psafont Apr 22, 2024
13eb35a
opam: create package xapi-tracing-export
psafont Apr 22, 2024
95e8307
datamodel_lifecycle: bump
psafont Apr 22, 2024
ce0d57d
Merge pull request #5584 from psafont/opam-metadata
psafont Apr 22, 2024
e699b39
CA-391859: Failed to stop varstord-guard
liulinC Apr 22, 2024
bbefd9a
Merge pull request #5578 from liulinC/private/linl/xs9
liulinC Apr 23, 2024
09b4bdb
Merge pull request #5575 from psafont/streamliner
robhoes Apr 23, 2024
4c8fcdc
Exposed methods to fetch the methods available in the API.
kc284 Apr 23, 2024
e78773e
The github workflow artifacts for C contained unnecessary files.
kc284 Apr 23, 2024
cc55dd2
CI: update to Ubuntu 22.04
edwintorok Apr 25, 2024
c5e0781
ci(nopin): pinning is very slow and not necessary
edwintorok Apr 25, 2024
ce2f588
ci(opam-dune-cache): cache dune builds from opam
edwintorok Apr 25, 2024
342e125
ci(norm): we have enough space now
edwintorok Apr 25, 2024
3907e21
ci: separate workflows
edwintorok Apr 25, 2024
99137b6
Update README with different build instructions
Apr 25, 2024
15391c9
ci: trim dune cache
edwintorok Apr 26, 2024
63e0377
Merge pull request #5592 from edwintorok/private/edvint/speedci
edwintorok Apr 26, 2024
4db52ad
Merge pull request #5593 from contificate/update-readme
robhoes Apr 26, 2024
5dad78b
Removed header because it does not look good on github.
kc284 Apr 26, 2024
2fba81d
Merge pull request #5587 from kc284/master
danilo-delbusso Apr 29, 2024
e87b459
Install xapi-tracing-export library
Vincent-lau Apr 29, 2024
532d8ff
Merge pull request #5600 from Vincent-lau/private/shul2/tracing-export
robhoes Apr 29, 2024
281347b
CA-392163 clear scheduled assignments on startup
Apr 29, 2024
7cbe1c5
Merge pull request #5602 from lindig/private/christianlin/CA-392163
robhoes Apr 30, 2024
f05ac72
tests: Allow the alcotest_suite to run
psafont Apr 30, 2024
0e95436
CP-48195: Instrument client side of `forkexecd`
GabrielBuica Apr 17, 2024
70f8149
CP-48195: Comment out `warn`.
GabrielBuica Apr 30, 2024
22d532c
Merge pull request #5604 from psafont/run_suite
robhoes Apr 30, 2024
7d315d0
CA-371529 XSI-1329 remove license check for has-vendor-device
Sep 12, 2023
53dcbc0
CA-371529 remote VCustom IDL data type
Apr 23, 2024
ebb58a8
CA-371529 expunge create_from_record_without_checking_licence ...
Apr 23, 2024
c467bda
CA-371529 Update quality-gate.sh
Apr 23, 2024
6182cc2
CA-371529 document changes in datamodel
Apr 29, 2024
8de2308
Merge pull request #5583 from GabrielBuica/private/dbuica/CP-48195-in…
mg12 May 2, 2024
741775d
CA-392453: Misc fixes to Java SDK
danilo-delbusso May 2, 2024
3a935e7
IH-568, fix(dune): avoid "module unavailable" errors when running dun…
edwintorok Jan 29, 2024
feeccfa
IH-568, fix (dune utop): conflicting module names with compiler libra…
psafont Mar 6, 2024
1521fa3
IH-568, fix (dune): allow all packages to be pinned
psafont May 3, 2024
4752acc
Merge pull request #5614 from psafont/topping
psafont May 3, 2024
a516e4e
CP-48969: Reduce amount of logspam created by iostat
psafont May 7, 2024
31a5aec
opam: update dependencies from the code
psafont May 7, 2024
b307724
idl: bump datamodel_lifecycle
psafont May 7, 2024
bca1d14
Merge pull request #5619 from psafont/sdxlogs
psafont May 7, 2024
7d5d08b
CA-389319: Wait and retry for GET_UPDATES_IN_PROGRESS
minglumlu May 8, 2024
bdbf705
Merge pull request #5617 from minglumlu/private/mingl/CA-389319
robhoes May 8, 2024
d0879c7
CA-392163 on start failure, clear a VM's resource allocations
May 1, 2024
812097d
Merge pull request #5610 from danilo-delbusso/bug/jsonvalue
danilo-delbusso May 9, 2024
34624a6
API docs in Hugo
robhoes Mar 25, 2024
837cec3
xenopsd/scripts: Make pygrub wrapper use the libexec path
May 10, 2024
4dd8351
Merge pull request #5625 from robhoes/api-docs-hugo-rebase
robhoes May 14, 2024
015526c
Merge remote-tracking branch 'upstream/master' into feature/perf
edwintorok May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 15 additions & 26 deletions .github/workflows/1.249-lcm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ jobs:
ocaml-test:
name: Ocaml tests
runs-on: ubuntu-20.04
env:
package: "xapi-cli-protocol xapi-client xapi-consts xapi-database xapi-datamodel xapi-types xapi xe"

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: '1.249-lcm'

- name: Free space
shell: bash
run: sudo rm -rf /usr/local/lib/android

- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/release/yangtze/lcm/tools/xs-opam-ci.env | cut -f2 -d " " > .env
Expand All @@ -42,37 +44,24 @@ jobs:
id: dotenv
uses: falti/dotenv-action@v1

- name: Retrieve date for cache key (year-week)
id: cache-key
run: echo "date=$(/bin/date -u "+%Y%W")" >> $GITHUB_OUTPUT
shell: bash

- name: Restore opam cache
id: opam-cache
uses: actions/cache@v4
with:
path: "~/.opam"
# invalidate cache every week, gets built using a scheduled job
key: ${{ steps.cache-key.outputs.date }}-1.249

- name: Update Ubuntu repositories
shell: bash
run: sudo apt-get update

- name: Use ocaml
uses: avsm/setup-ocaml@v1
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repository: ${{ steps.dotenv.outputs.repository }}
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repositories: |
xs-opam: ${{ steps.dotenv.outputs.repository }}
dune-cache: true

- name: Install dependencies
run: |
opam update
opam pin add . --no-action
opam depext -u ${{ env.package }}
opam upgrade
opam install ${{ env.package }} --deps-only --with-test -v
shell: bash
run: opam install . --deps-only --with-test -v

- name: Build
- name: Configure and build
shell: bash
run: |
opam exec -- ./configure
opam exec -- make
Expand All @@ -85,4 +74,4 @@ jobs:
- name: Avoid built packages to appear in the cache
# only packages in this repository follow a branch, the rest point
# to a tag
run: opam uninstall ${{ env.package }}
run: opam pin list --short | xargs opam unpin
13 changes: 0 additions & 13 deletions .github/workflows/cleanup-xapi-environment/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
opam exec -- dune exec ocaml/xapi-storage/generator/src/main.exe -- gen_markdown --path=$STORAGE_DOCDIR

- name: Deploy xapi-storage docs
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_STORAGE_DEPLOY_KEY }}
publish_dir: ${{ env.STORAGE_DOCDIR }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/generate-and-build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: SDK_Source_C
path: _build/install/default/xapi/sdk/c/*
path: |
_build/install/default/xapi/sdk/c/*
!_build/install/default/xapi/sdk/c/dune

- name: Store C# SDK source
uses: actions/upload-artifact@v4
Expand All @@ -42,8 +44,8 @@ jobs:
name: SDK_Source_PowerShell
path: _build/install/default/xapi/sdk/powershell/*

- name: Cleanup XenAPI environment
uses: ./.github/workflows/cleanup-xapi-environment
- name: Trim dune cache
run: opam exec -- dune cache trim --size=2GiB

build-c-sdk:
name: Build C SDK
Expand All @@ -67,7 +69,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: SDK_Artifacts_C
path: source/*
path: |
source/*
!source/src/*.o

build-csharp-sdk:
name: Build C# SDK
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'

Expand All @@ -24,7 +24,7 @@ jobs:
hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DOCS_DEPLOY_KEY }}
publish_dir: ./doc/public
Expand Down
142 changes: 3 additions & 139 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,115 +12,9 @@ concurrency: # On new push, cancel old workflows from the same PR, branch or tag
cancel-in-progress: true

jobs:
python-test:
name: Python tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # To check which files changed: origin/master..HEAD
- uses: LizardByte/setup-python-action@master
with:
python-version: ${{matrix.python-version}}

- uses: actions/cache@v4
name: Setup cache for running pre-commit fast
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- run: echo "::add-matcher::.github/workflows/python-warning-matcher.json"
name: "Setup GitHub for reporting Python warnings as annotations in pull request code review"

- uses: pre-commit/action@v3.0.0
name: Run pre-commit checks (no spaces at end of lines, etc)
if: ${{ matrix.python-version != '2.7' }}
with:
extra_args: --all-files --verbose --hook-stage commit
env:
SKIP: no-commit-to-branch

- name: Install dependencies only needed for python 2
if: ${{ matrix.python-version == '2.7' }}
run: pip install enum

- name: Install dependencies only needed for python 3
if: ${{ matrix.python-version != '2.7' }}
run: pip install pandas pytype toml wrapt

- name: Install common dependencies for Python ${{matrix.python-version}}
run: pip install future mock pytest-coverage pytest-mock

- name: Run Pytest for python 2 and get code coverage for Codecov
if: ${{ matrix.python-version == '2.7' }}
run: >
pytest
--cov=scripts --cov=ocaml/xcp-rrdd
scripts/ ocaml/xcp-rrdd -vv -rA
--junitxml=.git/pytest${{matrix.python-version}}.xml
--cov-report term-missing
--cov-report xml:.git/coverage${{matrix.python-version}}.xml
env:
PYTHONDEVMODE: yes

- name: Run Pytest for python 3 and get code coverage for Codecov
if: ${{ matrix.python-version != '2.7' }}
run: >
pytest
--cov=scripts --cov=ocaml/xcp-rrdd --cov=python3/
scripts/ ocaml/xcp-rrdd python3/ -vv -rA
--junitxml=.git/pytest${{matrix.python-version}}.xml
--cov-report term-missing
--cov-report xml:.git/coverage${{matrix.python-version}}.xml
env:
PYTHONDEVMODE: yes

- name: Upload Python ${{matrix.python-version}} coverage report to Codecov
uses: codecov/codecov-action@v3
with:
directory: .git
files: coverage${{matrix.python-version}}.xml
env_vars: OS,PYTHON
fail_ci_if_error: false
flags: python${{matrix.python-version}}
name: coverage${{matrix.python-version}}
verbose: true

- uses: dciborow/action-pylint@0.1.0
if: ${{ matrix.python-version != '2.7' }}
with:
reporter: github-pr-review
level: warning
# To be customized to cover remaining Python scripts:
glob_pattern: "**/*.py"

- name: Run pytype checks
if: ${{ matrix.python-version != '2.7' }}
run: ./pytype_reporter.py
env:
PR_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTYPE_REPORTER_DEBUG: True

# Try to add pytype_report.py's summary file as a comment to the PR:
# Documentation: https://github.com/marketplace/actions/add-pr-comment
- name: Add the pytype summary as a comment to the PR (if permitted)
uses: mshick/add-pr-comment@v2
# Depends on pytype checks, which are not run for python 2.7:
if: ${{ matrix.python-version != '2.7' }}
# Fails for user workflows without permissions(fork-based pull requests):
continue-on-error: true
with:
message-path: .git/pytype-summary.md # Add the content of it as comment

ocaml-tests:
name: Run OCaml tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
# Ensure you also update test-sdk-builds
# when changing this value, to keep builds
Expand Down Expand Up @@ -156,35 +50,5 @@ jobs:
- name: Check disk space
run: df -h || true

- name: Cleanup XenAPI environment
uses: ./.github/workflows/cleanup-xapi-environment

deprecation-test:
name: Deprecation tests
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Generate empty configuration for make to be happy
run: touch config.mk

- name: quality-gate
run: make quality-gate

- name: pyflakes
uses: reviewdog/action-pyflakes@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: error

test-sdk-builds:
name: Test SDK builds
uses: ./.github/workflows/generate-and-build-sdks.yml
with:
# Ensure you also update ocaml-tests
# when changing this value, to keep builds
# consistent
xapi_version: "v0.0.0"
- name: Trim dune cache
run: opam exec -- dune cache trim --size=2GiB
Loading
Loading