Idle shutdown: add idleTime resource request (default 72h)

オープン
#526 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
57/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js
領域
api, backend, frontend

調査の方向性

Start with create-a-container/models/resourcerequest.js, then trace the resource approval flow, applyResourceToExistingContainers, the /resource-requests/effective endpoint, and the frontend request form. Run the relevant tests and add coverage for the default of 72 and the inverted approval rules. Done means requests follow those rules, approval does not enqueue a reconfigure job, and the effective endpoint returns idleTime.

索引モデルが issue の本文から書いたものです。

説明

enhancement idle-shutdown

Part of the Idle Container Shutdown epic.

Summary

Add a new resource request type idleTime that controls how long a container may go without proxied access before it is stopped automatically.

Details

  • Unit: hours (integer). Default 72.
  • 0 = never stop (exempt from idle shutdown).
  • Add to VALID_RESOURCE_TYPES / RESOURCE_DEFAULTS in create-a-container/models/resourcerequest.js. No migration needed (resourceType is STRING(20)).
  • Approval is inverted vs. other types: values 1..72 (shorter than default) auto-approve; values > 72 and 0 (never) require admin approval. Admins always auto-approve.
  • idleTime is not a Proxmox resource: applyResourceToExistingContainers must not enqueue reconfigure-container.js for it.
  • Relax the "requires a provisioned container" rule on admin approval for this type.
  • Expose in /resource-requests/effective and the frontend request form.

Acceptance criteria

  • Users can request idleTime; shorter values auto-approve, longer / 0 go pending.
  • Approving does not enqueue a reconfigure job.
  • Effective resources endpoint returns idleTime (default 72).
  • Tests cover approval direction and default.
主要言語
JavaScript
スター
10
フォーク
6
平均マージ
5日 14時間
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mieweb/opensource-server のほかの issue

mieweb/opensource-server の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。