Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-31740: Fixed and migrated DFS configuration to Symfony 5 #596

Merged
merged 3 commits into from Sep 25, 2020

Conversation

alongosz
Copy link
Member

Question Answer
JIRA issue EZP-31738, EZP-31739, EZP-31740.
Requires ezsystems/ezplatform-kernel#108
Type bug
Target eZ Platform version v3.1+
BC breaks yes
Doc needed yes

TL;DR;

This PR fixes DFS configuration and adjusts it for Symfony 5 changes.

Breaking changes

There's no way to fix configuration in a BC-safe way due to changes between Symfony 3 and 5.

Required configuration is as follows

DFS_DATABASE_URL=<dfs_db_url>
DFS_NFS_PATH=<absolute-nfs-path>
  • changes from this PR diff.

Doc

It's no longer possible to use local NFS adapter shipped with Flysystem (3rd party). Developers who want dynamic (SiteAccess-dependent) paths in their NFS directory path need to use our new SiteAccess-aware adapter. Thus meta repository upgrade is required. Patch from this Pull Request can be applied on a project. Also it's worth to mention this in deprecation/removal section of 3.x doc and in upgrade instructions.

Upgrade:

Env settings:

Before:

DFS_DATABASE_NAME=<dfs_db_name>
DFS_NFS_PATH=<absolute-nfs-path>

After:

DFS_DATABASE_URL=<dfs_db_url>
DFS_NFS_PATH=<absolute-nfs-path>

Project configuration (if the patch was applied and dfs.yaml hasn't been customized, then this step is not required):

Before:

oneup_flysystem:
    adapters:
        nfs_adapter:
            local:
                directory: "/%dfs_nfs_path%/$var_dir$/$storage_dir$"

After:

oneup_flysystem:
    adapters:
        nfs_adapter:
            custom:
                service: ibexa.platform.io.nfs.adapter.site_access_aware

QA

Internal sync might be required before proceeding because the configuration is quite complicated.

This PR fixes multiple issues which cannot be reproduced separately, so DFS sanities are in order.

Multi-repository case can be set-up applying this example onto this PR's patch.

Please also check if default configuration (no DFS, stored locally in public directory) is still working.

@alongosz
Copy link
Member Author

Update: config had to be changed a bit, for more details see ezsystems/ezplatform-kernel#108 (comment).

@alongosz
Copy link
Member Author

Fixed failing P.sh config via 08f6239.

@vidarl
Copy link
Member

vidarl commented Sep 25, 2020

I have a client which have a problem using the aws_s3_adapter. They are not able to set ezplatform.system.default.io.url_prefix per siteaccess. We need to make custom adapters for any fly adapter now?

@micszo
Copy link
Member

micszo commented Sep 25, 2020

I have a client which have a problem using the aws_s3_adapter. They are not able to set ezplatform.system.default.io.url_prefix per siteaccess. We need to make custom adapters for any fly adapter now?

that sounds like this ticket https://jira.ez.no/browse/EZP-31912

Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

Tested locally and on platform.sh.
Covered in both cases: default configuration, NFS w/o separate DFS db, NFS with separate DFS db.
Also checked NFS with and without separate db with multi site.

QA Approved on eZ Platform EE v3.1.2 with diffs.

We have one thing to follow-up on p.sh but it's not blocking for this task.

@alongosz
Copy link
Member Author

I have a client which have a problem using the aws_s3_adapter. They are not able to set ezplatform.system.default.io.url_prefix per siteaccess. We need to make custom adapters for any fly adapter now?

@vidarl the issue you're referring to is actually unrelated to AWS, it's just IO Prefix which had been broken. Fixed via ezsystems/ezplatform-kernel#110.

@alongosz alongosz merged commit e41ebdf into ezsystems:3.1 Sep 25, 2020
@alongosz alongosz deleted the fix-3.1/ezp-31740-fix-dfs-config branch September 25, 2020 13:34
@dabrt dabrt self-assigned this Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants