Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30632

Fix blobProviderId still present when moving blob from a S3 blob provider to another S3 blob provider

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.10-HF52, 2021.8
    • Fix Version/s: 10.10-HF54, 2021.12
    • Component/s: BlobManager, S3
    • Release Notes Summary:
      Better management of the blob ProviderId when moving blob from a S3 blob provider to another S3 blob provider.
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #46, nxplatform #47, nxplatform #48
    • Story Points:
      2

      Description

      Context

      After NXP-30366 we identified a regression in the nuxeo-coldstorage unit tests.
      The addon isn't able to retrieve/restore the blobs from the S3 cold storage.

      The root cause is that the former blobProviderId is still present in the key when moving the blob to the new S3 blob storage.

      Reproduction

      • configure two S3 blob providers, for instance s3-one and s3-two.
            <extension target="org.nuxeo.ecm.core.blob.BlobManager" point="configuration">
                <blobprovider name="s3-one">
                    <class>org.nuxeo.ecm.blob.s3.S3BlobProvider</class>
                    <property name="awsid">${nuxeo.s3storage.awsid}</property>
                    <property name="awssecret">${nuxeo.s3storage.awssecret}</property>
                    <property name="region">${nuxeo.s3storage.region}</property>
                    <property name="bucket">${nuxeo.s3storage.bucket}</property>
                    <property name="bucket_prefix">${nuxeo.s3storage.bucket_prefix}</property>
                    <property name="digestAsync">false</property>
                    <property name="keyStrategy">managed</property>
                </blobprovider>
            </extension>
            <extension target="org.nuxeo.ecm.core.blob.BlobManager" point="configuration">
                <blobprovider name="s3-two">
                    <class>org.nuxeo.ecm.blob.s3.S3BlobProvider</class>
                    <property name="transient">true</property>
                    <property name="awsid">${nuxeo.s3storage.awsid}</property>
                    <property name="awssecret">${nuxeo.s3storage.awssecret}</property>
                    <property name="region">${nuxeo.s3storage.region}</property>
                    <property name="bucket">${nuxeo.s3storage.bucket2}</property>
                    <property name="bucket_prefix">${nuxeo.s3storage.bucket_prefix}</property>
                    <property name="digestAsync">false</property>
                    <property name="keyStrategy">managed</property>
                </blobprovider>
            </extension>
        
      • configure the blob dispatcher with s3-one as the default and s3-two used for the files:files XPath
            <extension target="org.nuxeo.ecm.core.blob.DocumentBlobManager" point="configuration">
                <blobdispatcher>
                    <class>org.nuxeo.ecm.core.blob.DefaultBlobDispatcher</class>
                    <property name="blob:xpath=files:files/*/file">s3-two</property>
                    <property name="default">s3-one</property>
                </blobdispatcher>
            </extension>
        
      • create a blob on file:content
      • move it to files:files/0/file

      Actual result

      The resulting S3 object has a key prefixed by s3-one: in the S3 storage.

      Expected result

      The resulting S3 object doesn't have a prefix in its key in the S3 storage.

      Action

      There's missing blobProviderId removal when moving/coping the blob from a S3 blob provider to another S3 blob provider.

      Note that the behavior is correct on the default blob provider.

      We should check and fix different configurations, such as S3 to S3, local to S3 and S3 to local for intance.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: