taxonworks icon indicating copy to clipboard operation
taxonworks copied to clipboard

2891 Rails 7

Open mjy opened this issue 1 year ago • 2 comments

mjy avatar Feb 12 '24 14:02 mjy

Codecov Report

Attention: Patch coverage is 79.34783% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 60.61%. Comparing base (1226625) to head (09aa6f8). Report is 3 commits behind head on development.

:exclamation: Current head 09aa6f8 differs from pull request most recent head 165ab11

Please upload reports for the commit 165ab11 to get more accurate results.

Files Patch % Lines
spec/support/controller_spec_helper.rb 0.00% 8 Missing :warning:
lib/batch_load/import.rb 0.00% 6 Missing :warning:
...batch_load/import/taxon_names/nomen_interpreter.rb 50.00% 2 Missing :warning:
app/models/import_dataset/darwin_core.rb 0.00% 1 Missing :warning:
app/models/taxon_name_relationship.rb 95.23% 1 Missing :warning:
lib/queries/sqed_depiction/filter.rb 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff                @@
##           development    #3819       +/-   ##
================================================
- Coverage        72.37%   60.61%   -11.77%     
================================================
  Files             1925     1663      -262     
  Lines            65939    55511    -10428     
================================================
- Hits             47723    33646    -14077     
- Misses           18216    21865     +3649     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 13 '24 19:02 codecov-commenter

I'm guessing maybe you already considered this and decided nothing needs changing, but I'll mention it just in case since it showed up in my logs.

The situation was doing a batch create of new loan items from tags, where the batch create failed because one of the items was already on loan. I noticed the following deprecation warning:

DEPRECATION WARNING: Using `return`, `break` or `throw` to exit a transaction block is
deprecated without replacement. If the `throw` came from
`Timeout.timeout(duration)`, pass an exception class as a second
argument so it doesn't use `throw` to abort its block. This results
in the transaction being committed, but in the next release of Rails
it will rollback.
 (called from batch_create_from_tags at /app/app/models/loan_item.rb:275)

and here's the code: https://github.com/SpeciesFileGroup/taxonworks/blob/2d26cd6cb21e1744f1617c82a7b07fd6a8d8897f/app/models/loan_item.rb#L273-L291

I guess now instead of commiting the loan items that succeeded before the error, now none of them will be commited. If there's anything I can help with here feel free to let me know.

kleintom avatar Mar 12 '24 17:03 kleintom