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

Fix EPP log message duplication and missing log entries in Clarity 6+ when combining Python automations with LLTK/LITKs #51

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

smallsco
Copy link
Contributor

In Clarity LIMS 6.0 and above, when writing an automation for a step that:

  • executes both a Python script as well as a Java-based LLTK or LITK, and
  • both the Python script and LLTK/LITK are writing a log file to the same ResultFile placeholder

then in some cases, log messages can either become duplicated - resulting in extra large log files - or missing. This behaviour seems to depend on the order in which the scripts are executed as part of the automation.

An example that exhibits such behaviour is as follows:

bash -c "/opt/gls/clarity/customextensions/env/bin/python /opt/gls/clarity/customextensions/set_qc.py -u {username} -p {password} --step-uri {stepURI} -l {compoundOutputFileLuid0} && /opt/gls/clarity/bin/java -jar /opt/gls/clarity/extensions/ngs-common/v5/EPP/ngs-extensions.jar -i {stepURI:v2:http} -u {username} -p {password} script:evaluateDynamicExpression -t false -h true -exp 'if (output.QC == true) { nextStep = ::ADVANCE:: } else { nextStep = ::REMOVE:: }' -log {compoundOutputFileLuid0}"

The root cause of this issue is due to the fact that in Clarity 6, the log file name for LLTK/LITKs was changed to include LogFile as part of the file name, and not just the ResultFile LimsID. Thus, in order to squash this bug, the s4-clarity library needs to be updated to:

  • detect the version of Clarity that is currently in use, and
  • determine the correct file name to use for log files depending on the Clarity version.

As part of this, I have added a couple of new properties to the s4.clarity.LIMS object:
s4.clarity.LIMS.versions - returns a list of all API versions supported by the active version of Clarity LIMS
s4.clarity.LIMS.current_minor_version - returns the minor version ("revision") of the active Clarity LIMS API version.

@smallsco smallsco requested a review from jasmeet17 June 18, 2024 20:44
@smallsco smallsco changed the base branch from master to fix_coveralls_python_36 June 19, 2024 17:06
@smallsco smallsco requested review from HernanRossi and removed request for jasmeet17 June 19, 2024 17:07
@smallsco smallsco force-pushed the fix_epp_log_duplication branch from 1dae8f2 to 41ea1c8 Compare June 19, 2024 17:09
Base automatically changed from fix_coveralls_python_36 to master June 25, 2024 15:20
Copy link

@HernanRossi HernanRossi left a comment

Choose a reason for hiding this comment

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

Looks good!

@smallsco smallsco force-pushed the fix_epp_log_duplication branch from 41ea1c8 to cc1e230 Compare June 25, 2024 16:44
@smallsco smallsco changed the base branch from master to release_v1.6.0 July 19, 2024 17:45
@smallsco smallsco merged commit 2fef234 into release_v1.6.0 Jul 19, 2024
10 checks passed
@smallsco smallsco deleted the fix_epp_log_duplication branch July 19, 2024 17:46
@smallsco smallsco mentioned this pull request Jul 19, 2024
smallsco added a commit that referenced this pull request Jul 19, 2024
* Updated version.py and changelog for 1.6.0 release

* Declare support for Python 3.12 in setup.py (#60)

* Fix EPP log message duplication and missing log entries in Clarity 6+ when combining Python automations with LLTK/LITKs (#51)

* Fix EPP log message duplication and missing log entries in Clarity 6+ when combining Python automations with LLTK/LITKs

* Fix current_minor_version failure on Python 2

* StepRunner: ignore archived reagent kits when adding default reagents to a step (#53)

* Fix EPP log message duplication and missing log entries in Clarity 6+ when combining Python automations with LLTK/LITKs

* Fix current_minor_version failure on Python 2

* StepRunner: ignore archived reagent kits when adding default reagents to a step

* check for placement node that matches uri before creating one (#55)

* check for placement node that matches uri before creating one

* add missing quotes, fix for py2

* remove f

* Fix coveralls on Python 3.6 (#52)

* Enable automated unit testing with Python 3.12 (#56)

* Fix coveralls on Python 3.6

* Enable automated unit testing with Python 3.12

* Only trigger a production PyPi build on tags using semantic versioning (#57)

* Use latest versions of GitHub workflow actions, build with Python 3.12 (#58)

* Enable automated unit testing for Python 3.5 (#59)

* Fix coveralls parallel builds (#61)

---------

Co-authored-by: Scott Small <scott.small@semaphoresolutions.ca>

---------

Co-authored-by: Joe Rickwalder <jrickwalder@billiontoone.com>
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.

2 participants