Skip to content

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

Merged
morningman merged 1 commit into
branch-4.0from
auto-pick-65933-branch-4.0
Jul 28, 2026
Merged

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

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #65933

@github-actions
github-actions Bot requested a review from morningman as a code owner July 23, 2026 04:21
@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

@924060929

Copy link
Copy Markdown
Contributor

/review

@github-actions

Copy link
Copy Markdown
Contributor Author

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Jul 30th, 2026 7:58 AM.
Workflow run: https://github.com/apache/doris/actions/runs/30084308373

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

…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` |
@924060929
924060929 force-pushed the auto-pick-65933-branch-4.0 branch from 50114c0 to e4982b9 Compare July 28, 2026 03:55
@924060929

Copy link
Copy Markdown
Contributor

run buildall

@morningman
morningman merged commit 81df4f4 into branch-4.0 Jul 28, 2026
28 of 31 checks passed
@github-actions
github-actions Bot deleted the auto-pick-65933-branch-4.0 branch July 28, 2026 08:18
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