Skip to content

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

Merged
danielbachhuber merged 7 commits intowp-cli:masterfrom
akirk:patch-1
Nov 10, 2022
Merged

Don't report an error when 5 out of 5 plugins were updated#338
danielbachhuber merged 7 commits intowp-cli:masterfrom
akirk:patch-1

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

@danielbachhuber danielbachhuber self-requested a review November 9, 2022 23:12
@danielbachhuber danielbachhuber added the command:plugin-update Related to 'plugin update' command label Nov 9, 2022
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 danielbachhuber added this to the 2.1.9 milestone Nov 10, 2022
@danielbachhuber danielbachhuber added the command:plugin Related to 'plugin' command label Nov 10, 2022
@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

Labels

command:plugin Related to 'plugin' command command:plugin-update Related to 'plugin update' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants