AW_PROFILE env var is ignored: Python aw-server always starts in the default profile
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start in aw_server/main.py, where resolve_profile(args.profile, args.testing) only reads the CLI flag and export_profile(profile) then overwrites AW_PROFILE with default. Make the resolver fall back to the AW_PROFILE env var when --profile is absent, as aw-server-rust does. Done when AW_PROFILE=research aw-server reports the research profile on /api/0/info and uses the research data directory; the aw-qt --profile qa port issue can be split into a follow-up.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The directories docs say to set AW_PROFILE=<name> for each module you start separately. The Python aw-server ignores it. aw-server-rust and the watchers honour it, so a profile set by env var splits across two data directories.
Repro (v0.14.3 linux release, isolated XDG_* dirs):
AW_PROFILE=research aw-server --port 5652 &
AW_PROFILE=research aw-server-rust --port 5651 &
curl -s localhost:5651/api/0/info # ... "profile":"research"
curl -s localhost:5652/api/0/info # ... "profile": "default"
ls $XDG_DATA_HOME # activitywatch activitywatch-research
aw-server --profile research works, so the bug is only in the env-var path.
Cause: aw_server/main.py calls resolve_profile(args.profile, args.testing), which looks only at the CLI flags, and export_profile(profile) then overwrites AW_PROFILE with default. The env var never reaches the resolver.
Impact: a separately started Python server lands in the default profile's database and port (5600) while its watchers write to the named profile. During the docs check, an aw-qt --profile qa start also brought the bundled Python aw-server up in the default profile (Using database file: .../activitywatch/aw-server/..., Port 5600 is in use), even with a port set in the profile's aw-server.toml. That part has not been isolated yet. It may be the same root cause, or separate aw-qt argument passing.
Expected: with no --profile flag, fall back to AW_PROFILE, as aw-server-rust does.
Found during a docs-vs-reality pass of the getting-started, directories and configuration pages.
- Ngôn ngữ chính
- Python
- Star
- 129
- Fork
- 105
- Merge trung bình
- 4 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của ActivityWatch/aw-server
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
ActivityWatch/aw-server#233 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 51/100
ActivityWatch/aw-server#213 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Return structured 400 when event storage rejects a foreign-bucket IDCó thể đã có người làm @TimeToBuildBob đã nhận 28 ngày trước. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
ActivityWatch/aw-server#211 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
ActivityWatch/aw-server#187 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
ActivityWatch/aw-server#86 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của ActivityWatch/aw-server
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mloda-ai/mloda-plugin-template#206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
integration: websocket_api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#194618 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Shorten and organize the README around reader tasksCó thể đã có người làm @msaad00 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Hidden joints can't be re-shownĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
5hyuns/maya-workflow-kit-for-blender#568 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
letsrevel/revel-backend#1558 ·
Maintainer thường phản hồi trong vòng 1 ngày