Missing integration links

Created on 30 August 2024, 11 months ago

Problem/Motivation

My logs are being filled with pages of errors
Something went wrong during integration link removal for entity: abcdef integration link: xyz. Error message: API responded with status: 400. If the issue persist contact the site admin. Error message: Client error: `DELETE https://arvest.acquiadam.com/api/rest/integrationlink/xyz` resulted in a `400 Bad Request` response: @"error":"Bad Request","description":"Integration link with uuid xyz does not exist"
and
Client error: `DELETE https://arvest.acquiadam.com/api/rest/integrationlink/xyz` resulted in a `400 Bad Request` response: @"error":"Bad Request","description":"Integration link with uuid xyz does not exist"

The associated asset id exists, and I see duplicated entries in the integration_link_id column in table acquia_dam_integration_link_tracking. It's logging the error because the integration link id 'xyz' doesn't exist in the api, mysite.acquiadam.com/api/rest/integrationlink.

My suspicion is that assets were archived in DAM but archiving them doesn't trigger the removal of the integration link, so the link ids end up as leftover debris.

Steps to reproduce

tbd

Proposed resolution

At the very least, the log should include the asset id, to make it easier to track down.

Remaining tasks

Determine why there are missing integration link ids and the best way to handle them.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇺🇸United States capysara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @capysara
  • Issue was unassigned.
  • Status changed to Needs review 11 months ago
  • 🇺🇸United States capysara

    Created a MR to update the log error to be more helpful. I need to do some more research because this issue might part of a larger problem or might be specific to my site, but the error message is a positive step regardless.

  • Pipeline finished with Success
    11 months ago
    Total: 1071s
    #269538
  • Pipeline finished with Success
    11 months ago
    Total: 1205s
    #286624
  • Status changed to Needs work 9 months ago
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    MRs of bugfixes should target the 1.0.x branch.

  • 🇺🇸United States capysara

    capysara changed the visibility of the branch asset-id-missing-integration-link-3471261 to hidden.

  • 🇺🇸United States capysara

    capysara changed the visibility of the branch 3471261-missing-integration-links to hidden.

  • 🇺🇸United States capysara

    Created MR against 1.0.x.

  • Pipeline finished with Failed
    9 months ago
    Total: 1795s
    #330242
  • Pipeline finished with Failed
    9 months ago
    Total: 1445s
    #330253
  • Pipeline finished with Success
    9 months ago
    Total: 1222s
    #330274
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • First commit to issue fork.
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    On Acquia's internal channels, we have received reports of very similar errors to happen. Based on the formatting of error messages I see on Watchdog screenshots, I can tell that the Customer was using a version of this module before the MR !84 was merged.

    Although handling of HTTP 4xx errors from asset-related API requests has been improved in the 1.1.x branch, but it is uncertain whether it covers integration link-related requests too or not. Independently from HTTP 4xx errors, I do agree with @capysara 's suspicion about if the CRUD operations of integration links are not in full sync with the DAM assets during their entire lifecycle. As the auto-hiding logic instantly sets media items unpublished at any time when the Widen API returns a response with negative meaning (aka. asset unavailable or deleted), these are not permanent changes on Widen's side (asset can be available later on and even can be restored from trashbin by admin). Therefore we don't delete media items automatically, so – up to my current understanding – we should not delete integration links either.

    For the sake of transparency (and because we have referenced this ticket earlier from various sources) I restored its original issue description which was clearly about solving the link deletion problems. Also, bumping branch up to 1.1.x because it could be easier due to the aforementioned feature already implemented there.

  • Status changed to Closed: works as designed 10 days ago
  • 🇮🇳India rajeshreeputra Pune

    Tested with 1.1.x - the integration link registration now completes successfully without throwing errors. When assets are deleted from Acquia DAM, the system now removes the corresponding queue entries instead of keeping it in queue and throwing the error.

Production build 0.71.5 2024