Bug #16144

container_request missing nil checks

Added by Peter Amstutz 5 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
02/11/2020
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

1. in models/container_request.rb#update_collections

manifest = Collection.where(portable_data_hash: pdh).first.manifest_text

Fails if pdh is non-nil but not found.

2. in models/container_request.rb#finalize_if_needed

      c = Container.find_by_uuid(container_uuid)
      c.lock!

Fails if container_uuid is not found.

Also, if the container_request is being destroyed, finalize_if_needed should be skipped. (It is an after_save hook, do those run on destroy?)


Subtasks

Task #16145: Review 16144-nil-checksResolvedPeter Amstutz

Associated revisions

Revision 201d0473
Added by Peter Amstutz 5 months ago

Merge branch '16144-nil-checks' refs #16144

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Peter Amstutz 5 months ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz 5 months ago

  • Priority changed from Normal to High
  • Description updated (diff)

#3 Updated by Peter Amstutz 5 months ago

  • Description updated (diff)

#4 Updated by Lucas Di Pentima 5 months ago

  • Release set to 22
  • Assigned To set to Lucas Di Pentima
  • Category set to API

#5 Updated by Peter Amstutz 5 months ago

  • Description updated (diff)

#6 Updated by Lucas Di Pentima 5 months ago

Fixes at cf0171de6 - branch 16144-nil-checks
Test run: https://ci.arvados.org/job/developer-run-tests/1725/

#7 Updated by Peter Amstutz 5 months ago

Lucas Di Pentima wrote:

Fixes at cf0171de6 - branch 16144-nil-checks
Test run: https://ci.arvados.org/job/developer-run-tests/1725/

LGTM, thanks!

#8 Updated by Lucas Di Pentima 5 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF