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

Đang mở
#526 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
57/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js
Lĩnh vực
api, backend, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
JavaScript
Star
10
Fork
6
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mieweb/opensource-server

Tất cả issue của mieweb/opensource-server

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.