Skip to content

Services: Refactoring to surface more Execution API to other scripts - #471

Merged
aomarks merged 8 commits into
servicefrom
service.4
Oct 20, 2022
Merged

Services: Refactoring to surface more Execution API to other scripts#471
aomarks merged 8 commits into
servicefrom
service.4

Conversation

@aomarks

@aomarks aomarks commented Oct 20, 2022

Copy link
Copy Markdown
Member

A refactoring which allows scripts to directly access full Execution instances, instead of just fingerprints as before.

This is useful for the lazy startup/shutdown feature of services, because other scripts need to not only get the service's fingerprint, but also to have a start method they can call once they eventually decide whether they need to run or not.

Also:

  • Upgraded the self-signed TLS certificate we use in tests, because after upgrading my Linux distro and/or my Node version, these tests were failing locally due to the key being too weak.

  • Renamed script to config in a few places to remove ambiguity.

  • Use _foo style for protected methods.

  • Enabled noImplicitOverride tsc flag

Part of #33

@aomarks
aomarks requested a review from justinfagnani October 20, 2022 23:03
Comment thread src/execution/service.ts Outdated
export class ServiceScriptExecution extends BaseExecution<ServiceScriptConfig> {
static execute(
config: ServiceScriptConfig,
script: ServiceScriptConfig,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

did you mean to go back to script?

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.

Oops, no, merge mistake. But this whole method is removed in the next commit anyway so no point fixing.

@aomarks
aomarks merged commit 0377bdb into service Oct 20, 2022
@aomarks
aomarks deleted the service.4 branch October 20, 2022 23:20
aomarks pushed a commit that referenced this pull request Jan 10, 2024
In #471 the handling of unhandled exceptions was removed. This adds that missing handling back so that any exceptions that aren't caught can be gracefully handled and raised to the user correctly.
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.

2 participants