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

PHP: artifact_not_found error #1260

Closed
Rcreators opened this issue Apr 16, 2024 · 8 comments · Fixed by #1275
Closed

PHP: artifact_not_found error #1260

Rcreators opened this issue Apr 16, 2024 · 8 comments · Fixed by #1275
Assignees
Labels
[Aspect] WordPress [Feature] PR Previewer [Type] Bug An existing feature does not function as intended
Milestone

Comments

@Rcreators
Copy link

WordPress/wordpress-develop#6238

The above particular PR is not working on the playground. Its just showing waiting time for loading the PR.

As per Slack discussion in the #accessibility channel, @adamziel mentioned that it has something to do with this particular line and to submit a issue here.

throw new ApiException('artifact_not_found');

Someone please look into it and let me know how to solve it or someway around to run that PR in playground.

@adamziel adamziel added this to the Zero Crashes milestone Apr 16, 2024
@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Aspect] WordPress [Feature] PR Previewer labels Apr 16, 2024
@bgrgicak
Copy link
Collaborator

@Rcreators I tried testing your PR in Playground but it's stuck on _Waiting for GitHub to finish building PR 6238. _. I assume this is because the PR failed some build steps.

@adamziel
Copy link
Collaborator

@bgrgicak that's exactly what this issue is about :-) if you trace the execution, the plugin proxy endpoint errros out with artifact_not_found

@bgrgicak bgrgicak self-assigned this Apr 18, 2024
@Rcreators
Copy link
Author

@bgrgicak If you check the PR, it actually Passed all the checks before but it still had issue. I just refreshed the code to get it build again if that solve but nothing happened. Also the falling parameter is due to time out or something unrelated to code itself.

@bgrgicak
Copy link
Collaborator

Thanks! I just saw the UI failing and thought it was unrelated. I'm taking a look at the issue now.

@bgrgicak
Copy link
Collaborator

This is caused by the name in the artifact response not matching the artifact name.
If I comment out this code, it works.

I'm trying to understand now why and how can we fix it.

@bgrgicak
Copy link
Collaborator

I checked the list of names the API returns and the requested name isn't there:

string(20) "wordpress-build-6394"
string(9) "pr-number"
string(20) "wordpress-build-3369"
string(9) "pr-number"
string(20) "wordpress-build-3369"
string(9) "pr-number"

adamziel pushed a commit that referenced this issue Apr 18, 2024
It ensures that the WordPress pull request test page can fetch the
correct PR data.

Fixes #1260 

## What problem is it solving?

When a branch name has special characters like _#_, GitHub API requests
may not work as intended.

## How is the problem addressed?

By encoding the branch name.

## Testing Instructions

- Checkout this branch
- Start a local PHP server
```
cd packages/playground/website/public
docker run -d -p 8787:80 -v "$PWD":/var/www/html php:8.0-apache
```
- Add the localhost path (`http://localhost:8787`) to the [start of this
url](https://github.com/WordPress/wordpress-playground/blob/9f134e046102a1d2858b0b0541abfa9182b64291/packages/playground/website/public/wordpress.html#L147)
- Replace this [line with a valid
token](https://github.com/WordPress/wordpress-playground/blob/ac62f0c170d89ea0127900eeb628062db74cd2c9/packages/playground/website/public/plugin-proxy.php#L264)
(from the server)
- [Open this
URL](http://localhost:5400/website-server/wordpress.html?pr=6238)
- Ensure Playground is loaded
@Rcreators
Copy link
Author

@bgrgicak I am not sure if this is solved. I just tried to test the PR in playground and it still take me to waiting message. Tried few times and waited for 5 mins. Not working. Will it take time to reflect on actual playground?

@adamziel
Copy link
Collaborator

@Rcreators the website isn't automatically deployed after merging a Pull Request, I just started the deploy job. It should be good in 15 mins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] WordPress [Feature] PR Previewer [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants