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

Implement parallel processing functionality based on ext-parallel #121

Merged
merged 57 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2246ca8
Implement parallel processing functionality for CSV file validation
SmetDenis Apr 1, 2024
c7c0fb2
Correct PHP syntax in Github workflow
SmetDenis Apr 1, 2024
b2ff908
Correct PHP syntax in Github workflow
SmetDenis Apr 1, 2024
22f7e98
Correct PHP syntax in Github workflow
SmetDenis Apr 1, 2024
105dd63
Correct PHP syntax in Github workflow
SmetDenis Apr 1, 2024
a47fb82
Correct PHP syntax in Github workflow
SmetDenis Apr 1, 2024
92d9d37
More specifically, the commit removes unnecessary print and system in…
SmetDenis Apr 1, 2024
f45c376
Add support for parallel PHP extension
SmetDenis Apr 1, 2024
629b8c0
Fix bootstrap call in PHP files and adjust README indentation
SmetDenis Apr 1, 2024
70c1fd1
Fix bootstrap call in PHP files and adjust README indentation
SmetDenis Apr 1, 2024
8b960ee
Fix bootstrap call in PHP files and adjust README indentation
SmetDenis Apr 1, 2024
85bf1e6
Fix bootstrap call in PHP files and adjust README indentation
SmetDenis Apr 1, 2024
c907e32
Fix bootstrap call in PHP files and adjust README indentation
SmetDenis Apr 1, 2024
a56c950
Update amphp/parallel version and formatting in composer files
SmetDenis Apr 1, 2024
7f16946
Update amphp/parallel version and formatting in composer files
SmetDenis Apr 1, 2024
ec9c3b6
Merge branch 'master' into parallel-exec
SmetDenis Apr 7, 2024
c9f9f97
Add "amphp/parallel" dependency to composer.json
SmetDenis Apr 7, 2024
7a07d25
Implement experimental parallel schema validation
SmetDenis Apr 7, 2024
ba9e6f9
Merge branch 'master' into parallel-exec
SmetDenis Apr 8, 2024
38ad48a
Replace parallel task execution with Scheduler in ValidateSchema
SmetDenis Apr 8, 2024
a6e2337
Add PHP setup step in benchmark workflow
SmetDenis Apr 8, 2024
3de0a92
Update parallelization feature and task handling
SmetDenis Apr 9, 2024
be9762a
Refine parallelization functionality and error handling in tasks
SmetDenis Apr 9, 2024
399c748
Refactor WorkerPool and improve parallelization tests
SmetDenis Apr 9, 2024
5cc06c0
Clean up code in Schema.php and update schema path in ValidateSchemaTest
SmetDenis Apr 9, 2024
95031cb
Refactor codes and tests for CSV and Schema validation
SmetDenis Apr 9, 2024
d211bce
Merge branch 'master' into parallel-exec
SmetDenis Apr 10, 2024
98aba43
Remove verbosity option from defaults
SmetDenis Apr 10, 2024
c3cc7b2
Replace direct property access with getter in WorkerPool
SmetDenis Apr 10, 2024
c197805
Replace \ErrorException with Exception and specify Alpine version in …
SmetDenis Apr 10, 2024
4c50374
Refactor code in csv-blueprint.php for streamlined approach
SmetDenis Apr 10, 2024
c661a9c
Merge branch 'master' into parallel-exec
SmetDenis Apr 10, 2024
0eb58a7
Merge branch 'fixes' into parallel-exec
SmetDenis Apr 10, 2024
f0754a0
Reorder PHP_SAPI checks in csv-blueprint.php
SmetDenis Apr 10, 2024
3411600
Merge branch 'master' into parallel-exec
SmetDenis Apr 10, 2024
599c239
Enhance security settings in php.ini and streamline codebase
SmetDenis Apr 10, 2024
ddb17f7
Convert classes to final in various files
SmetDenis Apr 10, 2024
aa611fd
Optimize CSV validation and improve Docker configuration
SmetDenis Apr 10, 2024
bf9c31c
Refactor CSV validation and update Docker settings
SmetDenis Apr 10, 2024
bfce0b1
Add single and multi-thread modes to Docker benchmarks
SmetDenis Apr 10, 2024
a19259c
Refactor debug mode handling with utility functions
SmetDenis Apr 10, 2024
d351cfd
Refactor debug method in Utils class
SmetDenis Apr 11, 2024
04f1292
Remove file opening error check from random-csv.php
SmetDenis Apr 11, 2024
c3f3d0a
Reduce pool maintenance delay and update debug mode check
SmetDenis Apr 11, 2024
d1e7891
Add parallel validation for CSV files in workflow
SmetDenis Apr 11, 2024
495c2bc
Add debugging var_dump to Utils.php
SmetDenis Apr 11, 2024
88567cd
Remove debug output and update filename pattern in demo_invalid.yml
SmetDenis Apr 11, 2024
284ecf5
Refactor scripts and optimize code in various files
SmetDenis Apr 11, 2024
55ecad3
Update error handling and CI configuration
SmetDenis Apr 11, 2024
0a4be96
Reorder GitHub workflow and enhance error messages
SmetDenis Apr 11, 2024
4ebcc7c
Update benchmark setup in GitHub workflow and Makefile
SmetDenis Apr 11, 2024
12d5f13
Update benchmark setup in GitHub workflow and Makefile
SmetDenis Apr 11, 2024
94060d1
Simplify WorkerPool bootstrap setup
SmetDenis Apr 11, 2024
c45df91
Adjust WorkerPool bootstrap setup for Docker
SmetDenis Apr 11, 2024
9f2883f
Add parallel processing for CSV file validation
SmetDenis Apr 11, 2024
d0f16ba
Improve filename pattern validation and adjust opcache settings
SmetDenis Apr 11, 2024
588cc4b
Revise README.md to clarify multithreading details
SmetDenis Apr 11, 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
Prev Previous commit
Next Next commit
Update error handling and CI configuration
The SonarCloud scan step in GitHub workflow is now allowed to continue on error. Updated error message in Utils.php for clarity and precision. Also, modified the Docker image source in action.yml to use the local Dockerfile. This change provides more flexibility and control over the docker environment for the actions.
  • Loading branch information
SmetDenis committed Apr 11, 2024
commit 55ecad3c0543671419beac2a02fb7a602c5db187
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ inputs:
default: 'options: --ansi'

runs:
using: 'docker'
image: 'docker://jbzoo/csv-blueprint'
using: docker
image: Dockerfile
args:
- validate:csv
- '--csv'
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@
// Convert all errors to exceptions. Looks like we have critical case, and we need to stop or handle it.
// We have to do it becase tool uses 3rd-party libraries, and we can't trust them.
// So, we need to catch all errors and handle them.
\set_error_handler(static function ($severity, $message, $file, $line): void {

Check failure on line 503 in src/Utils.php

View workflow job for this annotation

GitHub Actions / Tests

Argument 1 `($callback)` is `(function)` of type `Closure(mixed,mixed,mixed,mixed):void` but `\set_error_handler()` takes `callable(int,string):bool|callable(int,string,string):bool|callable(int,string,string,int):bool|callable(int,string,string,int,array):bool|null` Rule : PhanTypeMismatchArgumentInternal File Path: src/Utils.php:503 Severity : warning

Check failure on line 503 in src/Utils.php

View workflow job for this annotation

GitHub Actions / Tests - Lowest

Argument 1 `($callback)` is `(function)` of type `Closure(mixed,mixed,mixed,mixed):void` but `\set_error_handler()` takes `callable(int,string):bool|callable(int,string,string):bool|callable(int,string,string,int):bool|callable(int,string,string,int,array):bool|null` Rule : PhanTypeMismatchArgumentInternal File Path: src/Utils.php:503 Severity : warning

Check failure on line 503 in src/Utils.php

View workflow job for this annotation

GitHub Actions / Tests - Latest

Argument 1 `($callback)` is `(function)` of type `Closure(mixed,mixed,mixed,mixed):void` but `\set_error_handler()` takes `callable(int,string):bool|callable(int,string,string):bool|callable(int,string,string,int):bool|callable(int,string,string,int,array):bool|null` Rule : PhanTypeMismatchArgumentInternal File Path: src/Utils.php:503 Severity : warning
throw new Exception($message, 0, $severity, $file, $line);
throw new Exception("{$severity}: \"{$message}\" in file \"{$file}:{$line}\"");
});
}

Expand Down
Loading