Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 25, 2024

#1987 created a dependency between the @wp-playground/blueprints package and the @wp-playground/wordpress-builds package breaking @wp-playground/cli – see #2026

This PR updates the setSiteLanguage step to pull the latest/best WordPress version details from api.wordpress.org/core/version-check/1.7?channel=beta instead of implicitly assuming the latest version is the same as that of the latest minified web build. It reuses the Playground CLI resolveWordPressRelease function, bringing us closer to having zero CLI-specific logic.

Follow-up work

Invent an ESLint rule to prevent further dependencies on @wp-playground/wordpress-builds

Testing instructions

  • CI tests
  • Run Playground CLI via bun packages/playground/cli/src/cli.ts server and confirm WordPress is still being downloaded without errors.

cc @swissspidy @bgrgicak

… of assuming it's the same as the last minified build

      WordPress builds package, breaking `@wp-playground/cli` in #2026

This PR updates the setSiteLanguage step to pull the latest/bets WordPress version details from api.wordpress.org/core/version-check/1.7?channel=beta
instead of implicitly assuming the latest version is the same as that of
the latest minified web build. It reuses the Playground CLI
resolveWordPressRelease function, bringing us closer to having zero
CLI-specific logic.

 ## Testing instructions

* CI tests
* Run Playground CLI via `bun packages/playground/cli/src/cli.ts server`
  and confirm WordPress is still being downloaded without errors.
@adamziel
Copy link
Collaborator Author

adamziel commented Dec 1, 2024

The remaining unit test failure is intermittent. Let's merge!

@adamziel adamziel merged commit 0f01520 into trunk Dec 1, 2024
9 of 10 checks passed
@adamziel adamziel deleted the translations-api-resolve-wordpress-version-from-api branch December 1, 2024 21:13
@adamziel
Copy link
Collaborator Author

adamziel commented Dec 1, 2024

We'll still need to release the npm packages to resolve the issue in @wp-playground/cli. @zaerl – would you like to try? This might be a good opportunity to become familiar with this aspect of Playground. You'd need to run the Release NPM packages workflow (version bump: patch, dist tag: latest), wait until it succeeds, confirm the released packages can be installed, and confirm the original issue this PR was meant to solve is indeed solved.

As for the post-release smoke tests, @psrpinto – would you be interested in building an automated workflow? I remember the work you've done on the mock npm registry and it would be really helpful here. The release workflow could first publish the built artifacts to such a local/mock registry, and make sure those packages can still be installed, libraries – imported, and binaries – executed.

@zaerl
Copy link
Collaborator

zaerl commented Dec 2, 2024

would you like to try?

Sure! I've added myself to the list. Once merged, I will proceed.

@psrpinto
Copy link
Member

psrpinto commented Dec 2, 2024

@adamziel I was planning on documenting how to/making it easier to publish packages to a local npm registry this week. I will start by opening an issue. Once that's done, I can look into leveraging that to run some tests.

adamziel pushed a commit that referenced this pull request Dec 2, 2024
## Motivation for the change, related issues
I need to run [this
workflow](#2027 (comment)),
as well of the future ones.

## Implementation details
Add myself to the `if` instructions of the GitHub workflows.

## Testing Instructions (or ideally a Blueprint)
Nothing testable. Once merged, I will be able to run
https://github.com/WordPress/wordpress-playground/actions/workflows/publish-npm-packages.yml
and others.
@brandonpayton
Copy link
Member

Invent an ESLint rule to prevent further dependencies on @wp-playground/wordpress-builds

Draft for that here:
#2048

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

Labels

[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants