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

Improve active_plugins filter #608

Merged
merged 10 commits into from
Sep 5, 2024
Merged

Conversation

swissspidy
Copy link
Member

@swissspidy swissspidy commented Sep 5, 2024

See #518 and #597.

Filters active plugins to only include required ones. This means:

  • The plugin being tested
  • All dependencies of the plugin being tested
  • Plugin Check itself
  • All active dependents of Plugin Check (they could be adding new checks)

To-do:

@swissspidy swissspidy added the [Type] Enhancement A suggestion for improvement of an existing feature label Sep 5, 2024
@swissspidy swissspidy added this to the 1.2.0 milestone Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: swissspidy <[email protected]>
Co-authored-by: ernilambar <[email protected]>
Co-authored-by: felixarntz <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@swissspidy swissspidy force-pushed the fix/597-filter-active-plugins branch from ada8e43 to 4ee7ea2 Compare September 5, 2024 08:51
@ernilambar

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

@swissspidy Thanks, looks great! Just a few minor comments.

@felixarntz
Copy link
Member

felixarntz commented Sep 5, 2024

@swissspidy Are you planning to merge #518 first and then see which uncommented Behat tests this here will fix?

@swissspidy
Copy link
Member Author

@swissspidy Are you planning to merge #518 first and then see which uncommented Behat tests this here will fix?

Yep!

@swissspidy
Copy link
Member Author

Right now I can't enable any of the commented out Behat tests because they're still not passing, because we still need to address (2) and (3) from #597 (comment)

@felixarntz
Copy link
Member

felixarntz commented Sep 5, 2024

Right now I can't enable any of the commented out Behat tests because they're still not passing, because we still need to address (2) and (3) from #597 (comment)

I think it would only be point (3) that would help with the remaining Behat tests, so maybe we can work on that one first.

Could you give it a try to implement a Behat test that runs two runtime checks, one from the addon and one built-in one? For instance amend/duplicate the very last Behat test in plugin-check.feature that way. I'm curious what happens then, since part of the problem that (3) would solve is only relevant if the only runtime check comes from an addon. But if we also have a runtime check from the built-in ones, that's a different implication because it'll already know we need to initialize runtime check relevant logic.

@felixarntz
Copy link
Member

Following up on my previous comment, based on what I wrote in #597 (comment), I would actually assume that if you do what I recommended before, you'll run into the exception that the slug is invalid - which will prevent the rest from proceeding even if then the plugin checker technically would know to initialize runtime environment preparations.

@felixarntz felixarntz added [Type] Bug An existing feature is broken and removed [Type] Enhancement A suggestion for improvement of an existing feature labels Sep 5, 2024
@swissspidy swissspidy merged commit 25c033e into trunk Sep 5, 2024
22 checks passed
@swissspidy swissspidy deleted the fix/597-filter-active-plugins branch September 5, 2024 18:59
@swissspidy
Copy link
Member Author

Right now I can't enable any of the commented out Behat tests because they're still not passing, because we still need to address (2) and (3) from #597 (comment)

I think it would only be point (3) that would help with the remaining Behat tests, so maybe we can work on that one first.

Could you give it a try to implement a Behat test that runs two runtime checks, one from the addon and one built-in one? For instance amend/duplicate the very last Behat test in plugin-check.feature that way. I'm curious what happens then, since part of the problem that (3) would solve is only relevant if the only runtime check comes from an addon. But if we also have a runtime check from the built-in ones, that's a different implication because it'll already know we need to initialize runtime check relevant logic.

Argh, sorry I missed this suggestion. I think we can do this in #612 though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants