Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
5f9826be
Unverified
Commit
5f9826be
authored
5 months ago
by
Douglas Gubert
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: deno runtime controller not handling undefined child process reference correctly (#33494)
parent
d9fe5bbe
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/proud-bugs-cry.md
+5
-0
5 additions, 0 deletions
.changeset/proud-bugs-cry.md
packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts
+11
-2
11 additions, 2 deletions
...s-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts
with
16 additions
and
2 deletions
.changeset/proud-bugs-cry.md
0 → 100644
+
5
−
0
View file @
5f9826be
---
'
@rocket.chat/apps-engine'
:
patch
---
Fixed a problem in the deno runtime controller where it would not handle undefined child process references correctly
This diff is collapsed.
Click to expand it.
packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts
+
11
−
2
View file @
5f9826be
...
...
@@ -71,7 +71,7 @@ export type DenoRuntimeOptions = {
};
export
class
DenoRuntimeSubprocessController
extends
EventEmitter
{
private
deno
:
child_process
.
ChildProcess
;
private
deno
:
child_process
.
ChildProcess
|
undefined
;
private
state
:
'
uninitialized
'
|
'
ready
'
|
'
invalid
'
|
'
restarting
'
|
'
unknown
'
|
'
stopped
'
;
...
...
@@ -166,6 +166,11 @@ export class DenoRuntimeSubprocessController extends EventEmitter {
}
public
async
killProcess
():
Promise
<
void
>
{
if
(
!
this
.
deno
)
{
this
.
debug
(
'
No child process reference
'
);
return
;
}
// This field is not populated if the process is killed by the OS
if
(
this
.
deno
.
killed
)
{
this
.
debug
(
'
App process was already killed
'
);
...
...
@@ -201,7 +206,7 @@ export class DenoRuntimeSubprocessController extends EventEmitter {
public
async
getStatus
():
Promise
<
AppStatus
>
{
// If the process has been terminated, we can't get the status
if
(
this
.
deno
.
exitCode
!==
null
)
{
if
(
!
this
.
deno
||
this
.
deno
.
exitCode
!==
null
)
{
return
AppStatus
.
UNKNOWN
;
}
...
...
@@ -311,6 +316,10 @@ export class DenoRuntimeSubprocessController extends EventEmitter {
}
private
setupListeners
():
void
{
if
(
!
this
.
deno
)
{
return
;
}
this
.
deno
.
stderr
.
on
(
'
data
'
,
this
.
parseError
.
bind
(
this
));
this
.
deno
.
on
(
'
error
'
,
(
err
)
=>
{
this
.
state
=
'
invalid
'
;
...
...
This diff is collapsed.
Click to expand it.
Git Mirror User
@gitmirror
mentioned in commit
083af95c
·
5 months ago
mentioned in commit
083af95c
mentioned in commit 083af95cbbe2c2529e51b13262950470a825d0ed
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment