Skip to content

Services: Documentation and config - #460

Merged
aomarks merged 5 commits into
servicefrom
service.1
Oct 14, 2022
Merged

Services: Documentation and config#460
aomarks merged 5 commits into
servicefrom
service.1

Conversation

@aomarks

@aomarks aomarks commented Oct 14, 2022

Copy link
Copy Markdown
Member

First of a series of PRs to implement services.

This just documents the feature and adds the config field.

Note this PR is merging into the service branch, where I'll be staging this feature until everything is ready (in case we need to release something in the meantime).

@aomarks
aomarks requested a review from justinfagnani October 14, 2022 17:46
@aomarks
aomarks changed the base branch from services to service October 14, 2022 17:47

@rictic rictic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice design

I can imagine potential improvements, like a way for wireit to communicate with a running service process (to indicate things like when the service is ready, etc), but those would be optional if added, and they might not be worth the complexity

Comment thread schema.json Outdated
"type": "array"
},
"service": {
"markdownDescription": "If true, treat this script as a long-running process.\nServices are automatically brought up and down as they depended upon by other scripts. If invoked directly, services continue running until Wireit is killed with Ctrl-C.\nFor more info, see: https://github.com/google/wireit#services",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as they depended upon -> as they are depended upon

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@aomarks

aomarks commented Oct 14, 2022

Copy link
Copy Markdown
Member Author

I can imagine potential improvements, like a way for wireit to communicate with a running service process (to indicate things like when the service is ready, etc), but those would be optional if added, and they might not be worth the complexity

Yeah -- I think we probably should include a waitForLog or similar feature to check for a string or pattern on stdout/stderr, since that's pretty simple and will cover a lot of use-cases where you need to wait for a server to be fully started after it's spawned. E.g. "waitForLog": "server listening"

@aomarks
aomarks merged commit 1147c5c into service Oct 14, 2022
@aomarks
aomarks deleted the service.1 branch October 14, 2022 20:34
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

Successfully merging this pull request may close these issues.

3 participants