Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPL-865 [Limber] Handle sprint client response #1352

Open
3 tasks done
yoldas opened this issue Aug 2, 2023 · 2 comments · May be fixed by #2130
Open
3 tasks done

DPL-865 [Limber] Handle sprint client response #1352

yoldas opened this issue Aug 2, 2023 · 2 comments · May be fixed by #2130
Assignees
Labels
Bug Bug in code Size: S Small - low effort & risk Value: 3 Value to the insitute is average

Comments

@yoldas
Copy link
Member

yoldas commented Aug 2, 2023

User story
As a developer (ay6), I would like sprint client response to be handled in Limber to show correct and useful feedback for label printing using squix printers.

print_to_sprint method of PrintJob class does not handle the response code and body and returns success even if there are errors. The view always shows info about sending of print requests to the printer as success even though requests do not reach the printer or labels are not printed.

Who are the primary contacts for this story
kt17
ay6
as28

Who is the nominated tester for UAT
TBD

Acceptance criteria
To be considered successful the solution must allow:

  • response object returned by SPrintClient.send_print_request call is checked, for status and message body.
  • On failure, useful feedback is added for the view using errors.add and false is returned for PrintJobsController
  • Preferably, print job id in response from sprint is used for finding out the actual status of printing.

Dependencies
This story is blocked by the following dependencies:

  • #<issue_no.>
  • sanger/#<issue_no.>

References
This story has a non-blocking relationship with:

  • #<issue_no.>
  • sanger/#<issue_no.>

Additional context

code: 200
body: {"errors":[{"message":"Variable 'printRequest' has an invalid value: Expected type 'Int' but was 'Double'.","locations":[{"line":1,"column":16}],"extensions":{"classification":"ValidationError"}}]}
  • Example response, template is broken and sprint cannot deserialize it.
code: 500
body: {"timestamp": "2023-08-02T14:46:30.160+00:00","status": 500,"error": "Internal Server Error","path": "/graphql"}
@yoldas yoldas changed the title DPL-865 Handle sprint client response DPL-865 [Limber] Handle sprint client response Aug 2, 2023
@yoldas yoldas added Size: S Small - low effort & risk Bug Bug in code labels Sep 23, 2024
@stevieing
Copy link
Contributor

stevieing commented Oct 9, 2024

The SPrint API is graphQL and will always return a 200.

I think we handle this correctly either in print_my_barcode, traction-ui or lighthouse-ui.

@stevieing stevieing added the Value: 3 Value to the insitute is average label Oct 9, 2024
@dasunpubudumal dasunpubudumal self-assigned this Dec 17, 2024
@dasunpubudumal dasunpubudumal linked a pull request Dec 17, 2024 that will close this issue
@dasunpubudumal dasunpubudumal linked a pull request Dec 17, 2024 that will close this issue
@dasunpubudumal
Copy link
Contributor

dasunpubudumal commented Dec 20, 2024

The following are required to be tested in UAT for this story.

For happy path,

  • SQPU-175923-K plate is a LBB Lib PCR-XP Norm plate used for HiC. Plate barcodes should be successfully printing for this plate.
    • Barcodes of the pool tubes associated with this plate should also be printing successfully.
  • SQPU-163898-N plate is a LBSN-96 Lysate plate used for Bioscan. Plate barcodes should be successfully printing for this plate.
    • This plate has additional plate information. Make sure they are correctly printed.

For unhappy path,

  • SPrint doesn't allow floats as x and y coordinates for the label template. Try changing config/sprint/label_templates/plate_96.yml.erb values to floats, and deploy from branch. Try to print out the plate barcodes of SQPU-175923-K. It should return an error response and the page should display it correctly. Please have a look at the tests written to assert this functionality.
  • Any other errors should be logged in the page with the error code.
Image

Attached below is an image of a set of barcodes I have taken for a previous label printing test.

image

(The top row of this image displays a list of tube barcodes. The bottom row is a set of barcodes for a Lysate plate)

Note

Norm plate does not have additional information (e.g. PARTNER ID LABEL) as Lysate plates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug in code Size: S Small - low effort & risk Value: 3 Value to the insitute is average
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants