AW_PROFILE env var is ignored: Python aw-server always starts in the default profile
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 129
- フォーク
- 105
- 平均マージ
- 4日 23時間
- マージ済み PR(30日)
- 17
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ActivityWatch/aw-server のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
ActivityWatch/aw-server#233 ·
メンテナーはふだん 5 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 51/100
ActivityWatch/aw-server#213 ·
メンテナーはふだん 5 日以内に返信
-
Return structured 400 when event storage rejects a foreign-bucket ID対応中かも @TimeToBuildBob が 28 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 35/100
ActivityWatch/aw-server#211 ·
メンテナーはふだん 5 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
ActivityWatch/aw-server#187 · コメント 2 件 ·
メンテナーはふだん 5 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ActivityWatch/aw-server#86 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
ActivityWatch/aw-server の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mloda-ai/mloda-plugin-template#206 ·
メンテナーはふだん 1 日以内に返信
-
integration: websocket_api
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
home-assistant/core#194618 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Shorten and organize the README around reader tasks対応中かも @msaad00 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
5hyuns/maya-workflow-kit-for-blender#568 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
letsrevel/revel-backend#1558 ·
メンテナーはふだん 1 日以内に返信