loopbackio / loopbackio/loopback-datasource-juggler
shortid dependency uses cluster mode and hence loopback cannot run in Passenger
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 282
- Fork
- 366
- Merge trung bình
- 17 giờ 4 phút
- Pull request đã merge (30 ngày)
- 10
Mô tả
Suggestion
shortid package uses nodes cluster mode. Passenger deployment environment does not support/allow for Nodes cluster mode. This becomes a blocker even when the shortid package feature not being used.
Use Cases
loopback API to be deployed in Passenger environment.
Examples
App 5797 output: Trace: You required the Node Cluster module, which is incompatible with Passenger, a non-functional shim was returned and your app may still work. However, please remove the related code as soon as possible.
App 5797 output: at Console.trace (internal/console/constructor.js:336:11)
App 5797 output: at Module.require (/opt/cpanel/ea-ruby27/root/usr/share/passenger/helper-scripts/node-loader.js:63:12)
App 5797 output: at require (internal/modules/cjs/helpers.js:14:16)
App 5797 output: at Object. (/home/bangal41/nodevenv/cms_api_prod/11/lib/node_modules/shortid/lib/util/cluster-worker-id.js:3:15)
App 5797 output: at Module._compile (internal/modules/cjs/loader.js:816:30)
App 5797 output: at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
App 5797 output: at Module.load (internal/modules/cjs/loader.js:685:32)
App 5797 output: at Function.Module._load (internal/modules/cjs/loader.js:620:12)
App 5797 output: at Module.require (internal/modules/cjs/loader.js:723:19)
App 5797 output: at Module.require (/opt/cpanel/ea-ruby27/root/usr/share/passenger/helper-scripts/node-loader.js:80:25)
App 5797 output: (node:5797) ExperimentalWarning: queueMicrotask() is experimental.
Acceptance criteria
TBD - will be filled by the team.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo dependency shortid và đường dẫn cluster-worker-id.js được hiển thị trong stack trace của Passenger. Kiểm tra cách dependency được tải trong quá trình khởi động ứng dụng và liệu repository có các bài test bao quát việc tạo identifier hoặc khả năng tương thích khi triển khai hay không. Nhóm cần xác định thế nào là hoàn tất: Passenger phải khởi động mà không yêu cầu module cluster không tương thích của Node, đồng thời vẫn giữ nguyên hành vi của identifier.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend, infrastructure
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100