[
https://issues.apache.org/jira/browse/FLINK-34388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819897#comment-17819897
]
Yu Chen commented on FLINK-34388:
---------------------------------
Hi [~ferenc-csaky] [~lincoln.86xy] [~yunta] ,
I have completed this Release Testing. And I think this feature works well in
branch `release-1.19`, and this ticket can be closed.
Here are some testing logs as a reference.
*> Test 1: Pass local:// job jar in standalone mode, and check the artifacts
are not actually copied.*
*Passed.* Flink will use the original file and not actually copied.
By the way, it also works with an absolute path(without `local://`), but it
will copy the file to the `user.artifacts.base-dir`. I'm not sure whether it's
expected (In my opinion, it was a local file, maybe we don't need to copy that
cc [~ferenc-csaky] ).
*> Test 2: Pass multiple artifacts in standalone mode.*
*Passed.* In StandaloneJobCluster, flink could load the jar with
`http://`(copied) and `local://`(not copied) simultaneously.
*> Test 3: Pass a non-local job jar in native k8s mode.*
*Passed.* Tested by starting native k8s application cluster in `minikube` with
following command,
{code:java}
./bin/flink run-application \
--target kubernetes-application \
-Dkubernetes.cluster-id=my-first-application-cluster\
-Dkubernetes.container.image.ref=flink:test_community_1.19_SN \
http://localhost:9999/data/WordCount.jar {code}
flink will throw expected exception with hints(set
`user.artifacts.raw-http-enabled` to true).
{code:java}
2024-02-23 02:20:48,305 ERROR
org.apache.flink.runtime.entrypoint.ClusterEntrypoint [] - Could not create
application program.
java.lang.RuntimeException: java.lang.IllegalArgumentException: Artifact
fetching from raw HTTP endpoints are disabled. Set the
'user.artifacts.raw-http-enabled' property to override.
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.fetchArtifacts(KubernetesApplicationClusterEntrypoint.java:158)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.getPackagedProgramRetriever(KubernetesApplicationClusterEntrypoint.java:129)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.getPackagedProgram(KubernetesApplicationClusterEntrypoint.java:111)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.lambda$main$0(KubernetesApplicationClusterEntrypoint.java:85)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.main(KubernetesApplicationClusterEntrypoint.java:85)
[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
Caused by: java.lang.IllegalArgumentException: Artifact fetching from raw HTTP
endpoints are disabled. Set the 'user.artifacts.raw-http-enabled' property to
override.
at
org.apache.flink.client.program.artifact.ArtifactFetchManager.isRawHttp(ArtifactFetchManager.java:166)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.client.program.artifact.ArtifactFetchManager.getFetcher(ArtifactFetchManager.java:142)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.client.program.artifact.ArtifactFetchManager.fetchArtifact(ArtifactFetchManager.java:157)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.client.program.artifact.ArtifactFetchManager.fetchArtifacts(ArtifactFetchManager.java:124)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
at
org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.fetchArtifacts(KubernetesApplicationClusterEntrypoint.java:156)
~[flink-dist-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
... 5 more {code}
After setting the parameter in `flink-conf.yaml`, the jar was copied to
`user.artifacts.base-dir` and the job was running as expected.
*> Test 4: Pass additional remote artifacts in native k8s mode.*
*Passed.* Tested by starting native k8s application cluster with commands in
`Test 3`.
In addition, we added additional jars in `flink-conf.yaml`, they are copied as
expected and the job running well.
{code:java}
user.artifacts.artifact-list:
http://10.23.171.97:9999/data/AsyncIO.jar;http://10.23.171.97:9999/data/WordCount.jar;
{code}
{code:java}
root@my-first-application-cluster-8479579f45-cdpc9:/opt/flink/artifacts/default/my-first-application-cluster#
ls
AsyncIO.jar WindowJoin.jar WordCount.jar {code}
> Release Testing: Verify FLINK-28915 Support artifact fetching in Standalone
> and native K8s application mode
> -----------------------------------------------------------------------------------------------------------
>
> Key: FLINK-34388
> URL: https://issues.apache.org/jira/browse/FLINK-34388
> Project: Flink
> Issue Type: Sub-task
> Components: Runtime / Metrics
> Affects Versions: 1.19.0
> Reporter: Ferenc Csaky
> Assignee: Yu Chen
> Priority: Blocker
> Labels: release-testing
> Fix For: 1.19.0
>
>
> This ticket covers testing FLINK-28915. More details and the added docs are
> accessible on the [PR|https://github.com/apache/flink/pull/24065]
> Test 1: Pass {{local://}} job jar in standalone mode, check the artifacts are
> not actually copied.
> Test 2: Pass multiple artifacts in standalone mode.
> Test 3: Pass a non-local job jar in native k8s mode. [1]
> Test 4: Pass additional remote artifacts in native k8s mode.
> Available config options:
> https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#artifact-fetching
> [1] Custom docker image build instructions:
> https://github.com/apache/flink-docker/tree/dev-master
> Note: The docker build instructions also contains a web server example that
> can be used to serve HTTP artifacts.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)