Skip to content

Hyperfoil bulk#1890

Open
ncau wants to merge 5 commits intokruize:mvp_demofrom
ncau:hyperfoilBulk
Open

Hyperfoil bulk#1890
ncau wants to merge 5 commits intokruize:mvp_demofrom
ncau:hyperfoilBulk

Conversation

@ncau
Copy link
Copy Markdown

@ncau ncau commented Apr 28, 2026

Description

Adding a basic test for the bulk api using hyperfoil. Creates a single bulk request with the following JSON:

          {
            "datasource": "prometheus-1",
            "metadata_profile": "cluster-metadata-local-monitoring",
            "measurement_duration": "24h"
          }

It then requests the Job ID to look for a successful run looking at the status and the total experiments. Currently the users are set to 1 (a single request with these parameters. We can alter this however we would like to include more requests.

Fixes # (issue)

Type of change

  • Bug fix
  • [ x] New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

  • [ x] New Test X
  • Functional testsuite

Test Configuration
ITCP Openshift cluster

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

Include any additional information such as links, test results, screenshots here

Summary by Sourcery

Add a Hyperfoil-based performance test for the bulk API and update the Jetty dependency version.

New Features:

  • Introduce a Hyperfoil scenario to exercise the bulk API, including job creation and status retrieval.

Build:

  • Update Jetty dependency version in the Maven build configuration.

Tests:

  • Add an automated Hyperfoil load test configuration for the bulk API lifecycle (submit bulk job and query its status).

dependabot Bot and others added 3 commits March 5, 2026 22:26
Bumps org.eclipse.jetty:jetty-server from 12.0.12 to 12.0.32.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-version: 12.0.32
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…se.jetty-jetty-server-12.0.32

Bump org.eclipse.jetty:jetty-server from 12.0.12 to 12.0.32
@ncau ncau requested review from chandrams and Copilot April 28, 2026 19:57
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 28, 2026

Reviewer's Guide

Adds a new Hyperfoil-based bulk API test scenario and updates the Jetty dependency version.

Sequence diagram for Hyperfoil-driven bulk API test execution

sequenceDiagram
    actor Tester
    participant Hyperfoil
    participant OpenshiftRoute as Openshift_route
    participant KruizeService as Kruize_service
    participant Jetty as Jetty_12_0_32
    participant BulkAPI as Bulk_API_handler

    Tester->>Hyperfoil: Start_kruize-bulk-hyperfoil_yaml_test
    Hyperfoil->>OpenshiftRoute: HTTP_bulk_request_batch
    OpenshiftRoute->>KruizeService: Forward_bulk_request
    KruizeService->>Jetty: Dispatch_HTTP_request
    Jetty->>BulkAPI: Invoke_bulk_API_handler
    BulkAPI-->>Jetty: Bulk_response_payload
    Jetty-->>KruizeService: HTTP_response
    KruizeService-->>OpenshiftRoute: Forward_response
    OpenshiftRoute-->>Hyperfoil: HTTP_response
    Hyperfoil-->>Tester: Report_latency_throughput_metrics
Loading

File-Level Changes

Change Details Files
Introduce a Hyperfoil scenario to exercise the /bulk API end‑to‑end.
  • Define a Hyperfoil workload named kruize-bulk-api-test targeting the cluster’s kruize API route.
  • Configure a constantRate phase that posts to /bulk with a minimal JSON payload to create a bulk job.
  • Extract the returned job_id from the bulk creation response and store it in a variable.
  • Insert a thinkTime delay before status verification to allow the job to be created.
  • Issue a GET /bulk?job_id=${job.id} request and extract summary.status and summary.total_experiments from the response body.
tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml
Update Jetty server dependency to a newer patch version.
  • Bump the jetty-version Maven property from 12.0.12 to 12.0.32 to align builds with the newer Jetty release.
pom.xml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The Hyperfoil test hardcodes the OpenShift route hostname, which will make this difficult to run in other environments; consider parameterizing the host (e.g., via a property or environment variable) instead of embedding a cluster-specific URL.
  • In the Hyperfoil scenario you capture job.status and total.experiments but never assert on them; adding explicit checks (e.g., expecting a certain status or minimum experiments) would make the test detect regressions instead of just collecting values.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The Hyperfoil test hardcodes the OpenShift route hostname, which will make this difficult to run in other environments; consider parameterizing the host (e.g., via a property or environment variable) instead of embedding a cluster-specific URL.
- In the Hyperfoil scenario you capture `job.status` and `total.experiments` but never assert on them; adding explicit checks (e.g., expecting a certain status or minimum experiments) would make the test detect regressions instead of just collecting values.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an initial Hyperfoil benchmark to exercise the Bulk API endpoint and updates the Jetty dependency version in the Maven build.

Changes:

  • Added a Hyperfoil YAML scenario to POST /bulk and then GET /bulk status.
  • Bumped jetty-version from 12.0.12 to 12.0.32 in pom.xml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml Introduces a Hyperfoil benchmark intended to validate basic /bulk job creation + status retrieval.
pom.xml Updates Jetty version property used by Jetty dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml
Comment thread tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml Outdated
Comment thread tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml
Comment thread tests/scripts/hyperfoil_tests/kruize-bulk-hyperfoil.yaml
@kusumachalasani
Copy link
Copy Markdown
Contributor

@ncau Can you please include more description about the PR.

@chandrams
Copy link
Copy Markdown
Contributor

@ncau Can you resolve the conflicts and add description and documentation for this test.

@ncau
Copy link
Copy Markdown
Author

ncau commented May 5, 2026

@kusumachalasani added more info let me know if I need to clarify anything else and resolved the merge conflict.

@ncau
Copy link
Copy Markdown
Author

ncau commented May 6, 2026

@chandrams @kusumachalasani added new documentation should help clear up issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants