Project

General

Profile

Actions

Bug #17508

closed

Arv-keepdocker implicitly tries to delete a collection protected property

Added by Lucas Di Pentima over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Crunch
Target version:
Story points:
-
Release relationship:
Auto

Description

A user reports that when running arv-keepdocker to upload an image, an error is returned like the following:

$ arv-keepdocker some-image:6.0.0

2021-03-30 20:20:56 arvados.arv_put[11053] INFO: Resuming upload from cache file /Users/username/.cache/arvados/arv-put/eb3268c0d9c1d015bfbeae7b33c3df2a

3801M / 3801M 100.0% 2021-03-30 20:20:57 arvados.arv_put[11053] INFO:

2021-03-30 20:20:57 arvados.arv_put[11053] INFO: Collection saved as 'Docker image some-image:6.0.0 sha256:12345 (2021-03-30T18:20:57.430Z)'

zzzzz-4zz18-xxxxxxxxxxxxxx

Traceback (most recent call last):

  File "/Users/username/.pyenv/versions/arvados/bin/arv-keepdocker", line 7, in <module>

    main()

  File "/Users/username/.pyenv/versions/3.6.8/envs/arvados/lib/python3.6/site-packages/arvados/commands/keepdocker.py", line 508, in main

    api.collections().update(uuid=coll_uuid, body={"properties": {"docker-image-repo-tag": image_repo_tag}}).execute(num_retries=args.retries)

  File "/Users/username/.pyenv/versions/3.6.8/envs/arvados/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper

    return wrapped(*args, **kwargs)

  File "/Users/username/.pyenv/versions/3.6.8/envs/arvados/lib/python3.6/site-packages/googleapiclient/http.py", line 840, in execute

    raise HttpError(resp, content, uri=self.uri)

arvados.errors.ApiError: <HttpError 403 when requesting https://example.com/arvados/v1/collections/zzzzz-4zz18-xxxxxxxxxxxxxx?alt=json returned "request failed: http://localhost:8000/arvados/v1/collections/zzzzz-4zz18-xxxxxxxxxxxxxx: 403 Forbidden: Protected property cannot be updated: responsible_person_uuid (req-xxxxxxxxxxxxxxxxxxxx)">

It seems the issue is that arv-keepdocker tries to add a property to the recently created collection without realizing that it already has some auto-added property, so it doesn't include it on the update call, making the api server return an error because it looks like the client is trying to remove a protected property.


Subtasks 1 (0 open1 closed)

Task #17514: Review 17508-arvkeepdocker-fixResolvedLucas Di Pentima04/01/2021Actions
Actions

Also available in: Atom PDF