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

KAFKA-3592: System test - configurable paths #1245

Closed
wants to merge 31 commits into from

Conversation

granders
Copy link
Contributor

This patch adds logic for the following:

  • remove hard-coded paths to various scripts and jars in kafkatest service classes
  • provide a mechanism for overriding path resolution logic with a "pluggable" path resolver class

@granders
Copy link
Contributor Author

@ewencp ping for initial review

There are some rough edges and unfinished bits, but It would be great to get feedback on the overall approach and path resolution api.

As we discussed offline recently, it's possible we want to change "path resolution" to something more general. From my vantage point, this is fairly extensible, but ideas here are welcome as well.

Note that running tests here relies on logic in the user-defined-globals branch of ducktape.

"""

DEFAULT_SCRATCH_ROOT = "/mnt"
DEFAULT_KAFKA_INSTALL_ROOT = "/opt"
Copy link
Contributor

Choose a reason for hiding this comment

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

If these can be overridden, should we remove the DEFAULT_ prefix?

@granders
Copy link
Contributor Author

@ewencp Mind taking a quick look at the path resolution API again? I think it's cleaner now

@granders
Copy link
Contributor Author

@ewencp I think this is ready for a more careful review now

@granders granders force-pushed the configurable-install-path branch from 58aede0 to 425b5b0 Compare May 2, 2016 21:46
import time
from kafkatest.services.zookeeper import ZookeeperService
from kafkatest.utils.remote_account import line_count, file_exists
from kafkatest.version.version import LATEST_0_8_2
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these imports repeating version? It looks like that module only contains one child module.

@ewencp
Copy link
Contributor

ewencp commented May 3, 2016

@granders Overall looks nice; easy transition without much overhead at each call. I'm having trouble running unit tests. First, I think we missed a memory_profiler dependency for the tests. Second, there is a reference to kafkatest_unit_test.directory_layout.check_project_paths where the kafkatest_unit_tests part of the path is missing the trailing s and there's an issue finding a template called sample. Also, you might want to go with something a bit less verbose (and less tab-completion-killing) than kafkatest_unit_tests. Maybe just tests/kafkatest/unit or something like that?

@ewencp
Copy link
Contributor

ewencp commented May 3, 2016

Also, I assume we'll want to kick off a full test run before merging this since it's a pretty substantial change? And you might want to check pre- and post- patch --collect-only output to make sure we didn't accidentally lose any tests to syntax errors or anything like that.

@granders granders force-pushed the configurable-install-path branch from 425b5b0 to fdb75f3 Compare May 3, 2016 22:02
@granders
Copy link
Contributor Author

granders commented May 3, 2016

@ewencp Regarding unit tests - the kafkatest unit tests don't actually depend on memory_profiler, but the python setup.py test command seems to be picking up ducktape unit tests as well (which does require memory_profiler)

I'll try to fix this

@granders
Copy link
Contributor Author

granders commented May 3, 2016

Running branch builder for further verification:
https://jenkins.confluent.io/job/system-test-kafka-branch-builder/427/console

Also - I don't see errors with --collect-only

@granders granders force-pushed the configurable-install-path branch from 8b3145e to bcf3982 Compare May 5, 2016 20:54
@granders
Copy link
Contributor Author

granders commented May 6, 2016

@granders granders changed the title KAFKA-3592: System test - configurable paths [WIP] KAFKA-3592: System test - configurable paths May 6, 2016
@ewencp
Copy link
Contributor

ewencp commented May 6, 2016

LGTM, thanks!

@asfgit asfgit closed this in 54092c1 May 6, 2016
asfgit pushed a commit that referenced this pull request May 6, 2016
This patch adds logic for the following:
- remove hard-coded paths to various scripts and jars in kafkatest service classes
- provide a mechanism for overriding path resolution logic with a "pluggable" path resolver class

Author: Geoff Anderson <geoff@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1245 from granders/configurable-install-path

(cherry picked from commit 54092c1)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
@granders granders deleted the configurable-install-path branch May 19, 2016 00:16
gfodor pushed a commit to AltspaceVR/kafka that referenced this pull request Jun 3, 2016
This patch adds logic for the following:
- remove hard-coded paths to various scripts and jars in kafkatest service classes
- provide a mechanism for overriding path resolution logic with a "pluggable" path resolver class

Author: Geoff Anderson <geoff@confluent.io>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes apache#1245 from granders/configurable-install-path
efeg added a commit to efeg/kafka that referenced this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants