audit surface: migrate to the consolidated campus_python.audit client (post-#178) and re-pin

未关闭
#100 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
43/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
api, cli

调研方向

Start in campus_cli/audit/client.py and inspect the audit call sites under campus_cli/audit/; the issue estimates about 46 call sites whose dict-consuming code may need to handle CampusResponse via .json(). Read the consolidated client changes in campus-api-python#178 and the response and query fixes in #180, then run the audit tests. Done means the audit commands work with campus-api-python v0.11.0, the dependency is pinned, and release 0.8.2 is cut.

由索引模型根据 Issue 内容生成。

描述

Follow-up from the 2026-11-21 bugfix sweep.

Current state (campus-cli 0.8.0/0.8.1 + campus-api-python v0.10.9 wheel):

  • campus audit traces list/search and apikeys list crash client-side:
    CampusRequest.get() got an unexpected keyword argument 'params' — the
    v0.10.9 wheel's audit resources pass params= where get() takes
    query= (kwarg fix: campus-api-python#180).
  • The installed 0.8.0 is affected today; cli#99 (0.8.1) stays pinned at
    v0.10.9 so it inherits the crash. Workaround until the migration: drive
    traces via the campus-admin audit UI, raw HTTP, or the SDK directly.

The migration: the audit-namespace reorg (campus-api-python#178,
merged unreleased) consolidated the flask-campus audit client into the
SDK as campus_python.audit — the PR itself notes "campus-cli vendors a
duplicate today, can adopt it later". The next SDK release from main is
v0.11.0 (minor: CampusResponse return types are breaking for the CLI's
dict-consuming audit code, ~46 call sites in campus_cli/audit/).

Scope: adopt the consolidated client in campus_cli/audit/
(AuditRoot/CampusRequest construction in client.py already matches the
new surface's auth style), unwrap CampusResponse (.json()) at the
render boundary, pin campus-api-python v0.11.0, cut 0.8.2.

主要语言
Python
星标
0
派生
0
平均合并
14 分钟
30 天内合并 PR
24

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nyjc-computing/campus-cli 的其他 Issue

查看 nyjc-computing/campus-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。