Skip to content

Y26-050 performance improvements for the gbs pipeline - Fix #2 - #2846

Draft
KatyTaylor wants to merge 9 commits into
developfrom
Y26-050-Performance-improvements-for-the-GBS-pipeline
Draft

Y26-050 performance improvements for the gbs pipeline - Fix #2#2846
KatyTaylor wants to merge 9 commits into
developfrom
Y26-050-Performance-improvements-for-the-GBS-pipeline

Conversation

@KatyTaylor

@KatyTaylor KatyTaylor commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #

Changes proposed in this pull request

  • retrieveLabware method in pooled_tubes.js method was slow because search controller create method was redirecting to the labware, causing lots of unnecessary API calls. This brings the subset of those calls that are necessary into the search controller and takes out the redirect. The UI action is now virtually instantaneous (compared to 16 seconds in local).
  • Add guard to fix bug where scanning a tube into page caused hanging and js console error, because data[this.dataset.labwareType] was undefined (response contained a 'tube' key rather than a 'plate' key.

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

yoldas and others added 5 commits April 27, 2026 13:19
[release] Merge Develop into Master for 3.96.7
[release] Merge Develop into Master for 3.96.8
[release] Merge Develop into Master for 3.97.0
…rch controller create method was redirecting to the labware, causing lots of unnecessary API calls. This brings the subset of those calls that are necessary into the search controller and takes out the redirect. The UI action is now virtually instantaneous (compared to 16 seconds in local).
…nd js console error, because data[this.dataset.labwareType] was undefined (response contained a 'tube' key rather than a 'plate' key.
@KatyTaylor KatyTaylor changed the title Y26-050 performance improvements for the gbs pipeline Y26-050 performance improvements for the gbs pipeline - Fix #2 May 15, 2026
@KatyTaylor KatyTaylor self-assigned this May 15, 2026
@andrewsparkes

Copy link
Copy Markdown
Member

@KatyTaylor In code review but failing tests and lint, want to fix first?

@KatyTaylor

Copy link
Copy Markdown
Collaborator Author

@KatyTaylor In code review but failing tests and lint, want to fix first?

Yes sorry, on my to do list. Marked as 'draft'.

…odes in a different way - through a separate V2 API call, rather than using a redirect to labware#show. The old way rendered barcode.prefix + barcode.number, leaving out the suffix for some reason (see app/views/tubes/show.json.erb, app/views/plates/show.json.erb). The new code just calls .human_barcode, which I think is fine.
…ve duplicated ones; merge and blocks because they mean the same thing

@andrewsparkes andrewsparkes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions only. Looks good.

when 'tubes'
tube =
Sequencescape::Api::V2::Tube.includes('receptacle.aliquots').find(uuid: labware.uuid).first
raise "Sorry, could not find labware with the barcode '#{barcode}'." if tube.nil?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can say 'could not find a tube' rather than 'labware' here as it's specific to tubes

when 'plates'
plate =
Sequencescape::Api::V2::Plate.includes('wells.aliquots').find(uuid: labware.uuid).first
raise "Sorry, could not find labware with the barcode '#{barcode}'." if plate.nil?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, 'plate'

expect(page).to have_text(
'The scanned plate contains tags that would clash with those in other plates in the pool. ' \
'Tag clashes found between: DN1 (DN1S) and DN3 (DN3U)'
'Tag clashes found between: DN1S (DN1S) and DN3U (DN3U)'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lose the bracketed repeats of the barcodes if now the same?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah now seen further down the bracketed one shows machine barcode in some circumstances...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plates vs tubes difference, maybe lose for plates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Y26-050 - Performance improvements for the GBS pipeline

4 participants