Skip to content

Commit

Permalink
Merge c08f689 into 97df0bd
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre authored May 2, 2023
2 parents 97df0bd + c08f689 commit 45b6a81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fence/blueprints/data/indexd.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ def index_document(self):
"indexd: {}".format(url + self.file_id)
)
raise InternalError("URLs and metadata not found")

# indexd can resolve GUIDs without prefix, but cannot perform other operations
# (such as delete) without the prefix, so make sure `file_id` is the whole GUID
real_guid = json_response.get("did")
if real_guid and real_guid != self.file_id:
self.file_id = real_guid

return res.json()
except Exception as e:
logger.error(
Expand Down Expand Up @@ -714,6 +721,7 @@ def delete(self):
# it's possible that for some reason (something else modified the record in the
# meantime) that the revision doesn't match, which would lead to error here
if response.status_code != 200:
logger.error(f"Unable to delete indexd record '{self.file_id}': {response}")
return (flask.jsonify(response.json()), 500)
return ("", 204)

Expand Down
5 changes: 5 additions & 0 deletions fence/sync/sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,11 @@ def _update_authz_in_arborist(
)
)
continue
self.logger.debug(
"updating client `{}` (found {} client IDs)".format(
client_name, len(clients)
)
)
# there may be more than 1 client with this name if credentials are being rotated,
# so we grant access to each client ID
for client in clients:
Expand Down

0 comments on commit 45b6a81

Please sign in to comment.