Repository navigation
feat(cli): --journey flag for campus audit traces search - #64
Merged
Merged
Conversation
PR #55 omitted the server's login-journey filter because campus-api-python's Traces.search() did not carry it, leaving the --dry-run snippets unable to mention journey_id honestly. The SDK now ships the keyword-only journey_id filter (campus-api-python#110, merged via #111), matching /audit/v1/traces/search?journey_id=… (campus#803, campus#812 on weekly). - add --journey to traces search, forwarded as journey_id= - include journey_id in --dry-run kwargs (None dropped by _query_operation, like the other filters) - drop the "not exposed here yet" docstring caveat - relock campus-api-python to dad0442 (old pin 89df17e rejects the kwarg; targeted `poetry update`, campus-suite untouched) Tests: unit passthrough via mocked client (journey_id set / None when absent) plus dry-run snippet assertions mirroring the existing search coverage. Suite: 296 passed; ruff clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #63
Summary
Adds the server's login-journey filter to
campus audit traces searchas
--journey, closing the last documented gap from thecampus auditrollout (#54). PR #55 deliberately omitted it because
campus-api-python's
Traces.search()did not carryjourney_id; theSDK now does (campus-api-python#110, merged via #111), matching the
server route
/audit/v1/traces/search?journey_id=…(campus#803, viacampus#812 on
weekly).Changes
campus_cli/audit/traces.pytraces_search:--journeyoption alongside--user/--client/--api-key-idapi.traces.search(journey_id=journey)journey_idincluded in the--dry-runkwargs (None values arealready dropped by
_query_operation, like the other filters)poetry.lock: campus-api-python re-pinned89df17e→dad0442(#111). Required, not cosmetic — the old pin rejects the kwarg.
Targeted
poetry update campus-api-python; campus-suite and allother pins untouched.
Tests
tests/unit/test_audit.pyTestTracesSearchJourney: mocked-clientpassthrough —
journey_idset when--journeyis given,Nonewhen absent (all kwargs are always sent, matching the SDK's
keyword-only signature).
tests/integration/test_dry_run.py:--journeysnippet showsjourney_id='…'; the plain search dry-run assertsjourney_idstays absent when not given; added to the snippet compile-check
cases.
Suite: 296 passed, ruff clean.
Related
campus auditcommand group — API-key auth, key management, trace queries #54 — parentcampus auditcommand group