Skip to content

MINOR: Add JmxTool wrapper scripts and redirection (KIP-906)#13195

Merged
mimaison merged 5 commits intoapache:trunkfrom
fvaleri:changes-350
Apr 17, 2023
Merged

MINOR: Add JmxTool wrapper scripts and redirection (KIP-906)#13195
mimaison merged 5 commits intoapache:trunkfrom
fvaleri:changes-350

Conversation

@fvaleri
Copy link
Copy Markdown
Contributor

@fvaleri fvaleri commented Feb 3, 2023

No description provided.

Comment thread docs/upgrade.html Outdated
Comment thread docs/upgrade.html Outdated
@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Feb 8, 2023

@dajac @mimaison last commit shows the reflection based solution. Let me know if this is fine. Thanks.

@fvaleri fvaleri force-pushed the changes-350 branch 2 times, most recently from 99971d8 to d6f3d3e Compare February 8, 2023 12:09
@ijuma
Copy link
Copy Markdown
Member

ijuma commented Feb 10, 2023

Was a KIP submitted for this? Generally, if something ends up in the release notes due to user impact, it requires a KIP.

@dajac
Copy link
Copy Markdown
Member

dajac commented Feb 11, 2023

I am not aware of any KIP regarding the migration of the tools from core module to tools module. Having a small one for those problematic tools is not a bad idea.

For the context, package name of the tools has been changed during the migration. For tools with a script, the change is transparent. For tools without a script, the change will break things. Hence my question in this PR.

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Feb 11, 2023

@dajac well, that depends on whether it's considered public api. My position is that the only API is the script. If there is no script, it's not public API. How would users even know about the tools if they're not documented? Are the tools in question documented?

@dajac
Copy link
Copy Markdown
Member

dajac commented Feb 11, 2023

Yeah, it is definitely a gray area. I don’t think that those tools are documented in the Kafka documentation. Somehow, JmxTool is known and you can find references to it on Stackoverflow and in articles online.

I don’t have a strong opinion on this but thoughts that it is worth having a discussion. Being user friendly is also nice in general.

@dajac
Copy link
Copy Markdown
Member

dajac commented Feb 11, 2023

By the way, there is another case here: #13214.

@Hangleton
Copy link
Copy Markdown

Thanks David for your suggestion about a KIP, this looks appropriate indeed. And, this can be an opportunity to add documentations for these SPIs, too.

@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Feb 13, 2023

@ijuma @dajac I'm working on this KIP. Thanks for the feedback.

@Hangleton
Copy link
Copy Markdown

@fvaleri Is the KIP going to include the interface MessageReader? Happy to write one for it otherwise.

@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Feb 13, 2023

MessageReader

Not specifically, I was thinking more about proposing a policy (series of guidelines) to address the common compatibility issues we have seen while kicking off this migration.

@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Feb 23, 2023

@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Mar 22, 2023

@dajac @ijuma can you please review the above small KIP?

The vote thread is already opened.
Thanks.

@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Apr 4, 2023

Hi @mimaison and @dajac, now that KIP-906 is accepted I would say this is ready for the final review. Thanks.

Copy link
Copy Markdown

@Hangleton Hangleton left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

@fvaleri fvaleri changed the title Minor: Add JmxTool note to 3.5.0 notable changes Minor: Add JmxTool note and redirection script Apr 12, 2023
@fvaleri fvaleri changed the title Minor: Add JmxTool note and redirection script Minor: Add JmxTool note and redirection Apr 12, 2023
@fvaleri
Copy link
Copy Markdown
Contributor Author

fvaleri commented Apr 12, 2023

@mimaison added the missing wrapper scripts for this tool as specified in KIP-906 and changed the system tests to use it.

System test run after latest changes:

TC_PATHS="tests/kafkatest/tests/core/throttling_test.py::ThrottlingTest.test_throttled_reassignment" \
  _DUCKTAPE_OPTIONS='--parameters '\''{"bounce_brokers":"false"}'\' \
    bash tests/docker/run_tests.sh
docker exec ducker01 bash -c "cd /opt/kafka-dev && ducktape --cluster-file /opt/kafka-dev/tests/docker/build/cluster.json  ./tests/kafkatest/tests/core/throttling_test.py::ThrottlingTest.test_throttled_reassignment --parameters '{"bounce_brokers":"false"}'"
/usr/local/lib/python3.9/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
  "class": algorithms.Blowfish,
[INFO:2023-04-12 06:15:49,034]: starting test run with session id 2023-04-12--001...
[INFO:2023-04-12 06:15:49,034]: running 1 tests...
[INFO:2023-04-12 06:15:49,035]: Triggering test 1 of 1...
[INFO:2023-04-12 06:15:49,042]: RunnerClient: Loading test {'directory': '/opt/kafka-dev/tests/kafkatest/tests/core', 'file_name': 'throttling_test.py', 'cls_name': 'ThrottlingTest', 'method_name': 'test_throttled_reassignment', 'injected_args': {'bounce_brokers': 'false'}}
[INFO:2023-04-12 06:15:49,043]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: on run 1/1
[INFO:2023-04-12 06:15:49,045]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: Setting up...
[INFO:2023-04-12 06:15:52,005]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: Running...
[INFO:2023-04-12 06:20:30,334]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: Tearing down...
[WARNING - 2023-04-12 06:20:30,669 - service_registry - stop_all - lineno:53]: Error stopping service <ProducerPerformanceService-0-139894120584000: num_nodes: 1, nodes: ['ducker09']>: 1
[INFO:2023-04-12 06:21:29,909]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: PASS
[INFO:2023-04-12 06:21:29,909]: RunnerClient: kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false: Data: None
================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.11.3
session_id:       2023-04-12--001
run time:         5 minutes 40.891 seconds
tests run:        1
passed:           1
flaky:            0
failed:           0
ignored:          0
================================================================================
test_id:    kafkatest.tests.core.throttling_test.ThrottlingTest.test_throttled_reassignment.bounce_brokers=false
status:     PASS
run time:   5 minutes 40.865 seconds
--------------------------------------------------------------------------------

@fvaleri fvaleri changed the title Minor: Add JmxTool note and redirection Minor: Add JmxTool wrapper scripts and redirection according to KIP-906 Apr 13, 2023
@fvaleri fvaleri changed the title Minor: Add JmxTool wrapper scripts and redirection according to KIP-906 Minor: Add JmxTool wrapper scripts and redirection (KIP-906) Apr 13, 2023
@mimaison
Copy link
Copy Markdown
Member

Technically KIP-906 was voted after KIP freeze but since some tools have already been migrated I think we should merge PRs that add the redirection and the warning message to avoid breaking things.

@mimaison
Copy link
Copy Markdown
Member

@dajac Any objections?

fvaleri added 4 commits April 17, 2023 14:15
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
@dajac
Copy link
Copy Markdown
Member

dajac commented Apr 17, 2023

@mimaison No objections. I do agree that we should avoid breaking things.

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

LGTM

@mimaison mimaison merged commit 57d6a88 into apache:trunk Apr 17, 2023
mimaison pushed a commit that referenced this pull request Apr 17, 2023
Reviewers: Mickael Maison <mickael.maison@gmail.com>

, 
David Jacot <djacot@confluent.io>, Christo Lolov <christololov@gmail.com>, Alexandre Dupriez <alexandre.dupriez@gmail.com>
@mimaison
Copy link
Copy Markdown
Member

Since the initial JmxTool changes are in 3.5, I've backported this to 3.5 too.

@fvaleri fvaleri changed the title Minor: Add JmxTool wrapper scripts and redirection (KIP-906) MINOR: Add JmxTool wrapper scripts and redirection (KIP-906) Apr 17, 2023
@fvaleri fvaleri deleted the changes-350 branch April 17, 2023 13:31
@fvaleri fvaleri added tools kip Requires or implements a KIP labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kip Requires or implements a KIP tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants