-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix Watch.Response deserialization to preserve DynamicKubernetesObject raw data #4403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…n issue Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
|
@copilot please fix style formatting errors. Thanks |
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Fixed in commit fcc8282. Split long lines (>100 chars), added proper import for DynamicKubernetesTypeAdaptorFactory, moved inline comments to separate lines, and fixed trailing whitespace. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Fix for Watch.Response Raw Data Preservation
Summary
Issue: Watch.Response objects were not properly deserializing DynamicKubernetesObject's raw JSON data for any event type (ADDED, MODIFIED, DELETED, etc.).
Root Cause: The Watch.parseLine() method was using JSON.deserialize() static methods which use the global static GSON instance, not the ApiClient-specific GSON instance that has DynamicKubernetesTypeAdaptorFactory registered.
Fix: Changed Watch.parseLine() to use json.getGson().fromJson() directly, ensuring it uses the properly configured GSON instance with custom TypeAdapters. This is a minimal 2-line change that fixes the issue for all Watch.Response types.
Formatting Fixes:
Testing:
Security: No vulnerabilities detected by CodeQL scan.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.