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

remove: unnessary theme installation at docker setup #62492

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

up1512001
Copy link
Contributor

What?

This PR removes TT4, TT3 and TT1 theme installation when running npm run wp-env start as we are already getting all default themes from WordPress.

Why?

#62491

How?

remove unnecessary theme installations from .wp-env.json file.

Screenshot after modifying .wp-env.json

Screenshot 2024-06-11 at 23 36 24
Copy link

github-actions bot commented Jun 11, 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: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: vcanales <vcanales@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>

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

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 11, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @up1512001! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

"wp-content/themes/gutenberg-test-themes": "./test/gutenberg-test-themes",
"wp-content/themes/gutenberg-test-themes/twentytwentyone": "https://downloads.wordpress.org/theme/twentytwentyone.2.1.zip",
"wp-content/themes/gutenberg-test-themes/twentytwentythree": "https://downloads.wordpress.org/theme/twentytwentythree.1.3.zip",
"wp-content/themes/gutenberg-test-themes/twentytwentyfour": "https://downloads.wordpress.org/theme/twentytwentyfour.1.0.zip"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these themes are actually used in performance tests no?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if we remove these, the performance tests in CI might still run but locally, you'll have issues running these. cc @oandregal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@youknowriad but when I see that under the test folder all three theme folders are empty even before this modification also 🤔

Copy link
Member

Choose a reason for hiding this comment

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

They're being downloaded in the test environment, and they're used here:

'wp-content/themes/gutenberg-test-themes':
path.join(
testRunnerDir,
'test/gutenberg-test-themes'
),
'wp-content/themes/gutenberg-test-themes/twentytwentyone':
'https://downloads.wordpress.org/theme/twentytwentyone.1.7.zip',
'wp-content/themes/gutenberg-test-themes/twentytwentythree':
'https://downloads.wordpress.org/theme/twentytwentythree.1.0.zip',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@youknowriad I run a performance test locally and it's working fine.
npm run test:performance

Copy link
Contributor

Choose a reason for hiding this comment

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

This was added in #50905, but the purpose seems to be to keep theme versions consistent across performance tests.

@vcanales
Copy link
Member

Regarding the original issue, #62491, are you going to the site on port 8888 (development) or 8889 (test)? I usually do my local manual testing on the development site, since 8889 is used by automation. I can reproduce your issue, but I also expect the test site to have its own quirks.

➜  gutenberg git:(trunk) npm run wp-env start -- --xdebug=profile,trace,debug

> gutenberg@18.5.0 wp-env
> wp-env start --xdebug=profile,trace,debug

WordPress development site started at http://localhost:8888 # I use this one for development
WordPress test site started at http://localhost:8889

Perhaps we're lacking a bit of cleanup on the test site, though.

@up1512001
Copy link
Contributor Author

I check on the 8889 port. @vcanales

@up1512001
Copy link
Contributor Author

up1512001 commented Jun 11, 2024

Still, one strange thing why the TT4, TT3 and TT1 folders are empty even after running the performance test?
cc: @vcanales @youknowriad
Screenshot 2024-06-11 at 23 57 31

@t-hamano t-hamano linked an issue Jun 12, 2024 that may be closed by this pull request
@talldan
Copy link
Contributor

talldan commented Jun 12, 2024

I check on the 8889 port.

It's recommended to use 8888 for anything you're doing manually, 8889 is for running tests. Those automated tests expect a clean environment, so you should avoid changing stuff in the WordPress instance there. When you run the tests, they'll also do some clean up like deleting posts, sometimes patterns, or even resetting styles, which is something you might not want to happen.

@up1512001
Copy link
Contributor Author

I guess we should update the performance test to run on the latest version to avoid duplicate theme installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
5 participants