Open charneykaye opened 9 months ago
It turns out, the configPath
value gets joined with path.join() to the value of the GitHub environment variable GITHUB_WORKSPACE
when present, e.g. /home/runner/work/myapp/myapp
Recommend that the error message from this library show the actual path checked for a file on failure.
I've logged directly from my GitHub Actions workflow to confirm that this file does exist, exactly where the Paperspace deploy-action says it doesn't:
Run echo $GITHUB_WORKSPACE
echo $GITHUB_WORKSPACE
shell: /usr/bin/bash -e {0}
/home/runner/work/myapp/myapp
and
Run ls -la $GITHUB_WORKSPACE/gui/.paperspace/
ls -la $GITHUB_WORKSPACE/gui/.paperspace/
shell: /usr/bin/bash -e {0}
total 1[2](https://github.com/myusername/myapp/actions/runs/123/job/456#step:8:2)
drwxr-xr-x 2 runner docker [4](https://github.com/myusername/myapp/actions/runs/123/job/456#step:8:5)09[6](https://github.com/myusername/myapp/actions/runs/123/job/456#step:8:7) Jan 26 19:00 .
drwxr-xr-x 6 runner docker 4096 Jan 26 19:00 ..
-rw-r--r-- 1 runner docker 129 Jan 26 19:00 app.yaml
I've created an entirely new repository with the Paperspace config in a default path at the root of the repository. Still getting the error:
Run paperspace/deploy-action@v1.0
Validating input paramters...
Starting deployment update...
Found configPath input: .paperspace/app.yaml. Ensuring file exists...
Error: Not Found
Now I tried specifying no configPath
and letting the Paperspace deploy-action search for it. Still fails:
Run paperspace/deploy-action@v1.0
Validating input paramters...
Starting deployment update...
Warning: No configPath input provided. Searching for default...
Trying for path: /home/runner/work/myapp/myapp/paperspace.yaml...
Trying for path: /home/runner/work/myapp/myapp/paperspace.yml...
Trying for path: /home/runner/work/myapp/myapp/paperspace.json...
Trying for path: /home/runner/work/myapp/myapp/paperspace.jsonc...
Trying for path: /home/runner/work/myapp/myapp/paperspace.toml...
Trying for path: /home/runner/work/myapp/myapp/.paperspace/app.yaml...
Path found: /home/runner/work/myapp/myapp/.paperspace/app.yaml
Error: Not Found
What's interesting is that it did identify the correct path on that last attempt but fails to actually read the file, giving "Error: Not Found" despite having found the path.
I tried using a paperspace.json config file instead, confirming again that the path is found but unable to be read. I've even added a preceding step to set permissions 644
on the paperspace.json file.
Run paperspace/deploy-action@v1.0
Validating input paramters...
Starting deployment update...
Warning: No configPath input provided. Searching for default...
Trying for path: /home/runner/work/myapp/myapp/paperspace.yaml...
Trying for path: /home/runner/work/myapp/myapp/paperspace.yml...
Trying for path: /home/runner/work/myapp/myapp/paperspace.json...
Path found: /home/runner/work/myapp/myapp/paperspace.json
Error: Not Found
I've forked the official example into a public repository, and still the Paperspace deploy-action fails out of the box: https://github.com/thomsonlab/ps-deploy-action-example/actions/runs/7708159737/job/21006684291
Getting an error on paperspace deployment too, but it's one step past yours: here
Input validation failed. Issues:
[
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"received": "latest",
"code": "invalid_literal",
"expected": "v0alpha0",
"path": [
"config",
"apiVersion"
],
"message": "Invalid literal value, expected \"v0alpha0\""
}
],
"name": "ZodError"
},
{
"issues": [
{
"received": "latest",
"code": "invalid_literal",
"expected": "v0alpha1",
"path": [
"config",
"apiVersion"
],
"message": "Invalid literal value, expected \"v0alpha1\""
}...
I've left out apiVersion
as it defaults to latest. Wonder if that example repo and the docs are outdated.
Going to keep looking through, but wanted to join the convo!
@patricktargun thanks for looking into this. Could you share a repo you're using to produce that outcome, or at least the workflow yaml?
I've forked the official example into a public repository, and still the Paperspace deploy-action fails out of the box: https://github.com/thomsonlab/ps-deploy-action-example/actions/runs/7708159737/job/21006684291