Navigation Menu

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

Don't report an error when 5 out of 5 plugins were updated #338

Merged
merged 7 commits into from Nov 10, 2022

Conversation

akirk
Copy link
Contributor

@akirk akirk commented Nov 9, 2022

Currently, if you've got (unreleased) plugins with an unexpected version they are skipped but this skipping is recorded in a wrong way resulting in a summary output that says Error: Only updated 5 of 5 plugins.

Before

Screenshot 2022-11-09 at 11 41 46

After

Screenshot 2022-11-09 at 11 42 27

@akirk akirk requested a review from a team as a code owner November 9, 2022 18:46
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

Thanks, @akirk !

It'd be great to have a feature test for this change. Would you be open to putting one together?

Here's an introduction to Behat tests: https://make.wordpress.org/cli/handbook/contributions/pull-requests/#functional-tests

@akirk
Copy link
Contributor Author

akirk commented Nov 9, 2022

I've added a behat test and fixed the phpcs, could you kick off the workflow again? Thanks!

@danielbachhuber
Copy link
Member

@akirk Yep! Looks like the sed doesn't quite work, and there are a couple other tests failing as the result of the change:

image

Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

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

Great work on this! 🙌

@danielbachhuber
Copy link
Member

@akirk Any ideas what this last failure might be?

@akirk
Copy link
Contributor Author

akirk commented Nov 10, 2022

Struggling to understand the failure, it runs fine for me locally.

composer behat -- features/plugin-update.feature
> run-behat-tests 'features/plugin-update.feature'
...................................................................... 70
..............................

9 scenarios (9 passed)
100 steps (100 passed)
0m50.86s (11.16Mb)

composer behat -- features/plugin.feature
> run-behat-tests 'features/plugin.feature'
...................................................................... 70
...................................................................... 140
...................................................................... 210
....................................

22 scenarios (22 passed)
246 steps (246 passed)
1m42.79s (11.20Mb)

@akirk
Copy link
Contributor Author

akirk commented Nov 10, 2022

Oh it fails on PHP 5.6.

@danielbachhuber
Copy link
Member

Oh it fails on PHP 5.6.

@akirk It also looks like it's been failing on master for a while: https://github.com/wp-cli/extension-command/actions/runs/3338955722/jobs/5527290587

Thanks again for your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants