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

test: check for non-empty samples from any core #16671

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented Feb 22, 2024

Only core 0 was checked for samples in the test. We can see here in the result of querying the cpu profiler endpoint that only core 1 had samples.

    [DEBUG - 2024-02-16 02:04:02,865 - admin - _request - lineno:383]: Response OK, JSON: [{'shard_id': 0, 'dropped_samples': 0}, {'shard_id': 1, 'dropped_samples': 0, 'samples': [{'user_backtrace': '0xef666 /opt/redpanda_installs/ci/lib/libseastar.so+0x597c482 /opt/r
        KeyError('samples')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 184, in _do_run
        data = self.run_test()
      File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 269, in run_test
        return self.test_context.function(self.test)
      File "/root/tests/rptest/services/cluster.py", line 104, in wrapped
        r = f(self, *args, **kwargs)
      File "/root/tests/rptest/tests/cpu_profiler_admin_api_test.py", line 73, in test_get_cpu_profile_with_override
        profile[0]["samples"]
    KeyError: 'samples'

Fixes: #16618

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

Only core 0 was checked for samples in the test. We can see here in the
result of querying the cpu profiler endpoint that only core 1 had
samples.

    [DEBUG - 2024-02-16 02:04:02,865 - admin - _request - lineno:383]: Response OK, JSON: [{'shard_id': 0, 'dropped_samples': 0}, {'shard_id': 1, 'dropped_samples': 0, 'samples': [{'user_backtrace': '0xef666 /opt/redpanda_installs/ci/lib/libseastar.so+0x597c482 /opt/r

        KeyError('samples')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 184, in _do_run
        data = self.run_test()
      File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 269, in run_test
        return self.test_context.function(self.test)
      File "/root/tests/rptest/services/cluster.py", line 104, in wrapped
        r = f(self, *args, **kwargs)
      File "/root/tests/rptest/tests/cpu_profiler_admin_api_test.py", line 73, in test_get_cpu_profile_with_override
        profile[0]["samples"]
    KeyError: 'samples'

Fixes: redpanda-data#16618

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
@vbotbuildovich
Copy link
Collaborator

Copy link
Member

@travisdowns travisdowns left a comment

Choose a reason for hiding this comment

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

LGTM but let's wait for Brandon to take a peek too.

@ballard26 ballard26 merged commit 85fc1d6 into redpanda-data:dev Feb 22, 2024
18 checks passed
@ballard26
Copy link
Contributor

Thanks for the quick fix here @dotnwat !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Failure (KeyError: 'samples') in CPUProfilerAdminAPITest.test_get_cpu_profile_with_override
4 participants