spuru9 opened a new pull request, #28599:
URL: https://github.com/apache/flink/pull/28599
## What is the purpose of the change
The job Exceptions view crashes with `NG04008: The requested path contains
undefined segment at index 1` when the user clicks the *Location* cell of an
exception that has no assigned TaskManager (rendered as `(unassigned)`).
`navigateTo()` only guarded against `null`, so an `undefined`
`taskManagerId` reached `router.navigate(['task-manager', undefined,
'metrics'])`, which the Angular router rejects. In addition,
`ExceptionInfo.taskManagerId` was typed as `string` even though the REST API
can omit the field entirely.
## Brief change log
- `job-exceptions.component.ts`: replace the `taskManagerId !== null` guard
in `navigateTo()` with a falsy check, so both `null` and `undefined` are
handled and no navigation is attempted for unassigned TaskManagers.
- `interfaces/job-exception.ts`: type `ExceptionInfo.taskManagerId` as
`string | null` to reflect that the field can be absent.
- Reviewed the `application-exceptions` component for the same navigation
pattern: it has no `navigateTo` / Location cell, so no change is required there.
## Verifying this change
This change is a trivial fix to the web frontend and can be verified
manually:
- Run a job that produces an exception without an assigned TaskManager, open
the job's *Exceptions* tab, and click the `(unassigned)` Location cell.
Previously this crashed the view with NG04008; now nothing happens (no invalid
navigation).
- `eslint` and the production `ng build` both pass.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
## AI Usage Disclosure
- [x] Claude Code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]