Skip to content

Replace nightly version with trunk #2185

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

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

Conversation

karthick-murugan
Copy link
Contributor

@karthick-murugan karthick-murugan commented Apr 11, 2025

Fixes #1763

This PR replaces the existing Nightly WordPress version option in the Playground UI with Trunk, which downloads directly from the wordpress/wordpress trunk branch.

What’s Changed

  • Removed the nightly option from the version selector.
  • Updated the version dropdown to include a Trunk option that uses:

wp: "https://github.com/WordPress/WordPress/archive/refs/heads/trunk.zip"

Why Replace Nightly with Trunk?

  • The current "Nightly" builds are committed daily to the repo as .zip files, which causes significant repository bloat over time.
  • Using Trunk avoids this issue by downloading directly from GitHub, eliminating the need to store the zip file in the repo.
  • Trunk offers essentially the same latest development build as Nightly.
  • This change helps reduce maintenance overhead while continuing to support up-to-date WordPress testing.

Testing Instructions

  1. Run the Playground locally.
  2. In the “WordPress version” dropdown, select Trunk.
  3. Ensure the Playground loads WordPress from the trunk ZIP.
  4. Verify general site behavior to confirm successful WP load.

Video:

REC-20250411173336.mp4

@bgrgicak
Copy link
Collaborator

bgrgicak commented Apr 14, 2025

Thanks for contributing to Playground @karthick-murugan 🙂
Could you please share what's your goal with replacing the nightly version with trunk?

Copy link

@BoomchainLabs BoomchainLabs left a comment

Choose a reason for hiding this comment

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

Good?

@karthick-murugan
Copy link
Contributor Author

Thanks for contributing to Playground @karthick-murugan 🙂 Could you please share what's your goal with replacing the nightly version with trunk?

Thanks, @bgrgicak! My goal with replacing the nightly version with trunk is to streamline the Playground experience by:

  • Avoiding the overhead and storage issues caused by the daily commits of the nightly.zip into the repo.
  • Using a more dynamic and reliable source by linking directly to the WordPress trunk.zip from GitHub.

@bgrgicak
Copy link
Collaborator

Thanks for the context @karthick-murugan this helps a lot.
Could you please add it to the PR description when you get a chance?

What's the difference between pulling from trunk and nightly?
Adding support for trunk sounds ok, but I'm unsure if there is value in keeping nightly around.
Another concern that I have is, we need to ensure Playground doesn't break for users that are trying to use it with the nightly version.

Have you considered only adding trunk support instead of replacing nightly?

Unrelated to the nightly discussion, could you also please update any relevant docs and other places in the repo to document trunk?

@adamziel I would love your feedback on this PR and some guidance for the direction we should take.

@karthick-murugan
Copy link
Contributor Author

Could you please add it to the PR description when you get a chance?

Yes @bgrgicak updated the description as such.

What's the difference between pulling from trunk and nightly?

Nightly builds were committed daily via a GitHub Action, leading to significant repository bloat over time.

Trunk is downloaded dynamically from GitHub (https://github.com/WordPress/WordPress/archive/refs/heads/trunk.zip), so there are no additional commits, keeping the Playground repo lightweight.

Have you considered only adding trunk support instead of replacing nightly?

Nightly builds were committed daily via a GitHub Action, leading to significant repository bloat over time.

Trunk is downloaded dynamically from GitHub (https://github.com/WordPress/WordPress/archive/refs/heads/trunk.zip), so there are no additional commits, keeping the Playground repo lightweight.

Unrelated to the nightly discussion, could you also please update any relevant docs and other places in the repo to document trunk?

Yes will update the relevant docs and other places. Let me know if you'd like those doc changes as part of this PR or in a separate one.

@bgrgicak
Copy link
Collaborator

Nightly builds were committed daily via a GitHub Action, leading to significant repository bloat over time.

Sorry my question wasn't clear. How frequently does WordPress create Nightly builds? Is Nightly equivalent to the latest trunk version?

If not is there a nightly branch that we could use to fetch WordPress without refreshing it?

Also, we need to keep in mind that Playground bundles WordPress to optimize it for the browser, if we stop creating a nightly bundle, Playground would load slower for users with that version.

@karthick-murugan
Copy link
Contributor Author

Thanks for the follow-up, @bgrgicak!

How frequently does WordPress create Nightly builds? Is Nightly equivalent to the latest trunk version?

Yes, WordPress Nightly builds are created daily and are effectively snapshots of the latest trunk branch. So functionally, Nightly is equivalent to the current state of trunk, just packaged and committed each day as a .zip.

Is there a nightly branch we could use to fetch WordPress without refreshing it?

No, WordPress doesn't maintain a separate nightly branch. The Nightly zip is generated from trunk, so we’re essentially duplicating what’s already available directly via GitHub.

Will removing the Nightly bundle slow down Playground for users?

Good Point. Need some feedbacks regarding this and some insights to move forward in the correct way.

@bgrgicak
Copy link
Collaborator

Need some feedbacks regarding this and some insights to move forward in the correct way.

Me too. 😅 I'm curious what @adamziel thinks.

I will try to summarize my list of open questions:

  • Can people create a Playground using trunk and the query API? (It's possible to set ?wp=URL, example)
  • Do we need a shorthand from trunk or is it enough if we document how to get the ZIP from GitHub?
  • Are daily nightly builds an issue for the Playground repository?
  • Should we remove nightly builds or find an alternative approach to loading nightly builds? (e.g. from GitHub, storing nightly builds outside of Git)
  • If we remove nightly builds, will the negative performance impact prevent users from using nightly?

Thanks for your work so far @karthick-murugan I appreciate the discussion.

@adamziel
Copy link
Collaborator

adamziel commented Apr 17, 2025

I’m all for removing the daily CI rebuilds. They inflate the repository size so much.

I’m mostly concerned about the download size of the major releases. A larger download size for nightly/trunk is fine, you’d typically do it to test compatibility or preview new features which means you’re a professional and have a good internet connection

@karthick-murugan
Copy link
Contributor Author

I’m all for removing the daily CI rebuilds. They inflate the repository size so much.
I’m mostly concerned about the download size of the major releases. A larger download size for nightly/trunk is fine, you’d typically do it to test compatibility or preview new features which means you’re a professional and have a good internet connection

Hi @adamziel 👋

Thanks a lot for your feedback earlier — really appreciate the clarification on the repo bloat and performance trade-offs.

  • Am I good with all the current changes in this PR?
  • Do I need to take any additional steps

Thanks again for your guidance!

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

Successfully merging this pull request may close these issues.

Replace nightly option with trunk.
4 participants