Fabio Wanner created FLINK-30845:
------------------------------------
Summary: Params in jarURI end up in file name
Key: FLINK-30845
URL: https://issues.apache.org/jira/browse/FLINK-30845
Project: Flink
Issue Type: Bug
Components: Kubernetes Operator
Affects Versions: kubernetes-operator-1.3.0
Reporter: Fabio Wanner
*Context*
Jar files for jobs are submitted to the operator by supplying a URI to the .jar
file. This URI can be a file system path or a URI to some HTTP resource. If a
HTTP URI is given, the file will be fetched using the
{{{}HttpArtifactFetcher{}}}.
There are cases where the supplied URI will contain additional params. For
example if pre-signed S3 URLs are used.
Example:
{code:java}
https://some-domain.example.com/some.jar?some=params{code}
*Problem*
When the HttpArtifactFetcher determines the name of the .jar file it does also
use the params as part of the file name. In the example from above the
resulting file name would be: {{some.jar?some=params}}
Submitting this job to Flink will result in an error as it will be checked for
the file name to end with {{.jar}}
*Possible Solution*
In the {{HttpArtifactFetcher}} it would be enough to replace:
{code:java}
String fileName = FilenameUtils.getName(url.getFile());{code}
with
{code:java}
String fileName = FilenameUtils.getName(url.getPath());{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)