Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Flask API endpoint in the model service to fetch serial logs for a given store model, backed by the canonicalwebteam.store-api publisher gateway, with accompanying endpoint tests and a dependency bump to a newer store-api version.
Changes:
- Add
GET /api/store/<store_id>/models/<model_name>/serial-logendpoint that returnsitemsfromget_store_model_serial_log. - Add unittest coverage for success/empty/error scenarios for the new endpoint.
- Bump
canonicalwebteam.store-apidependency from7.3.10to7.4.10.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
webapp/endpoints/models.py |
Adds the new serial-log route and error handling logic. |
tests/endpoints/tests_models.py |
Adds tests for the new endpoint behavior. |
requirements.txt |
Updates store-api dependency version to support the new gateway method. |
8b28457 to
95dcaef
Compare
| res["success"] = True | ||
| response = make_response(res, 200) | ||
| except StoreApiResponseErrorList as error_list: | ||
| error_messages = [ |
There was a problem hiding this comment.
nitpick: I wonder if this logic would be useful for other endpoints as well. It would be nice if we can create a function. but not a blocker.
|
Im getting {"message":"Missing required permission: read-serial-log","success":false} for "https://snapcraft-io-5627.demos.haus/api/store/ahnuP3quahti9vis8aiw/models/test-superalpaca-00/serial-log" I guess i dont have permission |
Done
Adds an endpoint to get the serial log for a model
How to QA
Testing
Security
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-35107
Screenshots
n/a
UX Approval