Zhuoxi2000 opened a new pull request, #1464: URL: https://github.com/apache/flink-agents/pull/1464
<!-- * Thank you very much for contributing to Flink Agents. * Please add the relevant components in the PR title. E.g., [api], [runtime], [java], [python], [hotfix], etc. --> <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. --> Linked issue: #1463 ### Purpose of change <!-- What is the purpose of this change? --> `FileTraceLogger` and `Slf4jTraceLogger` cast `trace-log.pretty-print` to `Boolean`, so a string value such as `"true"` from a legacy Flink 1.x `flink-conf.yaml` threw `ClassCastException` in `open()`. Both loggers now parse it with a `getBooleanFromConfig` helper next to the existing `getIntFromConfig`, matching how `AgentConfiguration.get` converts the option. ### Behavioral Semantics <!-- For a non-trivial code change whose implementation is largely AI-assisted: interaction decisions, behavioral contracts, and failure behavior. See `contribution-guides/ai-assisted-pr.md`. Remove this heading and this comment otherwise. --> #### Behavioral contracts 1. A `Boolean` value is used as is; a missing value keeps the default `false`. 2. Any other value is read with `Boolean.parseBoolean(value.toString())`: `"true"` (any case) enables pretty print, anything else disables it, as in `AgentConfiguration.get`. ### Tests <!-- How is this change verified? --> New `testPrettyPrintAcceptsStringValue` in `FileTraceLoggerTest` and `Slf4jTraceLoggerTest`; both fail on main with `ClassCastException` and pass with this change. `mvn verify -pl runtime`: 1883 tests, 0 failures, spotless clean. ### API <!-- Does this change touches any public APIs? --> No public API change. ### Documentation <!-- Do not remove this section. Check the proper box only. --> - [ ] `doc-needed` <!-- Your PR changes impact docs --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-included` <!-- Your PR already contains the necessary documentation updates --> ### Was this patch authored or co-authored using generative AI tooling? <!-- Do not remove this section. Check the proper box only. --> - [x] Yes - [ ] No If yes, include a `Generated-by: <tool name and version> (<model name and version>)` line, for example `Generated-by: Claude Code 2.1.226 (Claude Opus 4.6)`, in the commit message so it reaches Git history. Repeat the same line here for reviewer visibility. See the [ASF generative tooling guidance](https://www.apache.org/legal/generative-tooling.html). Generated-by: Claude Code 2.1.259 (Claude Opus 5.5) -- 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]
