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

Fetch WC L-1 versions #2046

Merged
merged 11 commits into from
Aug 9, 2023
Merged

Fetch WC L-1 versions #2046

merged 11 commits into from
Aug 9, 2023

Conversation

puntope
Copy link
Contributor

@puntope puntope commented Aug 7, 2023

Changes proposed in this Pull Request:

This PR fetch WooCommerce L-1 versions for our tests using https://github.com/woocommerce/grow/tree/trunk/packages/github-actions/actions/get-plugin-releases

Detailed test instructions:

Verify the WC version is properly fetched and the test passing
https://github.com/woocommerce/google-listings-and-ads/actions/runs/5787000158/job/15682944873?pr=2046

Additional details:

Changelog entry

Dev - Fetch WooCommerce L-1 versions for our tests

@github-actions github-actions bot added the changelog: dev Developer-facing only change. label Aug 7, 2023
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #2046 (2da9e70) into develop (ff83ba8) will increase coverage by 0.2%.
Report is 34 commits behind head on develop.
The diff coverage is 63.3%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #2046     +/-   ##
===========================================
+ Coverage       58.0%   58.2%   +0.2%     
+ Complexity      4121    4119      -2     
===========================================
  Files            455     454      -1     
  Lines          17715   17701     -14     
===========================================
+ Hits           10278   10297     +19     
+ Misses          7437    7404     -33     
Flag Coverage Δ
php-unit-tests 58.2% <63.3%> (+0.2%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
google-listings-and-ads.php 6.4% <0.0%> (ø)
...ernal/DependencyManagement/CoreServiceProvider.php 0.0% <0.0%> (ø)
src/TaskList/CompleteSetupTask.php 67.9% <67.9%> (ø)

@puntope puntope self-assigned this Aug 7, 2023
@puntope puntope requested a review from a team August 7, 2023 15:32
@puntope puntope marked this pull request as ready for review August 7, 2023 15:32
@tomalec
Copy link
Member

tomalec commented Aug 7, 2023

Why do we switch to WC L-1?

IMHO, the opposite setup could be desired WC L-2, but WP L-1 - as that is what WC supports.

@puntope
Copy link
Contributor Author

puntope commented Aug 8, 2023

Why do we switch to WC L-1?

IMHO, the opposite setup could be desired WC L-2, but WP L-1 - as that is what WC supports.

We didn't do any switch. Actually, we increased from L-0 to L-1, if you check the old version it was fetching the latest WC version.

In regards to the policies, I checked https://woogrowp2.wordpress.com/2023/07/31/l-1-policy/ but I didn't see any accepted answer yet with the final consensus, so I lean to keep it as it was until we decide.

Copy link
Contributor

@mikkamp mikkamp left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, this is working as expected. I left a few comments but none of them are blocking.

I do agree with Tomek that we might as well bump this to WC L-2 even if we aren't testing every single combination.

@@ -35,24 +35,42 @@ jobs:
with:
slug: wordpress

GetWCMatrix:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as comment https://github.com/woocommerce/automatewoo/pull/1527/files#r1286879075
Does it make sense to merge this as one job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done ✅

Comment on lines 65 to 67
- php: 7.4
wp-version: ${{ needs.GetMatrix.outputs.latest-wp-version }}
wp-version: ${{ needs.GetWPMatrix.outputs.latest-wp-version }}
wc-version: ${{ needs.GetWCMatrix.outputs.previous-wc-version }}
Copy link
Contributor

Choose a reason for hiding this comment

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

In the interest of not testing all combinations (to save billing minutes), on other extensions we make this test do the oldest supported version of everything. So in that case wouldn't this need to be PHP 7.4, WP L-2, WC L-1.
Since this is the only test that uses an older version of WC I wouldn't be against changing this to WC L-2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the matrix, now we follow the same as Automatewoo


- if: matrix.wp-version == needs.GetMatrix.outputs.latest-wp-version && matrix.php == 8.0
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.php == 8.0
Copy link
Contributor

Choose a reason for hiding this comment

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

We might as well add an additional check to make sure WC is at latest version to ensure the coverage report is only generated on one run. Right now it will still run only once but if we tweak the matrix later on then it would be easy to miss:

Suggested change
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.php == 8.0
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.wc-version == needs.GetWCMatrix.outputs.latest-wc-version && matrix.php == 8.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done as well, as we are now changing the matrix I check PHP 8.0 and WC latest

Copy link
Contributor

Choose a reason for hiding this comment

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

The suggestion to check all three was in case we would test more combinations of WP as well. But not a big deal since as you mentioned it is cover how it is now.

@puntope
Copy link
Contributor Author

puntope commented Aug 8, 2023

Hi @tomalec and @mikkamp I did some changes and change to WC - WP L-2

This is ready for another round

@puntope puntope requested a review from mikkamp August 8, 2023 15:21
Copy link
Contributor

@mikkamp mikkamp left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, they are working well.

The only minor comment I have left is that none of the combinations test WP L-1. Maybe for variety we could pass that to the PHP 8.1 test.

@puntope puntope merged commit 3ec92b8 into develop Aug 9, 2023
10 checks passed
@puntope puntope deleted the dev/wc-versions branch August 9, 2023 14:12
@eason9487 eason9487 mentioned this pull request Aug 22, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: dev Developer-facing only change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants