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

Check for files on startup when the zilla.yaml specifies paths to files or directories #292

Closed
vordimous opened this issue Jun 29, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@vordimous
Copy link
Contributor

vordimous commented Jun 29, 2023

Is your feature request related to a problem? Please describe.
If a .proto file is not accessible by Zilla there isn't a clear indication. The current error message is cryptic:

Jun 29, 2023 1:28:14 PM org.eclipse.yasson.internal.Unmarshaller deserializeItem
SEVERE: Problem adapting object of type class io.aklivity.zilla.runtime.engine.config.NamespaceConfig to interface jakarta.json.JsonObject in class class io.aklivity.zilla.runtime.engine.internal.config.NamespaceAdapter
Configuration parsing error: Problem adapting object of type class io.aklivity.zilla.runtime.engine.config.NamespaceConfig to interface jakarta.json.JsonObject in class class io.aklivity.zilla.runtime.engine.internal.config.NamespaceAdapter

Describe the solution you'd like
For elements that map to the file system, it would be nice for zilla to warn or error when it doesn't find the file or folder it is looking for.

Describe alternatives you've considered
The filesystem server and proxy also let you specify files that doesn't exist but don't give you any indication other than an eventual 404, which can be a number of different problems.

Additional context
grpc (protobuf), openapi+asyncapi+openapi-asyncapi, tls (filesystem vault)

@jfallows jfallows added the enhancement New feature or request label Jun 29, 2023
@jfallows
Copy link
Contributor

When addressing this we need to take into consideration that the .proto resource(s) could be delivered remotely via http not necessarily local via filesystem.

@vordimous
Copy link
Contributor Author

vordimous commented Jun 30, 2023

Adding some of the filesystem situations I tested.

  http_filesystem_proxy:
    type: http-filesystem
    kind: proxy
    routes:
      - when:
          - path: /
        with:
          path: index.html # if this is excluded, zilla doesn't throw an error
        exit: filesystem_server
  filesystem_server:
    type: filesystem
    kind: server
    options:
      location: /var/www/ # if this is a specific file instead of a dir, zilla doesn't throw an error

@jfallows
Copy link
Contributor

Note: implementing #908 and removing direct files support from grpc binding aligns with the other bindings and makes this bug obsolete, assuming the new filesystem catalog gracefully communicates when local files are not found.

@jfallows
Copy link
Contributor

#908 implemented.

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

No branches or pull requests

3 participants