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

Statistics provider interface #510

Merged
merged 4 commits into from
Feb 1, 2024
Merged

Conversation

kalmerkaurson
Copy link
Contributor

@kalmerkaurson kalmerkaurson commented Jan 29, 2024

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues #509

Copy link

what-the-diff bot commented Jan 29, 2024

PR Summary

  • Added a New Component
    A new component named 'InfoAction' is introduced to boost efficiency in the Command Line Interface (CLI) section of our application.

  • Streamlining Data Retrieval
    A tool named 'StatisticsProvider' is now present in Database (DB), File, and Redis sections to facilitate more streamlined access to data.

  • Removing Redundancies
    We've reduced redundancy by removing the 'InfoAction' function from Database, File and Redis sections, as its functions are now integrated into the new 'StatisticsProvider' feature.

  • Interface Enhancements
    We're implementing five new interfaces that allow for better communication and operation within the system, enhancing overall efficiency.

  • Updated Configurations
    A new 'deleteReleased' option is added to the 'main.php' configuration file, providing more flexibility for managing release operations in database queues.

  • Testing New Features
    Several test files are added in the development and testing of the new 'InfoAction' class as well as the 'StatisticsProviderInterface'.

  • Better Statistics Management
    We've provided a series of 'BaseStatisticsProvider' implementations, aiding in a better count and management of various operation statuses.

  • Optimizing Development Environment
    We have updated the settings of our local development software (Docker), improving their ability to manage and allocate system resources during development and testing.

  • Enhancing Test Cases
    We've expanded the test cases for DB, file, Redis drivers. These changes help verify our solution's effectiveness and reliability in varied environments.

@kalmerkaurson
Copy link
Contributor Author

The tests passed in php 5.6.40 for me so I am not sure why it failed now.

@s1lver
Copy link
Member

s1lver commented Jan 30, 2024

How about making PR into the next version https://github.com/yiisoft/yii2-queue/tree/3.0? This version suppoting minimum PHP 8.1

@kalmerkaurson
Copy link
Contributor Author

How about making PR into the next version https://github.com/yiisoft/yii2-queue/tree/3.0? This version suppoting minimum PHP 8.1

We could but it should also work in 5.6 version, as well as the later versions, because I did not change much how InfoAction receives the data. There weren't any tests made for getDoneCount so that could be the reason why the test fails now. I just need to figure out why just one test fails because the database tests all use the same testcase, and the tests pass for Mysql and Sqlite.

@kalmerkaurson
Copy link
Contributor Author

I can not reproduce the php 5.6 'tests\drivers\db\PgsqlQueueTest::testDoneCount' error and I could not find anything on google about it.

Copy link
Member

@samdark samdark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Overall. Looks like a great idea.

@samdark samdark added the type:feature New feature label Jan 30, 2024
@samdark samdark requested a review from s1lver January 30, 2024 15:39
@rob006
Copy link

rob006 commented Jan 30, 2024

We could but it should also work in 5.6 version

This is not an issue with PHP support - removing existing classes is a clear BC break, such change cannot go directly to the 2.3.x line. I suggest restoring the deleted "InfoAction" classes and marking them as deprecated (and remove them in 3.0.0).

@kalmerkaurson
Copy link
Contributor Author

We could but it should also work in 5.6 version

This is not an issue with PHP support - removing existing classes is a clear BC break, such change cannot go directly to the 2.3.x line. I suggest restoring the deleted "InfoAction" classes and marking them as deprecated (and remove them in 3.0.0).

I forgot deleting files isn't very user friendly, they now have the deprecated tag. The tests have to be fixed by someone else though.

@samdark samdark merged commit 6df01d5 into yiisoft:master Feb 1, 2024
6 of 7 checks passed
@samdark
Copy link
Member

samdark commented Feb 1, 2024

Thanks!

@samdark samdark added this to the 2.3.7 milestone Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants