-
Notifications
You must be signed in to change notification settings - Fork 0
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
SIANXSVC-1186: Terminate application after writing metadata #20
SIANXSVC-1186: Terminate application after writing metadata #20
Conversation
3b177dc
to
94eeafd
Compare
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.
This does not work with the current metadata fetching implementation in e5e. Calling the metadata command outputs the expected JSON in time but the binary keeps running until the initialization is done.
e5e only starts to interpret the stdout after the binary exited with status code 0 to ensure that the metadata was generated successfully.
Therefore, the current way would not work in the following conditions:
- long running initialization code
- exceptions occurring (e.g. due to missing network connections)
d289e65
to
70e6efa
Compare
70e6efa
to
bde5e30
Compare
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.
Metadata fetching now works as expected.
FYI this PR is not based on the current main, so the response result is not fixed yet. I'm missing permissions on this repo else I would have pushed my local rebase.
bde5e30
to
65a898f
Compare
Closes SIANXSVC-1186
Proof of concept
In order to test that the changes work, the following code was used:
If I run this code with
dotnet run metadata
, the application prints the metadata and terminates immediately.Caveats
Unfortunately,
Environment.Exit
would also end the test processes, therefore it had to be abstracted a bit.