Feat: Configurable Discovery, Discovery libraries, and Consistent Error Codes - #18
Conversation
|
Requires Note to self: once |
425fe39 to
43946b9
Compare
2ae01e0 to
d69ef28
Compare
5bb10f2 to
5acaca4
Compare
- Add support for datamasque-python 1.2.1 - Add a status command to rulesets, libraries, discover configs, and discover libraries - Refuse YAML of 60 KiB+ in rulesets/discover configs validate - Rework discover libraries for updated library model - Fix rulesets generate and connections update --password - Drop click dependency - Update changelog - Report server reason when library deletion is rejected
- Add validation to discover configs/libraries - Abort on empty YAML directly - Abort with not-found when a run has no discovery output
67b4915 to
fdb5852
Compare
|
I like this idea of However it may be easy to forget to add it in specific CLI commands - claude has found a few above. Preferably we would use these new Could we create a top-level safety net, does something like the following work? (claude) def main() -> None:
try:
app()
except DataMasqueApiError as exc:
abort_api_error("Request failed", exc)
except DataMasqueTransportError as exc:
abort(str(exc), code=ErrorCode.TRANSPORT_ERROR)Apart from consistently using |
- improve naming - refactor some test functions - replace raise errors with abort_api_error - reuse helpers to create configs and libraries in the integration tests - show a proper error when a run has no file report - name the sync-validation limit and its guard function accurately - divide the discovery integration tests into two files - read/write every file in utf-8 - add exit code 10 when a confirmation prompt is declined - assert a specific exit code in every test - declare pydantic rather than rely on dm-python - bump the version to 1.5.0
- also merge abort_api_errors into one
|
@kw-datamasque Thanks for your review! The suggestions were great and I've implemented all of them and some more. |
- Report the server reason when ruleset validation fails
kw-datamasque
left a comment
There was a problem hiding this comment.
I roleplayed a tester and had Claude test the modified CLI surface to see if it received reasonable outputs.
It found 6 of the 14 comments below (2 pre-existing), marked with (Claude) followed by Input, Expected, Reason, Suggestion for reproducibility.
I've placed Suggestions to most comments hopefully these are easy fixes. The other comments are mostly tidy ups.
b2e8b54 to
54cffff
Compare
- remove "status": "queued" field - fix 400 error return message - replace asserts with explicit abort calls - stop dm run ... returning 4 on successful command run - returns 3 if incorrect name, otherwise 0 - resolve every error code from a single HTTP-status table - tests added and modified
54cffff to
58526bf
Compare
kw-datamasque
left a comment
There was a problem hiding this comment.
Almost there- Two small asks before merge:
-
Could you please add a PR description as a best practice? Doesn't need to be super polished.
-
Could the title reflect the full scope too? Something like "feat: configurable discovery, discovery libraries, consistent error codes"
4ab10aa to
27b241b
Compare
27b241b to
69ea485
Compare
Added
Changed
Fixed