-
Notifications
You must be signed in to change notification settings - Fork 12
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
CLI: apollo
command
#682
Merged
Merged
CLI: apollo
command
#682
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Its fine from the clients point of view, but the server side solution is a bit bonkers
josephjclark
commented
May 28, 2024
@@ -0,0 +1,189 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've deliberately checked this in so that we have some kind of test data for template gen. I'm not wild about it, it's a bit of a knee-jerk decision really
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short Description
This PR adds a CLI command to call out to the new Apollo Server
This is how I expect most consumers to use the AI services being developed over in
gen
.Some services, like adaptor generation, are likely to get a dedicated command, with a simpler interface and more help.
Apollo logs are streamed into the CLI via websocket connection.
The CLI recognises the
{ files }
key in results and will either nicely log the files to stdout out write the files to disk, according to to input parameters.Since this is bleeding edge functionality I only intend to add very light test coverage
Related issue
Closes #680
Basic Usage
The basic usage format is:
By default the CLI will call out to the staging server (which obviously doesn't exist yet). But you can pass
--local
to use a local server on the default port, or setOPENFN_APOLLO_DEFAULT_ENV=local
to default to using a local server.Output will be logged to stdout by default, or you can pas
-o
and set the output path, just like other services.Sample output
Future Work
Maybe in this PR, maybe not?
openfn apollo list
should list available servicesopenfn apollo help <service-name>
should print help for a specific service (probably the readme)Stream logs back to the CLI via websocket