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

Config file path found, then fails with "Error: Not Found" #15

Open
charneykaye opened this issue Jan 26, 2024 · 7 comments
Open

Config file path found, then fails with "Error: Not Found" #15

charneykaye opened this issue Jan 26, 2024 · 7 comments

Comments

@charneykaye
Copy link

charneykaye commented Jan 26, 2024

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

Run paperspace/[email protected]
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
@charneykaye
Copy link
Author

charneykaye commented Jan 26, 2024

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.

@charneykaye
Copy link
Author

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

@charneykaye
Copy link
Author

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/[email protected]
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/[email protected]
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.

@charneykaye
Copy link
Author

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/[email protected]
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

@charneykaye
Copy link
Author

@charneykaye charneykaye changed the title Can't find config in subfolder Config file path found, then fails with "Error: Not Found" Jan 30, 2024
@patricktargun
Copy link

patricktargun commented Jan 30, 2024

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!

@charneykaye
Copy link
Author

@patricktargun thanks for looking into this. Could you share a repo you're using to produce that outcome, or at least the workflow yaml?

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

No branches or pull requests

2 participants