Skip to content

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

Merged
924060929 merged 1 commit into
apache:masterfrom
924060929:fix_flight_record_skip_when_fe_not_local
Jul 23, 2026
Merged

[fix](test) skip test_flight_record when the frontend is not on the regression runner#65933
924060929 merged 1 commit into
apache:masterfrom
924060929:fix_flight_record_skip_when_fe_not_local

Conversation

@924060929

@924060929 924060929 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

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:

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

    • 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
  • Behavior changed:

    • Yes. demo_p0/test_flight_record now skips itself when no local frontend process is found,
      instead of failing. Regression test only, no product behavior change.
  • Does this need documentation?

    • No.

@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?

…egression runner

flightRecord starts the java flight recorder by running `jps` and `jcmd` on the
machine that executes the regression suite, so test_flight_record only works when
the frontend and the regression runner are deployed together. The case never
verified that precondition, so on a runner without a local frontend it failed with
`IllegalStateException: Can not found process: DorisFE` and got reported as a
product failure.

Check the precondition in the case and return early when the frontend is not
running on this machine, the same way the case already skips on jdk below 17.
FlightRecordAction is left as is: once the action is really invoked, failing loudly
is the right behavior.
@924060929
924060929 force-pushed the fix_flight_record_skip_when_fe_not_local branch from 7505ee9 to 2ac22e2 Compare July 23, 2026 01:43
@924060929 924060929 changed the title [fix](test) skip flight record when the frontend is not on the regression runner [fix](test) skip test_flight_record when the frontend is not on the regression runner Jul 23, 2026
@924060929

Copy link
Copy Markdown
Contributor Author

run buildall

@924060929

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review status: completed in 2 convergence rounds.

One P2 test-correctness issue is reported inline.

Critical checkpoint conclusions:

  • Goal and test proof: the basic no-local-DorisFE branch now skips, but the new predicate does not prove that the configured FE is the JVM that will be recorded and queried. The PR's reported present/absent manual runs do not cover that identity mismatch.
  • Scope and clarity: the patch is small and test-only; the inline issue is limited to the correctness of the new eligibility gate.
  • Concurrency and lifecycle: no shared-state concurrency or lock behavior is added. The full jps -> PID lookup -> JFR start -> loopback SQL -> JFR stop -> parse/callback -> cleanup path was reviewed, including multiple local FEs, external-process races, and error returns.
  • Configuration and compatibility: no configuration item, protocol/storage format, persistence, transaction, data-write, or FE-BE variable path is changed.
  • Parallel and conditional paths: local single-FE, absent/remote FE, unrelated or multiple local FEs, unavailable/failing tools, action failures, and cleanup were checked. The target-identity mismatch is the only substantiated patch-scoped issue.
  • Tests and results: no result file changes. The author reports manual found/not-found regression runs; no build or test was run by this reviewer because the review runner contract prohibits builds.
  • Observability and performance: skip logging is adequate for the intended branch, and one extra jps process is negligible for this demo suite.
  • User focus: no additional review focus was supplied.

All changed files and candidates were swept after convergence; no unresolved or duplicate point remains outside the inline comment.

Comment thread regression-test/suites/demo_p0/test_flight_record.groovy
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@924060929
924060929 merged commit 576b0ac into apache:master Jul 23, 2026
35 checks passed
@924060929
924060929 deleted the fix_flight_record_skip_when_fe_not_local branch July 23, 2026 04:18
github-actions Bot pushed a commit that referenced this pull request Jul 23, 2026
…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 Bot pushed a commit that referenced this pull request Jul 23, 2026
…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` |
yiguolei pushed a commit that referenced this pull request Jul 24, 2026
…not on the regression runner #65933 (#65946)

Cherry-picked from #65933

Co-authored-by: 924060929 <lanhuajian@selectdb.com>
0AyanamiRei pushed a commit to 0AyanamiRei/doris that referenced this pull request Jul 27, 2026
…egression runner (apache#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 added a commit that referenced this pull request Jul 28, 2026
…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` |
morningman pushed a commit that referenced this pull request Jul 28, 2026
…not on the regression runner #65933 (#65945)

Cherry-picked from #65933

Co-authored-by: 924060929 <lanhuajian@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.8-merged dev/4.1.4-merged dev/4.2.x reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants