Skip to content

Commit 17afd40

Browse files
committed
feat: add comment
1 parent e78ca28 commit 17afd40

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,7 @@ RUN echo 'nouser:x:999:999::/home/nouser:/bin/sh' >> /etc/passwd
4242
USER node
4343
EXPOSE 8080
4444

45+
# tini is used as PID 1 to reap zombie child processes (e.g. git-remote-http)
46+
# that Node.js would otherwise leave unreaped, causing PID exhaustion over time
4547
ENTRYPOINT ["/sbin/tini", "--"]
4648
CMD ["node", "--max-http-header-size", "16384", "dist/src/app.js"]

src/git/connect.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ const env = cleanEnv({
1313

1414
export default async function getLatestRemoteCommitSha(): Promise<string | undefined> {
1515
try {
16-
// Timeout ensures the git-remote-http child process is killed after 30 seconds if the remote is unreachable,
17-
// preventing hung processes from accumulating and exhausting system fork() resources.
18-
const git = simpleGit({ timeout: { block: 30000 } })
16+
const git = simpleGit()
1917
const repoUrl = new URL(env.GIT_REPO_URL)
2018
repoUrl.username = encodeURIComponent(env.GIT_USER)
2119
repoUrl.password = encodeURIComponent(env.GIT_PASSWORD)

src/utils/workloadUtils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,7 @@ export class chartRepo {
233233
this.chartRepoUrl = chartRepoUrl
234234
this.gitUser = gitUser
235235
this.gitEmail = gitEmail
236-
// Timeout kills the git child process if it produces no output for 30 seconds.
237-
// This is safe for large repositories: active clones/fetches continuously emit progress,
238-
// so the timer only triggers on truly hung processes (e.g. unresponsive remote).
239-
this.git = simpleGit(this.localPath, { timeout: { block: 30000 } })
236+
this.git = simpleGit(this.localPath)
240237
}
241238
async clone(branch: string = 'main') {
242239
await this.git.clone(this.chartRepoUrl, this.localPath, ['--branch', branch, '--single-branch', '--depth', '1'])

0 commit comments

Comments
 (0)