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

Y25-067 - Synchronise Limber and Deployment sprint templates #2190

Closed
6 tasks done
yoldas opened this issue Jan 29, 2025 · 7 comments · Fixed by #2191 · May be fixed by #2208
Closed
6 tasks done

Y25-067 - Synchronise Limber and Deployment sprint templates #2190

yoldas opened this issue Jan 29, 2025 · 7 comments · Fixed by #2191 · May be fixed by #2208
Assignees

Comments

@yoldas
Copy link
Member

yoldas commented Jan 29, 2025

Fixing the Fresh Service ticket no 19502 384 label format requires adjustment

There are two sets of Sprint templates for Limber, one in Limber project directory and one in Deployment project.

When Limber is deployed, Limber's its own templates are part of the deployment. However, in the deployment project, deploy_limber also includes sprint role, which copies template files from the deployment project as well. The end result is inconsistent sprint templates directory on the target host.

I see the following steps to fix the printing issues with Limber:

  • As a quick solution to fix the Fresh Service ticket, synchronise the Limber directory and the Deployment directory.
  • Create a story to use only the templates in Deployment project as the single source of truth for Limber. Y25-074
  • Create a story to migrate Limber Sprint printing to PMB instead of talking directly to Sprint. Y25-102
  • Create a story to refactor the way the label templates are deployed for different applications. Link
  • Create a bug story for the Sequencescape error that occurred while testing. Y25-070
  • Update README with the warning about local label templates

The following files in Limber project needs considering for a quick fix.

examples --> Ignore
plate_384.yml.erb --> Update with tweaks in both.
plate_384_single.yml.erb --> Only in Limber; copy it to Deployment.
plate_96.yml.erb --> Update with tweaks in both.
plate_96_2d.yml.erb --> Only in Limber; copy it to Deployment.
tube.yml.erb --> No difference; no action
tube_label_template_1d.yml.erb --> No difference; no action
tube_label_traction_compatible.yml.erb --> Only in Limber; copy it to Deployment.

Initial attachment to the ticket:

Image

@yoldas yoldas self-assigned this Jan 29, 2025
@psd-issuer psd-issuer bot changed the title Synchronise Limber and Deployment sprint templates Y25-067 - Synchronise Limber and Deployment sprint templates Jan 29, 2025
@yoldas
Copy link
Member Author

yoldas commented Jan 30, 2025

I have executed the following commands to deploy the sprint templates from the deployment project branch to Training Limber and PMB:

ansible-playbook -vv deploy_print_label_templates.yml -i environments/training
ansible-playbook -vv deploy_limber_label_templates.yml -i environments/training

User tested the following:

Printing from Limber (directly to Sprint) did not make any difference, although the modified templates are deployed to Limber.

Image

The sprint log shows the printing used the modified template:

ubuntu@sprint-instance-20:~$ journalctl --since "2025-01-30" -u sprint.service | grep 'SQPP-71192-Q'
Jan 30 12:20:08 sprint-instance-20 java[1002434]: 2025-01-30 12:20:08.768  INFO 1002434 --- [-nio-443-exec-8] u.a.s.s.s.PrintServiceImplementation     : Print to aa212bc2: PrintRequest([Layout{labelSize=null, textFields=[TextField{x=1, y=4, rotation=north, value="SQPP-71192-Q", font=proportional, fontSize=1.7}, TextField{x=52, y=4, rotation=north, value="SQPP-70103-S", font=proportional, fontSize=1.7}], barcodeFields=[BarcodeField{x=17, y=1, rotation=north, value="SQPP-71192-Q", height=5, cellWidth=0.2, barcodeType=code39}], keyFields=[]}, Layout{labelSize=null, textFields=[TextField{x=1, y=3, rotation=north, value="30-JAN-2025", font=proportional, fontSize=1.7}, TextField{x=17, y=3, rotation=north, value="SQPP-70103-S pWGS-384 pWGS-384 Post Shear XP", font=proportional, fontSize=1.7}], barcodeFields=[], keyFields=[]}, Layout{labelSize=null, textFields=[TextField{x=1, y=4, rotation=north, value="SQPP-71192-Q", font=proportional, fontSize=1.7}, TextField{x=52, y=4, rotation=north, value="SQPP-70103-S", font=proportional, fontSize=1.7}], barcodeFields=[BarcodeField{x=17, y=1, rotation=north, value="SQPP-71192-Q", height=5, cellWidth=0.2, barcodeType=code39}], keyFields=[]}, Layout{labelSize=null, textFields=[TextField{x=1, y=3, rotation=north, value="30-JAN-2025", font=proportional, fontSize=1.7}, TextField{x=17, y=3, rotation=north, value="SQPP-70103-S pWGS-384 pWGS-384 Post Shear XP", font=proportional, fontSize=1.7}], barcodeFields=[], keyFields=[]}])

Printing from Sequencescape (through PMB to Sprint) logged an exception.

A NameError occurred in labware#print_assets:

  undefined local variable or method `barcode' for #<Plate id: 27593235, name: "Plate SQPP-71192-Q", sti_type: "Plate", size: 384, public_name: nil, two_dimensional_barcode: nil, plate_purpose_id: 390, labware_type_id: nil, created_at: "2025-01-06 11:07:06.000000000 +0000", updated_at: "2025-01-06 11:07:06.000000000 +0000", retention_instruction: nil>
  app/models/barcode/barcodeable.rb:106:in `barcode!'

I have tweaked the right_text position. User tested it again for Limber:

Print SQPP-71192-Q in Training from Limber to aa212bc2 at https://training.limber.psd.sanger.ac.uk/limber_plates/5dd075da-cc1e-11ef-9c8c-0242e38ee9b0

Image

@yoldas
Copy link
Member Author

yoldas commented Jan 30, 2025

I have created a story in Bug Backlog for the Sequencescape exception. Y25-070 - [BUG] NameError while printing Plate SQPP-71192-Q from Sequencescape in Training to aa212bc2

@yoldas
Copy link
Member Author

yoldas commented Jan 31, 2025

Testing plate_96 sync and tweak:

Deployed from branch:

ansible-playbook -vv deploy_print_label_templates.yml -i environments/uat
ansible-playbook -vv deploy_limber_label_templates.yml -i environments/uat

Printed:

SQPU-193077-W printed from Sequencescape in UAT to the printer psd-1
SQPU-193077-W printer from Limber in UAT to the printer psd-1

Sprint Log:

ubuntu@sprint-instance-20:~$ journalctl --since "2025-01-31" -u sprint.service | grep 'SQPU-193077-W'
Jan 31 11:51:38 sprint-instance-20 java[1002434]: 2025-01-31 11:51:38.513  INFO 1002434 --- [-nio-443-exec-9] u.a.s.s.s.PrintServiceImplementation     : Print to psd-1: PrintRequest([Layout{labelSize=null, textFields=[TextField{x=2, y=3, rotation=north, value="31-JAN-2025", font=proportional, fontSize=2.0}, TextField{x=2, y=6, rotation=north, value="SQPU-193077-W", font=proportional, fontSize=2.0}, TextField{x=58, y=3, rotation=north, value="Stock Plate", font=proportional, fontSize=2.0}, TextField{x=58, y=6, rotation=north, value="EDUTEST", font=proportional, fontSize=2.0}], barcodeFields=[BarcodeField{x=17, y=1, rotation=north, value="SQPU-193077-W", height=5, cellWidth=0.2, barcodeType=code39}], keyFields=[]}])
Jan 31 11:52:10 sprint-instance-20 java[1002434]: 2025-01-31 11:52:10.308  INFO 1002434 --- [-nio-443-exec-3] u.a.s.s.s.PrintServiceImplementation     : Print to psd-1: PrintRequest([Layout{labelSize=null, textFields=[TextField{x=2, y=3, rotation=north, value="31-JAN-2025", font=proportional, fontSize=2.0}, TextField{x=2, y=6, rotation=north, value="SQPU-193077-W", font=proportional, fontSize=2.0}, TextField{x=58, y=3, rotation=north, value="SQPU-193077-W", font=proportional, fontSize=2.0}, TextField{x=58, y=6, rotation=north, value="Stock Plate", font=proportional, fontSize=2.0}], barcodeFields=[BarcodeField{x=17, y=1, rotation=north, value="SQPU-193077-W", height=5, cellWidth=0.2, barcodeType=code39}], keyFields=[]}])

@yoldas
Copy link
Member Author

yoldas commented Jan 31, 2025

I have created the story for the single source of truth for Sprint templates for Limber.
Y25-074 - Use only the label print templates in the Deployment project for Limber #2198

@yoldas yoldas closed this as completed Feb 3, 2025
@yoldas
Copy link
Member Author

yoldas commented Feb 3, 2025

I will handle writing the story for the migration of Limber Sprint printing to PMB separately to unblock the deployment.
I have deployed the modified templates to all environments and merged branches to develop.

@yoldas
Copy link
Member Author

yoldas commented Feb 4, 2025

The story has been moved from Done back to In-Progress as suggested.

@yoldas
Copy link
Member Author

yoldas commented Feb 6, 2025

We have created an additional story for refactoring the way label templates are deployed for different applications:

Refactor the way label templates are deployed for different applications

Note that the story ID has not been generated automatically for the story.

@yoldas yoldas linked a pull request Feb 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant