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

S3 publishing fails in dockerized dotCMS #16612

Open
wezell opened this issue May 23, 2019 · 3 comments

Comments

Projects
3 participants
@wezell
Copy link
Contributor

commented May 23, 2019

When dotCMS is started in docker, we try to merge the default dotmarketing-config.properties with those coming in from plugins and the dockerize template

The merge happens here:
https://github.com/dotCMS/docker/blob/master/images/dotcms/ROOT/etc/cont-init.d/10-merge-docker-config.sh#L42

A side effect of this merge is that we seem to be munging regex values used in dotmarketing-config.properties. One of these values STATIC_PUSH_BUCKET_NAME_REGEX is used to to validate s3 bucket names. In the distro, the config value for STATIC_PUSH_BUCKET_NAME_REGEX is
[,!:;&?$\\\\*\\/\\[\\]=\\|#_@\\(\\)<>\\s\\+"]+

and in docker, the has been changed into (basically unescaped):
[,!:;&?$\\*\/\[\]=\|#_@\(\)<>\s\+"]+

This causes an error when trying to push to S3

13:26:43.787  INFO  publishing.PublisherAPIImpl - Start of Bundler: c
13:26:43.831  INFO  publishing.PublisherAPIImpl - End of Bundler: c
13:26:43.831  INFO  publishing.PublisherAPIImpl - Start of Bundler: FileAssetBundler
13:26:43.832  INFO  bundlers.FileAssetBundler - +structuretype:4 +(path:/quest-logo.svg ) +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797  )
13:26:43.870  ERROR staticpublishing.AWSS3Publisher - Unclosed character class near index 26
[,!:;&?$\*/[]=|#_@()<>s+"]+
                          ^
java.util.regex.PatternSyntaxException: Unclosed character class near index 26
[,!:;&?$\*/[]=|#_@()<>s+"]+
                          ^
    at java.util.regex.Pattern.error(Pattern.java:1957) ~[?:1.8.0_212]
    at java.util.regex.Pattern.clazz(Pattern.java:2550) ~[?:1.8.0_212]
    at java.util.regex.Pattern.sequence(Pattern.java:2065) ~[?:1.8.0_212]
    at java.util.regex.Pattern.expr(Pattern.java:1998) ~[?:1.8.0_212]
    at java.util.regex.Pattern.compile(Pattern.java:1698) ~[?:1.8.0_212]
    at java.util.regex.Pattern.<init>(Pattern.java:1351) ~[?:1.8.0_212]
    at java.util.regex.Pattern.compile(Pattern.java:1028) ~[?:1.8.0_212]
    at java.lang.String.replaceAll(String.java:2223) ~[?:1.8.0_212]
    at com.dotcms.enterprise.publishing.staticpublishing.AWSS3Publisher.a(SourceFile:453) ~[ee-5.1.5.jar:?]
    at com.dotcms.enterprise.publishing.staticpublishing.AWSS3Publisher.a(SourceFile

@wezell wezell added the Type : Bug label May 23, 2019

wezell added a commit that referenced this issue May 23, 2019

wezell added a commit that referenced this issue May 23, 2019

@wezell

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

PR: #16615

@wezell

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

Note to QA - you will have to build a docker image from the release branch to test this.

@wezell wezell added this to the Cody Current milestone May 28, 2019

jgambarios added a commit that referenced this issue May 28, 2019

@bryanboza bryanboza added this to REX in QA May 28, 2019

jgambarios added a commit that referenced this issue May 30, 2019

#16612 removes config and uses default (#16615)
(cherry picked from commit 62e6376)

@jgambarios jgambarios removed this from REX in QA Jun 3, 2019

@bryanboza bryanboza added this to REX in QA Jun 3, 2019

@bryanboza bryanboza added this to To do in Release 5.1.6 Jun 4, 2019

@bryanboza bryanboza moved this from To do to Needs QA in Release 5.1.6 Jun 4, 2019

@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

Fixed, unable to reproduce after the last changes... Tested with a docker image with the release branch

@bryanboza bryanboza moved this from Needs QA to Done in Release 5.1.6 Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.