Skip to content
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

Upstream sync #12

Merged
merged 34 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b6f959a
GitHub workflows (#369)
k0ka Dec 7, 2023
b49c6a6
always recheck all tests on push to master (#370)
k0ka Dec 7, 2023
184990e
Restore read the docs (#371)
k0ka Dec 12, 2023
e1c63af
Fix documentation (#372)
k0ka Dec 12, 2023
3c85b6f
Fix documentation (#373)
k0ka Dec 12, 2023
5712c30
Fix sort_key and sort_dir parameters for BlockStorage/v2/listSnapshot…
k0ka Dec 20, 2023
0421764
fix list formating in documentation (#375)
k0ka Dec 20, 2023
a5ecd54
added phpdocs for better type hinting (#376)
k0ka Dec 20, 2023
1cad223
one integration workflow (#377)
k0ka Dec 20, 2023
47c8ed9
create BlockStorage v3 as copy of v2 (#378)
k0ka Jan 5, 2024
7651038
Chores (#379)
k0ka Jan 5, 2024
aeb5012
Application credentials (#380)
k0ka Jan 7, 2024
cb8caff
fix doc for application credentials (#381)
k0ka Jan 7, 2024
ac3ca5c
Handler stack factory (#382)
k0ka Jan 7, 2024
2804874
Fix testing class namespaces (#383)
k0ka Jan 7, 2024
45bd478
Refactor tests (#384)
k0ka Jan 8, 2024
2335c75
Move integration tests to phpunit (#387)
k0ka Jan 17, 2024
f5ca4e9
License: add full text, remove rackspace (#388)
k0ka Jan 17, 2024
e351554
added bigger rescue timeouts (#390)
k0ka Jan 17, 2024
f3b3c6f
return HandlerStack for BC (#391)
k0ka Jan 18, 2024
b5d1fc6
Merge network services (#392)
k0ka Jan 27, 2024
857fcc8
Clarify docs (#389)
k0ka Jan 30, 2024
b0e560d
Resume suspend server (#394)
k0ka Jan 30, 2024
9f817df
fix resume/suspend doc (#395)
k0ka Jan 30, 2024
ba44841
refactor unit tests: use `mockRequest` for all requests (#397)
k0ka Feb 1, 2024
c32ab23
Fix Swift container requests with "tokens" in its name (#396)
k0ka Feb 1, 2024
d823be3
add errorVerbosity (#400)
k0ka Feb 5, 2024
cb7fcc8
add docs for volume attachement (#401)
k0ka Feb 5, 2024
8f2ba03
fix doc links (#402)
k0ka Feb 5, 2024
38a6860
enchance error builder: output body only for json, limit body to 5 Kb…
k0ka Feb 10, 2024
2ed9c10
make swift metadata header case insensitive (#407)
k0ka Apr 2, 2024
e32dcf1
return unmaintaned openstack versions into ci (#408)
k0ka Apr 4, 2024
118804a
Merge branch 'master' of https://github.com/php-opencloud/openstack i…
Jun 19, 2024
f3c5b85
Apply php-cs-fixer changes
giogurto-grande Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.php-cs-fixer.dist.php export-ignore
/.readthedocs.yaml export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.sample.xml.dist export-ignore
/phpunit.xml.dist export-ignore
50 changes: 50 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Format"
on:
push:
branches:
- '*'

jobs:
composer-normalize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.2

- run: composer install --no-interaction --no-progress --no-suggest

- run: composer normalize

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Normalize composer.json

php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 8.1

- run: composer install --no-interaction --no-progress --no-suggest

- run: vendor/bin/php-cs-fixer fix

- run: git pull

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply php-cs-fixer changes
67 changes: 0 additions & 67 deletions .github/workflows/integration_identity.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,53 @@
name: Run Object Storage Integration Tests
name: Integration Tests

on:
workflow_dispatch:
pull_request:
paths:
- '**ObjectStore**'
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
if: |
!contains(github.event.pull_request.body, 'skip ci')
&& !contains(github.event.pull_request.body, 'skip integration')
strategy:
fail-fast: false
matrix:
openstack_version: [ "stable/zed" ]
openstack_version: [ "stable/2023.2" ]
php_version: [ 8.1 ]
ubuntu_version: [ 20.04 ]
include:
- name: "bobcat"
openstack_version: "stable/2023.2"
ubuntu_version: "22.04"
- name: "antelope"
openstack_version: "stable/2023.1"
ubuntu_version: "22.04"
- name: "zed"
openstack_version: "stable/zed"
ubuntu_version: "20.04"
- name: "yoga"
openstack_version: "unmaintained/yoga"
ubuntu_version: "20.04"
- name: "wallaby"
openstack_version: "unmaintained/wallaby"
ubuntu_version: "20.04"
block_storage_v2: true
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Deploy OpenStack ${{ matrix.name }} and run ObjectStore integration tests with php ${{matrix.php_version}}
name: Deploy OpenStack ${{ matrix.name }} and run integration tests with php ${{matrix.php_version}}
steps:
- uses: actions/checkout@v2

- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v3
with:
path: |
Expand All @@ -28,13 +56,16 @@ jobs:
key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php_version }}-

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: curl
tools: composer:v2
coverage: none

- run: composer install --prefer-dist --no-interaction --no-progress

- name: Restore devstack cache
uses: actions/cache@v3
with:
Expand All @@ -43,17 +74,21 @@ jobs:
!/opt/stack/data
~/devstack/
key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }}

- name: Deploy devstack
uses: EmilienM/devstack-action@v0.11
uses: EmilienM/devstack-action@v0.15
with:
branch: ${{ matrix.openstack_version }}
conf_overrides: |
CINDER_ISCSI_HELPER=lioadm
SWIFT_ENABLE_TEMPURLS=True
SWIFT_TEMPURL_KEY=secretkey
TARGET_BRANCH=${{ matrix.openstack_version }}
[[post-config|\$SWIFT_CONFIG_PROXY_SERVER]]
[filter:versioned_writes]
allow_object_versioning = true
enabled_services: 's-account,s-container,s-object,s-proxy'
enabled_services: 's-account,s-container,s-object,s-proxy,s-bak'

- name: Set env variables
run: |
{
Expand All @@ -65,10 +100,27 @@ jobs:
echo OS_PASSWORD=secret
echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id)
echo OS_PROJECT_NAME=admin
echo OS_RESIZE_FLAVOR=2
echo OS_RESIZE_FLAVOR=c1
echo OS_FLAVOR=1
echo OS_DOMAIN_ID=default
} >> "$GITHUB_ENV"
- name: Execute integration tests
run: php ./tests/integration/run.php -s=ObjectStore

- name: Check if Block Storage API v2 must be tested
if: matrix.block_storage_v2 == true
run: echo "OS_BLOCK_STORAGE_V2=1" >> "$GITHUB_ENV"

- name: Execute Integration tests via PhpUnit
run: vendor/bin/phpunit --configuration ./phpunit.sample.xml.dist

- name: Collect logs
if: ${{ failure() }}
run: |
set -x
journalctl >failure-logs

- name: Save logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failure-logs
path: failure-logs
34 changes: 28 additions & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,57 @@
name: Run Unit Tests
name: Unit Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
if: |
!contains(github.event.pull_request.body, 'skip ci')
&& !contains(github.event.pull_request.body, 'skip unit')
strategy:
fail-fast: false
matrix:
php: [ 7.2, 7.3, 7.4, 8.0, 8.1 ]
name: "php-${{ matrix.php }}"
php: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ]
composer:
- name: lowest
arg: "--prefer-lowest --prefer-stable"
- name: highest
arg: "" # No args added as highest is default
name: PHPUnit on PHP ${{ matrix.php }} with ${{ matrix.composer.name }} dependencies
steps:
- uses: actions/checkout@v2

- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v2
with:
path: |
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ matrix.composer.name }}-${{ hashFiles('**.composer.lock') }}

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl
tools: composer:v2
coverage: none
- run: composer install --prefer-dist --no-interaction --no-progress

- run: composer update --prefer-dist --no-interaction --no-progress ${{ matrix.composer.arg }}

- run: vendor/bin/parallel-lint --exclude vendor .

- name: execute unit tests
run: vendor/bin/phpunit --configuration phpunit.xml.dist

2 changes: 1 addition & 1 deletion .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exit(0);
}

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(
[
'@PSR2' => true,
Expand Down
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the "doc/" directory with Sphinx
sphinx:
configuration: doc/conf.py

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
Loading
Loading