Skip to content

branch-4.1: [fix](test) skip test_flight_record when the frontend is not on the regression runner #65933#65946

Merged
yiguolei merged 1 commit into
branch-4.1from
auto-pick-65933-branch-4.1
Jul 24, 2026
Merged

branch-4.1: [fix](test) skip test_flight_record when the frontend is not on the regression runner #65933#65946
yiguolei merged 1 commit into
branch-4.1from
auto-pick-65933-branch-4.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #65933

…egression runner (#65933)

Problem Summary:

`flightRecord` starts the java flight recorder by running `jps` and
`jcmd` **on the machine that
executes the regression suite**, so `demo_p0/test_flight_record` only
works when the frontend and
the regression runner are deployed together, e.g. a local development
cluster. The case never
verified that precondition.

On a runner without a local frontend the case failed with

```
java.lang.IllegalStateException: Can not found process: DorisFE
    at .../demo_p0/test_flight_record.groovy:30
```

and was reported as a product failure, although nothing was wrong with
the product.

This PR checks the precondition in the case and returns early when the
frontend is not running on
this machine, the same way the case already skips on jdk below 17:

```groovy
String feProcessName = "DorisFE"
boolean feOnThisMachine = false
try {
    feOnThisMachine = "jps".execute().text.readLines().any { it.contains(feProcessName) }
} catch (Throwable t) {
    logger.info("Can not execute jps: ${t.getMessage()}")
}
if (!feOnThisMachine) {
    logger.info("Process ${feProcessName} is not running on this machine, ... skip test")
    return
}
```

`FlightRecordAction` is deliberately left untouched: once the action is
really invoked, failing
loudly is the right behavior, the precondition belongs to the case. The
rest of the case is kept
as is, it still demonstrates the `flightRecord` api.

### Release note

None

### Check List (For Author)

- Test
    - [x] Manual test (add detailed scripts or steps below)

Ran the real regression harness against a local cluster (jdk17), with
`sh run-regression-test.sh --run -d demo_p0 -s test_flight_record -g
nonConcurrent`.
The "frontend not here" case is simulated by pointing the probed process
name at a name that
does not exist, which is what the action sees when the frontend is on
another machine.

    | | frontend process | result |
    |---|---|---|
| before this PR | not found | `java.lang.IllegalStateException: Can not
found process: ...`, `failed 1 suites` |
| after this PR | not found | `Process ... is not running on this
machine, ... skip test`, `failed 0 suites` |
| after this PR | found | `JFR.start` / 11x `select 100` / `JFR.stop` /
parse ok, `allocation bytes: 2348624`, `.jfr` cleaned up, `failed 0
suites` |
@github-actions
github-actions Bot requested a review from yiguolei as a code owner July 23, 2026 04:22
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@yiguolei
yiguolei merged commit 3347496 into branch-4.1 Jul 24, 2026
32 of 34 checks passed
@924060929
924060929 deleted the auto-pick-65933-branch-4.1 branch July 24, 2026 03:05
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.

3 participants