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

[FLINK-33520] Avoid using FLINK_HOME to find test scripts #23696

Merged

Conversation

RyanSkraba
Copy link
Contributor

What is the purpose of the change

This is a very minor change to avoid depending on the value of the FLINK_HOME environment variable when discovering the value of the gpu discovery test script (only used while testing).

Before this change, the following error occurs on the command line and IDE if the FLINK_HOME is set:

java.io.FileNotFoundException: The gpu discovery script does not exist in path /opt/asf/flink/src/test/resources/testing-gpu-discovery.sh.
	at org.apache.flink.externalresource.gpu.GPUDriver.<init>(GPUDriver.java:98)
	at org.apache.flink.externalresource.gpu.GPUDriverTest.testGPUDriverWithInvalidAmount(GPUDriverTest.java:64)

Brief change log

During unit tests, use an absolute path to the modules src/test/resources directory instead of a path relative to FLINK_HOME (if it exists).

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Nov 10, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I verified that the issue exists due to the way how the path is resolved via the configuration parameter (see GPUDriver:88ff)

@XComp XComp merged commit 9ed3d04 into apache:master Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants